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

查看:184
本文介绍了Phusion乘客错误:您已激活机架1.2.1,但您的Gemfile需要机架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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆