How can I uprgade the Ruby version installed on my passenger module for Apache?
I on Debian 7 and it's running Ruby 1.9.1 but I want 2.2.0
How can I uprgade the Ruby version installed on my passenger module for Apache?
I on Debian 7 and it's running Ruby 1.9.1 but I want 2.2.0
First you have to install a newer Ruby version. You can do that using rbenv with ruby-build or RVM. I've found the former to be a little more simple to use and less intrusive. Simply install rbenv and ruby-build according to the documentation, then:
rbenv install 2.2.0
Once you've installed it, set your global Ruby to 2.2.0 (or whatever the name of the Ruby is you installed):
rbenv global 2.2.0
You need to reload your shell for this to take effect. Note that which ruby will only give you the path to a so-called shim, not the actual Ruby interpreter. To find out the path, simply modify the line below, changing 2.2.0 to whatever version you installed.
Now, in the Passenger configuration, change the PassengerRuby option for your virtual host, e.g.
PassengerRuby /usr/local/rbenv/versions/2.2.0/bin/ruby
Reload the server, and you should be done.