[英]LoadError (cannot load such file — static_helper.rb):
I'm trying to upgrade an old rails 2.3 app to 2.3.15 and I'm getting the following error after changing the RAILS_GEM_VERSION line in environment.rb 我正在尝试将旧的Rails 2.3应用程序升级到2.3.15,并且更改了environment.rb中的RAILS_GEM_VERSION行之后,出现以下错误
LoadError (cannot load such file -- static_helper.rb):
app/controllers/static_controller.rb:1:in `<top (required)>'
<internal:prelude>:10:in `synchronize'
/Users/bob/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/Users/bob/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/Users/bob/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
Are you using bundler? 您正在使用捆绑器吗? ( http://gembundler.com/rails23.html ).
( http://gembundler.com/rails23.html )。
I had a different error updating an old rails 2.3 app to 2.3.15 that I was able to work around by setting up bundler and removing config.gem
lines from config/environment.rb
我将旧的Rails 2.3应用程序更新为2.3.15时遇到了另一个错误,可以通过设置捆绑器并从
config/environment.rb
删除config.gem
行来解决此config/environment.rb
Nevermind that Bundler advice, I bet the StaticController
expects to find a corresponding helper file. 没关系,没有Bundler的建议,我敢打赌,
StaticController
希望找到一个相应的帮助文件。 Try creating a file called app/helpers/static_helper.rb
: 尝试创建一个名为
app/helpers/static_helper.rb
的文件:
module StaticHelper
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.