ruby script/server
=> Booting WEBrick...
/home/rao/Documents/homir /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:74:in `establish_connection': Please install the postgres adapter: `gem install activerecord-postgres-adapter` (no such file to load -- active_record/connection_adapters/postgres_adapter) (RuntimeError)
from /home/rao/Documents/homir /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:58:in `establish_connection'
from /home/rao/Documents/homir /vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:53:in `establish_connection'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:392:in `initialize_database'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:139:in `process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:112:in `send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:112:in `run'
from /home/rao/Documents/homir /config/environment.rb:13
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /home/rao/Documents/homir /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
from /home/rao/Documents/homir /vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/rao/Documents/homir /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
from /home/rao/Documents/homir /vendor/rails/railties/lib/commands/servers/webrick.rb:59
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /home/rao/Documents/homir /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
from /home/rao/Documents/homir /vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /home/rao/Documents/homir /vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
from /home/rao/Documents/homir /vendor/rails/railties/lib/commands/server.rb:49
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from script/server:3
The error shows that you are using prosgres but you didn't installed its adapter.
Just add gem 'pg' in your gem file and run bundle install.
Related
I have two models in my Rails application:
class Item < ActiveRecord::Base
end
class ItemLocalization < ActiveRecord::Base
end
Similarly, I have two factories:
factory :item do
sequence(:name) { |n| "item #{n}" }
description "this is a description"
association :locale, :factory => :locale_deCH
item_group
end
factory :item_localization do
sequence(:name) { |n| "item #{n}" }
description "this is a description"
association :locale, :factory => :locale_deCH
item
user
reviewer
end
When having a second factory with the _localization suffix, FactoryGirl returns a DuplicationError:
Rack::File headers parameter replaces cache_control after Rack 1.5.
/Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/decorator.rb:10:in `method_missing': Factory already registered: item_localization (FactoryGirl::DuplicateDefinitionError)
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/decorator/disallows_duplicates_registry.rb:6:in `register'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl.rb:65:in `block in register_factory'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl.rb:64:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl.rb:64:in `register_factory'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/syntax/default.rb:20:in `factory'
from /Users/user/Sites/ec/spec/factories.rb:62:in `block in <top (required)>'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/syntax/default.rb:49:in `instance_eval'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/syntax/default.rb:49:in `run'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/syntax/default.rb:7:in `define'
from /Users/user/Sites/ec/spec/factories.rb:1:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `block in load'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:16:in `block in find_definitions'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:15:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl-4.1.0/lib/factory_girl/find_definitions.rb:15:in `find_definitions'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/factory_girl_rails-4.1.0/lib/factory_girl_rails/railtie.rb:26:in `block in <class:Railtie>'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/activesupport-3.2.11/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/user/Sites/ec/config/environment.rb:5:in `<top (required)>'
from /Users/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/user/Sites/ec/spec/spec_helper.rb:3:in `<top (required)>'
from /Users/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/user/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /Users/user/Sites/ec/spec/models/organization_spec.rb:1:in `<top (required)>'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `load'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `block in load_spec_files'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `each'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/configuration.rb:789:in `load_spec_files'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/command_line.rb:22:in `run'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb:80:in `run'
from /Users/user/.rvm/gems/ruby-1.9.3-p327#rails329-ec/gems/rspec-core-2.12.2/lib/rspec/core/runner.rb:17:in `block in autorun'
Is the suffix "_localization" somehow reserved? Rails doesn't seem to have an issue with it.
I found the problem. It had nothing to do with the "_localization" suffix. Rather, when creating the model ItemLocalization, Rails created a factory with the same name in the folder test/factories and I used the same factory under rspec/factories.
Removing all files from the test/factories folder solved the issue.
My app works without a problem on my localhost but I can't get it to deploy correctly with heroku. I have read through all the other questions about this here and tried many ways to resolve it but have not managed yet.
I have copied my heroku log below as I cannot work out how to solve this.
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:136:in `initialize!'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `block in eager_load!'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:436:in `eager_load!'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `each'
2013-02-12T16:57:40+00:00 app[web.1]: /app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `instance_exec'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `run'
2013-02-12T16:57:40+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-02-12T16:57:40+00:00 app[web.1]: from script/rails:6:in `require'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:313:in `depend_on'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config.ru:in `new'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `run_initializers'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `each'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:46:in `app'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:70:in `start'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `tap'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-02-12T16:57:40+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `<top (required)>'
2013-02-12T16:57:41+00:00 heroku[web.1]: Process exited with status 1
2013-02-12T16:57:41+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-12T16:57:41+00:00 heroku[web.1]: State changed from crashed to starting
2013-02-12T16:57:48+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 8575`
2013-02-12T16:58:03+00:00 app[web.1]: => Booting WEBrick
2013-02-12T16:58:03+00:00 app[web.1]: => Rails 3.2.10 application starting in production on http://0.0.0.0:8575
2013-02-12T16:58:03+00:00 app[web.1]: => Call with -d to detach
2013-02-12T16:58:03+00:00 app[web.1]: => Ctrl-C to shutdown server
2013-02-12T16:58:03+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-02-12T16:58:03+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2013-02-12T16:58:06+00:00 app[web.1]: provide a secret to prevent exploits that may be possible from crafted
2013-02-12T16:58:06+00:00 app[web.1]: cookies. This will not be supported in future versions of Rack, and
2013-02-12T16:58:06+00:00 app[web.1]: SECURITY WARNING: No secret option provided to Rack::Session::Cookie.
2013-02-12T16:58:06+00:00 app[web.1]: This poses a security threat. It is strongly recommended that you
2013-02-12T16:58:06+00:00 app[web.1]: future versions will even invalidate your existing user cookies.
2013-02-12T16:58:06+00:00 app[web.1]:
2013-02-12T16:58:06+00:00 app[web.1]: Called from: /app/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.10/lib/action_dispatch/middleware/session/abstract_store.rb:28:in `initialize'.
2013-02-12T16:58:06+00:00 app[web.1]:
2013-02-12T16:58:10+00:00 app[web.1]: Exiting
2013-02-12T16:58:10+00:00 app[web.1]: /app/app/controllers/admin/users_controller.rb:1:in `<top (required)>': superclass mismatch for class UsersController (TypeError)
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:359:in `require_or_load'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:313:in `depend_on'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:225:in `require_dependency'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:439:in `block (2 levels) in eager_load!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `block in eager_load!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `instance_exec'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1
/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `run_initializers'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:438:in `each'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:436:in `each'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/engine.rb:436:in `eager_load!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:30:in `run'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application/finisher.rb:53:in `block in <module:Finisher>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/application.rb:136:in `initialize!'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `block in require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:236:in `load_dependency'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config.ru:3:in `block in <main>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config.ru:in `new'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/initializable.rb:54:in `each'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.10/lib/active_support/dependencies.rb:251:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config/environment.rb:5:in `<top (required)>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/config.ru:in `<main>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:46:in `app'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands/server.rb:70:in `start'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `tap'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:55:in `block in <top (required)>'
2013-02-12T16:58:10+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.10/lib/rails/commands.rb:50:in `<top (required)>'
2013-02-12T16:58:10+00:00 app[web.1]: from script/rails:6:in `require'
2013-02-12T16:58:10+00:00 app[web.1]: from script/rails:6:in `<main>'
2013-02-12T16:58:11+00:00 heroku[web.1]: Process exited with status 1
2013-02-12T16:58:11+00:00 heroku[web.1]: State changed from starting to crashed
2013-02-12T16:58:13+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=guidelines.herokuapp.com fwd=122.149.95.138 dyno= queue= wait= connect= service= status=503 bytes=
2013-02-12T16:58:14+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=guidelines.herokuapp.com fwd=122.149.95.138 dyno= queue= wait= connect= service= status=503 bytes=
My admin usercontroller.rb is
class Admin::UserController < ApplicationController
def index
end
def new
end
end
Do you have an Admin Module or Class? I've setup similar controllers like so:
admin_controller.rb in the controllers/ folder:
class AdminController < ApplicationController
...
end
and then a sub controller for Users in controllers/admin/users_controller.rb:
class Admin::UsersController < AdminController
def index
end
def new
end
end
Then in your routes you scope or namespace appropriately:
#routes.rb
namespace :admin
resource :users
end
See "Controller Namespaces and Routing" for the specific routing you need.
Thanks - I managed to resolve this.
I had a conflict with an unnecessary user_controller.rb in an admin folder when I was using activeadmin.
All solved.
I am getting am error when running rake db:migrate. I have recently added a gem gcm_on_rails after this only I am getting the error.
rake aborted!
Don't know how to build task 'rails_env'
Tasks: TOP => db:migrate => db:load_config
Please help
rake aborted!
Don't know how to build task 'rails_env'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:60:in `lookup_prerequisite'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:56:in `block in prerequisite_tasks'
/Users/test/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:56:in `collect'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:56:in `prerequisite_tasks'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/.rvm/gems/ruby-1.9.2-p320#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/test/.rvm/gems/ruby-1.9.2-p320#global/bin/rake:19:in `load'
/Users/test/.rvm/gems/ruby-1.9.2-p320#global/bin/rake:19:in `<main>'
Tasks: TOP => db:migrate => db:load_config
For using the rake task specified in the gem, I have added the below code in my application controller. This was causing the issue. When I removed it, its working fine.
require 'rake'
Rake::Task.clear
MyAPP::Application.load_tasks
I would like to automatically inject a route from my gem to the host app using a railtie. So far I have something like this:
module Fabes
class FabesRailtie < ::Rails::Railtie
ActionController::Base.send :include, Fabes::Helper
ActionController::Base.helper Fabes::Helper
initializer 'fabes.routes', after: :after_initialize do |app|
app.routes.draw do
match '/fabes' => Fabes::Admin, as: :fabes_admin
end
end
end
end
This is working (is getting called from the host app) but when I try to access the /fabes route or just list the routes, it is failing with a devise error:
fuzzyalej#fuzzyalej:~/code/fabes-rails-example (master *)$ rake routes --trace
** Invoke routes (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `failure_app=' for nil:NilClass
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/devise-2.1.2/lib/devise.rb:406:in `configure_warden!'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/devise-2.1.2/lib/devise/rails/routes.rb:20:in `finalize_with_devise!'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/actionpack-3.2.6/lib/action_dispatch/routing/route_set.rb:261:in `draw'
/Users/fuzzyalej/code/fabes/lib/fabes/railtie.rb:7:in `block in <class:FabesRailtie>'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `instance_exec'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:30:in `run'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `each'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/initializable.rb:54:in `run_initializers'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:136:in `initialize!'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/fuzzyalej/code/fabes-rails-example/config/environment.rb:5:in `<top (required)>'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `block in require'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.6/lib/active_support/dependencies.rb:251:in `require'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:103:in `require_environment!'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/railties-3.2.6/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/bin/rake:23:in `load'
/Users/fuzzyalej/.rbenv/versions/1.9.3-p194/bin/rake:23:in `<main>'
Tasks: TOP => routes => environment
I don't know if I can inject a route directly like this or instead I would have to use a generator..
Any thoughts on the issue?
Defining your routes in your gem's route.rb file and then mounting the engine is the way to go in this case.
The "official guide":
http://edgeguides.rubyonrails.org/engines.html
And of course, there's a RailsCast episode covering what you likely need:
http://railscasts.com/episodes/277-mountable-engines
Hope this helps.
(RoR with Rails 3.1, gem rake 0.9.2.2)
I'm trying to run the most basic custom rake task as you can see here:
task :update_me => :environment do
Product.all.each do |product|
puts product.link
end
end
I keep getting the error below. The task will run if I just print out hello world and take out the ":environment" part. My rake task seems to be having trouble with the ":environment" part of this, but I need this to access my models.
rake aborted!
missing :controller
Tasks: TOP => update_me => environment
(See full trace by running task with --trace)
trace:
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:179:in `default_controller_and_action'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:76:in `normalize_options!'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:59:in `initialize'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:1302:in `new'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:1302:in `add_route'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:1282:in `decomposed_match'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:1268:in `block in match'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:1268:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:1268:in `match'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:505:in `map_method'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/mapper.rb:467:in `get'
/home/ubuntu/code/preevio/config/routes.rb:35:in `block in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:260:in `draw'
/home/ubuntu/code/preevio/config/routes.rb:1:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `block in load'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:245:in `load'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:40:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:40:in `load_paths'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:16:in `reload!'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:26:in `block in updater'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/file_update_checker.rb:78:in `call'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/file_update_checker.rb:78:in `execute'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:27:in `updater'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/ubuntu/code/preevio/config/environment.rb:5:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/railties-3.2.3/lib/rails/application.rb:292:in `block (2 levels) in initialize_tasks'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/ubuntu/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `block in invoke_with_call_chain'
/home/ubuntu/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/bin/rake:19:in `load'
/home/ubuntu/.rvm/gems/ruby-1.9.2-p290#rails31/bin/rake:19:in `<main>'
The backtrace seems to indicate an error in the routes file, which is loaded when you require the environment.
In these cases, running rake routes will bring further information on the problem.