Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created April 28, 2014 19:06
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtimberman/1c9cfee514644a04f9c2 to your computer and use it in GitHub Desktop.
Save jtimberman/1c9cfee514644a04f9c2 to your computer and use it in GitHub Desktop.
Installing a system Ruby 2.0 on Ubuntu 14.04, because they won't fix the bug and `update-alternatives` "doesn't support Ruby."
ubuntu@ruby20:~$ which ruby
/usr/bin/ruby
ubuntu@ruby20:~$ ruby --version
ruby 2.0.0p384 (2014-01-12) [x86_64-linux-gnu]
# As a chef recipe:
package "ruby2.0"
%w{erb gem irb rake rdoc ri ruby testrb}.each do |rb|
link "/usr/bin/#{rb}" do
to "/usr/bin/#{rb}2.0"
end
end
# As a shell script:
sudo apt-get install ruby2.0
for i in erb gem irb rake rdoc ri ruby testrb
do
sudo ln -sf /usr/bin/${i}2.0 /usr/bin/${i}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment