How do I specify a version of Ruby for Rails without using RVM?
I am using Xubuntu 11.10, which comes with Ruby 1.8. I have installed Ruby 1.9 package, and updated the alternatives so ruby -version
returns ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
. Rails still seems to be using 1.8 however, so how can I tell it to use Ruby 1.9 instead? I don't want to uninstall Ruby 1.8 since that will remove a bunch of other stuff as well.
I know similar SO questions have been answered with "use RVM". I can't do this - it has a dependency on libreadline-gplv2-dev
package, which conflicts with libreadline-dev
which r-base-dev
depends on.
It seems I need to update the gem command to use the 1.9 version as well as ruby, then I can install rails through that. But to install rails, I need the dev headers for ruby. The following commands should work for others: