Phusion Passenger: `no such file to load — bundler`

北城以北 提交于 2020-01-06 08:56:29

问题


So here's the problem. I'm trying to get my Rails 3.2.8 app running on justhost.com's web hosting platform. The app works fine on WEBrick when I ssh into the server and run rails s, but passenger (the server platform provided by justhost) is having some issues.

There seem to be a lot of other posts on Stackoverflow where users were having this same problem. I tried as many of the proposed solutions as I could find, but none of them were able to solve my problem. My web hosting service's customer support wasn't able to help either:

The type of support which you are requesting is more in depth with designing and developing your site than we are able to provide.

So yeah, I'd really appreciate it if someone here could help me with this. Here's the error message I'm getting:

Here's some other info you might find relevant:

webgemla@webgemlabs.com [~]# which rails
/home3/webgemla/.rvm/gems/ruby-1.9.3-p194/bin/rails
webgemla@webgemlabs.com [~]# which ruby
/home3/webgemla/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
webgemla@webgemlabs.com [~]# which bundle
/home3/webgemla/.rvm/gems/ruby-1.9.3-p194/bin/bundle
webgemla@webgemlabs.com [~]# which rake
/home3/webgemla/.rvm/gems/ruby-1.9.3-p194/bin/rake
webgemla@webgemlabs.com [~]# which gem
webgemla@webgemlabs.com [~]# which rvm
webgemla@webgemlabs.com [~]# gem -v
1.8.24
webgemla@webgemlabs.com [~]# rvm -v

rvm 1.15.8 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

webgemla@webgemlabs.com [~]# echo $PATH
/home3/webgemla/.rvm/gems/ruby-1.9.3-p194/bin:/home3/webgemla/.rvm/gems/ruby-1.9.3-p194@global/bin:/home3/webgemla/.rvm/rubies/ruby-1.9.3-p194/bin:/home3/webgemla/.rvm/bin:/usr/local/jdk/bin:/home3/webgemla/perl5/bin:/usr/lib64/qt-3.3/bin:/ramdisk/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11R6/bin:/home3/webgemla/ruby/gems/bin:/home3/webgemla/ruby/gems:/home3/webgemla/bin
webgemla@webgemlabs.com [~]# ls -ld .rvm
drwxr-xr-x 24 webgemla webgemla 4096 Sep  3 13:51 .rvm/

Strangely enough, which rvm and which gem print nothing (Could that have something to do with my problem?), but the rvm and gem commands run just fine. I could really use some help with this one... =(


回答1:


I was able to fix this by setting GEM_HOME in my .htaccess file:

SetEnv GEM_HOME /home3/webgemla/.rvm/gems/ruby-1.9.3-p194

I'm experiencing other problems now (i.imgur.com/cMMmW.png), but at least this one seems to be solved.




回答2:


This is documented in the rvm documentation https://rvm.io/integration/passenger/



来源:https://stackoverflow.com/questions/12253724/phusion-passenger-no-such-file-to-load-bundler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!