Passenger installation with nginx fails

筅森魡賤 提交于 2019-11-30 03:17:32
Rollo Tomazzi

A bit late for an answer I guess, but actually, the correct way of running the Phusion Passenger installer for nginx, when using RVM, is to use rvmsudo as in:

rvmsudo passenger-install-nginx-module

Credits go to this blog post,

I got it working with

rvmsudo `which passenger-install-nginx-module`
adantj

according to this issue on github: https://github.com/wayneeseguin/rvm/issues/1307

seems like you have to do full path:

this worked for me:

which passenger-install-nginx-module

rvmsudo ~/.rvm/gems/ruby-1.9.3-p327-new/gems/passenger-3.0.18/bin/passenger-install-nginx-module

apparently, the gem is installed in a place that's off the path, according to

http://groups.google.com/group/phusion-passenger/browse_thread/thread/78ca12c4838034a6/b5a3c7a00a871283?lnk=gst&q=ubuntu+9.10#b5a3c7a00a871283

Frustrating error, which is why I leave this question rather than delete it (and, with the upvote, I think I'm not the only one with the problem).

I had a similar issue. You need to add gems to your system PATH, paste this into your shell:

export PATH=$PATH:$HOME/bin:/var/lib/gems/1.8/bin

or, to make it permanent add it to your bashrc, usually here: ~/.bashrc

You can also execute just passenger-install-nginx-module by going to the directory at: /var/lib/gems/1.8/bin

Good luck!

I know you already answered the question, but figured I'd chime in with a cent or two.

I recently did a similar nginx install, but chose to go with RVM for managing Ruby versions, which requires us to NOT use sudo.

I recommend this route because all versions of Ruby and all your gems are organized neatly in your home directory. Doing so will also require you to compile nginx manually, which certainly helps understand the pipes a little.

You can compile nginx manually using the "--add-module=/home/user/path_to_passenger_gem/ext," but you'll want to read up RVM's instructions very carefully...really, don't skip a line as they are very concise.

Here's a link to RVM's instructions:

http://rvm.beginrescueend.com/passenger/

and to the Nginx manual instructions (which you probably already skimmed).

http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_installing_phusion_passenger_for_nginx_manually

Dimitris

I have got a bit of information on my blog regarding setting up nginx with passenger (and ssl in this case). Perhaps it is of use since it goes through the whole process of recompiling nginx with options.

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