Phusion乘客错误:您已激活机架1.2.1,但您的Gemfile需要机架1.2.2 [英] Phusion Passenger Error: You have activated rack 1.2.1, but your Gemfile requires rack 1.2.2
问题描述
我试图在Dreamhost共享服务器上运行Ruby on Rails应用程序。目前为止,除了一个我无法解开的奇怪的错误外。
有时,当我访问web应用程序时,出现Phusion Passenger错误,
您已经启动机架1.2.1,但您的Gemfile需要机架1.2.2。考虑使用bundle exec。
当我刚刚刷新页面时,它似乎能够工作 - 没有更多的Phusion Passenger错误消息。 p>
如果ENV ['RAILS_ENV'] =='生产'#对开发
不打扰ENV ['GEM_PATH'] ='/ home /myusername/.gems'+':/usr/lib/ruby/gems/1.8'
结束
尝试在Gemfile中编辑后重新启动服务器,并放入: gem'rack','1.2.1'
I'm trying to run a Ruby on Rails app on a Dreamhost shared server. All is well so far except one weird bug I have not been able to unravel.
Sometimes when I visit the web app, I get presented with a Phusion Passenger error saying,
You have already activated rack 1.2.1, but your Gemfile requires rack 1.2.2. Consider using bundle exec.
When I just refresh the page it seems to work, though - no more Phusion Passenger error message.
Following other stack overflow threads and a similar Dreamhost wiki, I added the following to the top of the config/environment.rb
file:
if ENV['RAILS_ENV'] == 'production' # don't bother on dev
ENV['GEM_PATH'] = '/home/myusername/.gems' + ':/usr/lib/ruby/gems/1.8'
end
try to restart your server after edit in your Gemfile and put this: gem 'rack', '1.2.1'
这篇关于Phusion乘客错误:您已激活机架1.2.1,但您的Gemfile需要机架1.2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!