Upgrading Ruby on Ubuntu (from package to source)
Posted by ben, Wed Jan 23 11:01:00 UTC 2008
We recently updgraded from ruby 1.8.4 to 1.8.6 on our production servers. When we did we went from the package manager versions of ruby to a source install, bedlam followed. Gems that required native extensions were no longer working properly and flames were pouring from the machines. So here is a list of actions to help anyone else wanting to upgrade on an Ubuntu machine.
- remove all gems ( sudo gem list, gem uninstall
) - remove all ruby related packages ( dpkg—list | grep ruby, dpkg -r
) - download ruby and rubygems src
- extract and install ruby ( ./configure—prefix=/usr , make , sudo make install )
- extract and install rubygems ( sudo ruby setup.rb )
- install gems ( sudo gem install
)