This is a follow up to http://timwise.blogspot.co.uk/2013/05/installing-ruby-2-rails-4-on-ubuntu.html and is just a list of steps needed to get a clean install of Ubuntu up to speed with an existing site.
- Install rbenv to manage ruby versions
- https://github.com/sj26/rbenv-install
- git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
- Install ruby-build to manage installation of ruby versions into rbenv
- https://github.com/sstephenson/ruby-build
- git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
- For convenience install dotmatrix - this will set up the rbenv environment correctly, amongst other things
- clone https://github.com/timabell/dotmatrix
- run bin/install
- restart any running terminal(s) to get rbenv
- get a project (includes a .ruby-version file for rbenv, and a Gemfile for bundle)
- git clone git@github.com:timabell/symbol-library.git
- sudo apt-get install libssl-dev libreadline-dev
- readline is needed for rails console, and has to be installed before ruby. If you've already installed ruby then just re-run rbenv install and it will overwrite the existing build with a version with readline support. ref: http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/
- rbenv install x.x.x-xxxx
- autocompletes, yay!
- .. or better still reads from .ruby-version I think so you can just run `rbenv install` if you are in the project folder
- gem install bundler
- from the right directory so done for right ruby version
- rbenv rehash
- bundle
- will install all the gems for the project
don't sudo apt-get install rbenv ~doesn't provide sufficiently up to date rubygem install rails --version 4.0.2 --no-ri --no-rdoc ~don't need this when you have a gem file with rails in it, bundle will do it for you- sudo apt-get install nodejs
- for javascript runtime (rails server throwing an error without this)
- bundle exec rails server
- bundle exec rails console
- needs readline (see above)
Other stuff I like in my install
- dotmatrix bin/vimbundles
- includes vim-rails and friends
- full list https://github.com/timabell/dotmatrix/blob/master/bin/vimbundles.sh#L45
- console colours from bin/solarize.sh in dotmatrix/bin
- tmux
This is mostly for my own reference but maybe it'll help someone else out.