0

当然,你们都听说过 Rails 中需要更新的最新安全漏洞。我目前使用的是 2.3.14 版本的 Rails,因此尝试更新到 2.3.15(修补版本)。

在我的本地机器上,这个过程真的很顺利。但是在将更改推送到 Heroku 并等待部署之后,我的应用程序没有启动。它在日志中说

RubyGem version error: rails(2.3.15 not = 2.3.14)

不,怎么会这样?我的Gemfile

gem 'rails', '~> 2.3.15'

Gemfile.lock

GEM
  specs:
    rails (2.3.15)

最后,Heroku 告诉我

Installing rails (2.3.15)

真的,问题出在哪里?其他人有这个问题吗?

解决方案

查尔斯的答案包括解决方案,即将in更新RAILS_GEM_VERSION为.2.3.15config/environment.rb

重要通知

如果您有同样的烦恼,请立即使用建议的解决方案 之一。已知 Rails 应用程序损坏的案例!

4

1 回答 1

0

It seems like you also need to do change RAILS_GEM_VERSION to 3.2.15 in environment.rb:

If you find yourself having to do the whole upgrading process over again, you can follow these steps:

  • Run your tests and make sure everything works
  • Open up a new branch through git (git checkout -b new_rails)
  • Change Rails 3.2.15 in your Gemfile
  • Change RAILS_GEM_VERSION to '3.2.15' in environment.rb
  • Run bundle update rails
  • Run the tests and see if everything still works
  • If not, reverse back to the old branch by doing git checkout master; optionally delete the new branch by doing git branch -D new_rails

Taken from this question: Site dead. "ACTION REQUIRED: Rails Security Vulnerability "

于 2013-01-12T22:45:36.533 回答