Moving to rbenv breaks passenger (nginx)

情到浓时终转凉″ 提交于 2019-11-30 02:26:43

It is possible to use rbenv, nginx and passenger. Some have gone for a system-wide install. http://blakewilliams.me/blog/4-system-wide-rbenv-install

I'm currently testing on my development environment so, assuming you have installed rbenv and have the correct rbenv init in your .bashrc:

gem install passenger
rbenv rehash
sudo bash -c "source ~/.bashrc && passenger-install-nginx-module"

You must gem install passenger to get the shims. Doing bundle install to install passenger won't give you these.

Finally:

passenger-config --root

will give you your passenger_root path and:

rbenv which ruby

your passenger_ruby path.

The passenger shim points to the executable but passenger_root must be a path to the folder. I've tried using the ruby shim but it doesn't work. I've not dug into why yet.

BTW, I do have the nokogiri gem in my Gemfile. Oh, also if you have .rvmrc and/or config/setup_load_paths.rb it should be safe to remove these as passenger autoloads bundler.

I still need to do a bit more testing on this but so far so good.

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...

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