Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tombruijn/rails-minimal-duplicate-error-script


https://github.com/tombruijn/rails-minimal-duplicate-error-script

Last synced: 6 days ago
JSON representation

Awesome Lists containing this project

README

        

# Rails error reporter test app

## Usage

This test app illustrates the difference between the development and production environments and how the errors are reported to error subscribers.

- In development, it reports the `ActionView::Template::Error` error.
- In production, it reports the `NoMethodError` error.

```
# Start in development environment
ruby app.rb

# Start in production environment
RAILS_ENV=production ruby app.rb
```

## Output

Development:

```
MyErrorSubscriber: ActionView::Template::Error: undefined method `foo' for nil
enable_reloading: true
[#]
```

Production:

```
MyErrorSubscriber: NoMethodError: undefined method `foo' for nil
enable_reloading: false
[#]
```