After installing ruby on my shell server I noticed that all the commands are
suffixed w/ 1.9.1 which makes it a pain when writing scripts because
you have to do #!/usr/bin/ruby1.9.1 instead of #!/usr/bin/env ruby.
I found you can use update-alternatives to set the correct file associations.
suffixed w/ 1.9.1 which makes it a pain when writing scripts because
you have to do #!/usr/bin/ruby1.9.1 instead of #!/usr/bin/env ruby.
I found you can use update-alternatives to set the correct file associations.
sudo apt-get install ruby1.9.1 irb1.9.1 ruby1.9.1-examples rdoc1.9.1 ri1.9.1 rubygems1.9.1 sudo update-alternatives --remove-all gem sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \ --slave /usr/bin/ri ri /usr/bin/ri1.9.1 \ --slave /usr/bin/erb erb /usr/bin/erb1.9.1 \ --slave /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1 \ --slave /usr/bin/gem gem /usr/bin/gem1.9.1 \ --slave /usr/bin/irb irb /usr/bin/irb1.9.1 \ --slave /usr/share/man/man1/ruby.1.gz ruby.1.gz \ /usr/share/man/man1/ruby1.9.1.1.gz \ --slave /usr/share/man/man1/gem.1.gz gem.1.gz \ /usr/share/man/man1/gem1.9.1.1.gz \ --slave /etc/bash_completion.d/gem bash_completion_gem \ /etc/bash_completion.d/gem1.9.1
There are no comments on this entry. (Reply.)