Ruby: install into custom directory
To install Ruby into a custom directory, we use the
configure tool with the
--prefix flag like this:
./configure --prefix=/foo/bar
make && make install
To install Ruby version 1.9.2 patch level 180 into its own directory:
./configure --prefix=/opt/ruby/192p180
make && make install
To skip the documenation:
./configure --prefix=/opt/ruby/192p0 --disable-install-doc
make && make install
We also want to distinguish the Ruby programs (i.e. commands) that are installed, so we use the
--program-suffix flag like this:
./configure --prefix=/opt/ruby/192p180 --program-suffix=192p180 --disable-install-doc
make && make install
What's Next?
blog comments powered by