vendredi 10 juillet 2015

Ruby on Rails `method_missing': undefined method `active_record' 0x007f9413116e40

I keep having the following error message when i run rails server on my newly created rails project. I created it by running the command rails new toy_app.

Please guide me to how can i solve my problem. I have another rails project and i could run rails server . Is just not possible in my new project.

Error Message

/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/railtie/configuration.rb:95:in
`method_missing': undefined method `active_record' for
#<Rails::Application::Configuration:0x007f9413116e40> (NoMethodError)   from /Users/judobear/toy_app/config/application.rb:24:in
`<class:Application>'   from
/Users/judobear/toy_app/config/application.rb:10:in `<module:ToyApp>'
  from /Users/judobear/toy_app/config/application.rb:9:in `<top
(required)>'  from
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in
`require'   from
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:78:in
`block in server'   from
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in
`tap'   from
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:75:in
`server'  from
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb:39:in
`run_command!'  from
/Library/Ruby/Gems/2.0.0/gems/railties-4.2.2/lib/rails/commands.rb:17:in
`<top (required)>'  from /Users/judobear/toy_app/bin/rails:8:in
`require'   from /Users/judobear/toy_app/bin/rails:8:in `<top
(required)>'  from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in
`load'  from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/rails.rb:27:in
`call'  from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client/command.rb:7:in
`call'  from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/client.rb:26:in
`run'   from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/bin/spring:48:in `<top
(required)>'  from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in
`load'  from
/Library/Ruby/Gems/2.0.0/gems/spring-1.1.3/lib/spring/binstub.rb:11:in
`<top (required)>'  from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'   from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'   from /Users/judobear/toy_app/bin/spring:13:in `<top
(required)>'  from bin/rails:3:in `load'  from bin/rails:3:in `<main>'

Aucun commentaire:

Enregistrer un commentaire