Moving to rbenv breaks passenger (nginx)

前端 未结 2 1971
名媛妹妹
名媛妹妹 2020-12-28 10:43

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 mo

相关标签:
2条回答
  • 2020-12-28 11:09

    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.

    0 讨论(0)
  • 2020-12-28 11:21

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

    0 讨论(0)
提交回复
热议问题