You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use an observer in my Rails app, loading the Rails environment does not work properly any more. The most simple way to reproduce this error is by cloning my repository:
git clone git://github.com/krikis/nomad.git
cd nomad
git checkout observer_load_error
and running
rails r "puts Post"
You should get an exception like:
/path/to/homedir/.rvm/gems/ruby-1.9.3-p125-perf@rails32/gems/railties-3.2.1/lib/rails/commands/runner.rb:53:in `eval': Expected /path/to/rails_app/app/models/post.rb to define Post (LoadError)
When I comment line 27 in my config/application.rb
config.active_record.observers=:post_observer
the code runs fine.
I ran into this issue using Rails 3.2.1
The text was updated successfully, but these errors were encountered:
When I use an observer in my Rails app, loading the Rails environment does not work properly any more. The most simple way to reproduce this error is by cloning my repository:
git clone git://github.com/krikis/nomad.git cd nomad git checkout observer_load_error
and running
rails r "puts Post"
You should get an exception like:
/path/to/homedir/.rvm/gems/ruby-1.9.3-p125-perf@rails32/gems/railties-3.2.1/lib/rails/commands/runner.rb:53:in `eval': Expected /path/to/rails_app/app/models/post.rb to define Post (LoadError)
When I comment line 27 in my config/application.rb
the code runs fine.
I ran into this issue using Rails 3.2.1
The text was updated successfully, but these errors were encountered: