简体   繁体   English

我以为我升级了Rails版本,但是没有用

[英]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.

相关问题 MYSQL 生成我在 Rails 应用程序中没有要求的查询 - MYSQL generating queries I didn't ask for in my Rails application 我不明白的几个Rails问题 - Couple of Rails issues that i didn't understand Rails正在发送我没有做过的参数 - Rails is sending params that i didn't make Rails:如何将 class 添加到此图像 src 代码中? 将 div 标签放在它周围是行不通的 - Rails: how do I add a class to this image src code? Putting div tags around it didn't work Ruby on Rails:刚刚升级到Rails3。我的某些链接不起作用 - Ruby on Rails: just upgraded to rails 3. some of my links don't work 安装Rails-即使我没有,我也没有 - Installing Rails - It says I didn't even though I did 每当我提出请求时,Rails都会向我显示此消息,我尝试在根目录中放置2个png图像,但没有用 - Rails is showing me this message every time that I do a request, I tried putting 2 png images in the root directory but It didn't work 当我仍然在2.3.8上时,如何使用升级为在Rails 3上工作的gem? - How can I use a gem upgraded to work on Rails 3 when I am still on 2.3.8? 我复制到我的Rails模型的正则表达式不起作用? - Regex I copied into my Rails model won't work? crontab在Rails rake任务中不起作用 - crontab didn't work in Rails rake task
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM