rvm ruby​​ 1.9.2和Rails 3.1无法启动服务器

时间:2022-05-27 23:29:10

Im using rvm use 1.9.2 then when trying to run rails s I'm getting the following error.

我使用rvm使用1.9.2然后当尝试运行rails时我收到以下错误。

/Users/pel/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.1.0.rc5/lib/action_view/railtie.rb:34:in `block (3 levels) in <class:Railtie>': undefined method `debug_rjs=' for ActionView::Base:Class (NoMethodError)

2 个解决方案

#1


23  

Check your config/environments/development.rb file, you probably have this line:

检查你的config / environments / development.rb文件,你可能有这一行:

config.action_view.debug_rjs = true

Remove it. Probably best to search your entire project for any debug_rjs references and remove them all.

去掉它。可能最好在整个项目中搜索任何debug_rjs引用并将其全部删除。

#2


4  

That method is used to wrap RJS responses in a try/catch block. It was removed in this commit to the Rails source. And it seems as if you are now getting an error from action_view when it trys to set the configuration from the application with this method.

该方法用于在try / catch块中包装RJS响应。它在此提交中删除了Rails源。现在看来,当它尝试使用此方法从应用程序设置配置时,您现在正在从action_view中收到错误。

Check your application configuration and remove any line that looks like this:

检查您的应用程序配置并删除任何如下所示的行:

config.action_view.debug_rjs = true

It should be in your development config at config/environments/development.rb

它应该在config / environments / development.rb的开发配置中

#1


23  

Check your config/environments/development.rb file, you probably have this line:

检查你的config / environments / development.rb文件,你可能有这一行:

config.action_view.debug_rjs = true

Remove it. Probably best to search your entire project for any debug_rjs references and remove them all.

去掉它。可能最好在整个项目中搜索任何debug_rjs引用并将其全部删除。

#2


4  

That method is used to wrap RJS responses in a try/catch block. It was removed in this commit to the Rails source. And it seems as if you are now getting an error from action_view when it trys to set the configuration from the application with this method.

该方法用于在try / catch块中包装RJS响应。它在此提交中删除了Rails源。现在看来,当它尝试使用此方法从应用程序设置配置时,您现在正在从action_view中收到错误。

Check your application configuration and remove any line that looks like this:

检查您的应用程序配置并删除任何如下所示的行:

config.action_view.debug_rjs = true

It should be in your development config at config/environments/development.rb

它应该在config / environments / development.rb的开发配置中