[英]I thought I upgraded my Rails version, but it didn't work
I have an app running on Rails 2.3.3. 我有一个在Rails 2.3.3上运行的应用程序。
I edited my environment.rb 我编辑了environment.rb
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
Then performed rake rails:update
然后执行
rake rails:update
In my console: 在我的控制台中:
>> Rails.version
2.3.3
What am I forgetting to do? 我忘了做什么?
Try manually installing rails 2.3.8 尝试手动安装滑轨2.3.8
gem install rails -v=2.3.8
In some env's this works better (I found this to be the case when using rvm). 在某些环境中,这种方法效果更好(我发现在使用rvm时就是这种情况)。
尝试执行“捆绑更新”,这将更新锁定文件。
You probably just froze your rails gems into your project. 您可能只是将rails gems冻结到了项目中。 This will force the application to load the frozen version.
这将强制应用程序加载冻结版本。 Just remove vendor/rails and you should be all set.
只需移除供应商/滑轨,您便已准备就绪。 Then you can freeze 2.3.8 if you need to.
然后,您可以根据需要冻结2.3.8。 Is there a reason you aren't just going to 2.3.11?
您是否有理由不只是去2.3.11?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.