configurable.rb:30:在`method_missing'中:rails app的未定义方法`development'

时间:2012-03-31 15:05:13

标签: ruby-on-rails ruby foreman

我是在OSX机器上运行Ruby 1.9.2的新手,当我转向使用Thin时,我得到以下错误(值得一提的是我在一个全新的rails应用程序上使用了gemset并且它工作,所以我知道它与我写的代码或配置有关

就我安装的宝石而言:

gem 'rails', '3.2.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'thin'
gem 'pg'
gem 'tire'
gem 'newrelic_rpm'
gem 'devise'

这是运行'rails c'时出现的错误

/Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing': undefined method `development' for #<My::Application:0x007fa4fd937fe8> (NoMethodError)
    from /Users/me/Dropbox/2_Development/rails_projects/my/config/environments/development.rb:9:in `block in <top (required)>'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:24:in `class_eval'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:24:in `configure'
    from /Users/me/Dropbox/2_Development/rails_projects/my/config/environments/development.rb:1:in `<top (required)>'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/engine.rb:571:in `block in <class:Engine>'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/me/Dropbox/2_Development/rails_projects/my/config/environment.rb:5:in `<top (required)>'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
    from /Users/me/.rvm/gems/ruby-1.9.2-p318/gems/railties-3.2.3/lib/rails/commands.rb:40:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

请帮助......这让我疯狂......或者指出我自己如何调试问题

0 个答案:

没有答案