问题描述
我从生产服务器上的RVM迁移到rbenv.我使用"rvm implode"卸载了rvm并安装了rbenv,ruby 1.9.2,rails,passenger和nginx-module.除了按如下方式更改passenger_root之外,我还没有修改我的原始nginx.conf:
I moved from RVM to rbenv on my production server. I uninstalled rvm using "rvm implode" and installed rbenv, ruby 1.9.2 , rails, passenger and nginx-module.I have not modified my originlal nginx.conf apart from changing the passenger_root as follows:
1st Try:
passenger_root /root/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/passenger-3.0.9;
passenger_ruby /root/.rbenv/versions/1.9.2-p290/bin/ruby;
2nd Try:
passenger_root /root/.rbenv/shims/passenger;
passenger_ruby /root/.rbenv/shims/ruby;
现在,当我尝试运行我的应用程序时,我在error.log中看到以下错误:
Now, when I try to run my application I see the following error in error.log:
[error] 1291#0: *105 open() "/home/passenger/grabber/current/public/view" failed (2: No such file or directory)
这清楚地表明乘客尚未下车,并且我的rails应用程序未被识别.当我尝试手动启动乘客时,出现以下错误:
This clearly indicates that passenger has not launched and my rails app is not recognized. When I try to manually start passenger, I get the following error:
[ pid=17605 thr=70022120 file=utils.rb:176 time=2011-10-23 23:40:41.917 ]: *** Exception LoadError in PhusionPassenger::Rack::ApplicationSpawner (libruby.so.1.9: cannot open shared object file: No such file or directory - /home/passenger/grabber/shared/bundle/ruby/1.9.1/gems/nokogiri-1.5.0/lib/nokogiri/nokogiri.so) (process 17605, thread #<Thread:0x858e7d0>):
from /home/passenger/grabber/shared/bundle/ruby/1.9.1/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:239:in `require'
我已经多次安装了nokogiri,并且可以在我的宝石列表中看到nokogiri.我不确定为什么搬到rbenv会伤害我的乘客.
I have installed nokogiri several times and I can see nokogiri in my gem list. I am not sure why moving to to rbenv has broken passenger for me.
推荐答案
passenger和rbenv之间似乎不兼容(请确保在脚步射击之前先知道这一点)-因此我删除了rbenv并移回了RVM ...
There seems to be no compatibility between passenger and rbenv (make sure you know this before you shoot yourself in the foot) - so I removed rbenv and moved back to RVM...
这篇关于迁移到rbenv会破坏乘客(nginx)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!