我无法打开我的rails控制台。我收到以下错误。
[ramya@sanduxvm01 tcm]$ rails console
/home/ramya/tcm/tcm/config/environment.rb:7: undefined local variable or method `config' for main:Object (NameError)
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:103:in `require_environment!'
from /usr/local/lib/ruby/gems/1.8/gems/railties-3.0.7/lib/rails/commands.rb:22
from script/rails:6:in `require'
from script/rails:6
答案 0 :(得分:2)
这可能是您的config / environment.rb文件中的错误配置!
仔细检查该文件的语法是否正确
此外:
config undefined in environment specific configuration files