我最近開始在新項目中生成控制器,型號和啓動軌服務器時遇到問題。我可以在舊項目中完成所有這些工作。無法生成控制器,型號或啓動軌服務器
可以做些什麼來解決這個錯誤?
操作系統:Ubuntu的15.04,紅寶石:2.1時,Rails:4.2.0
錯誤輸出:
[email protected]:~/testRails/blog$ rails g controller pages
Warning: Running `gem pristine --all` to regenerate your installed gemspecs (and deleting then reinstalling your bundle if you use bundle --path) will improve the startup performance of Spring.
/var/lib/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie/configuration.rb:95:in `method_missing': undefined method `active_record' for #<Rails::Application::Configuration:0x00000002ec6c40> (NoMethodError)
from /home/aditya/testRails/blog/config/application.rb:24:in `<class:Application>'
from /home/aditya/testRails/blog/config/application.rb:10:in `<module:Blog>'
from /home/aditya/testRails/blog/config/application.rb:9:in `<top (required)>'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:82:in `require'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:82:in `preload'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /var/lib/gems/2.1.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
編輯:我取下導軌完全和再次進行安裝。但沒有效果,仍然有這個錯誤。
是,捆綁安裝運行良好。但生成命令和啓動軌服務器不起作用。 –