Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vmiheer/2265268 to your computer and use it in GitHub Desktop.
Save vmiheer/2265268 to your computer and use it in GitHub Desktop.
Setting up RAILS on Ubuntu
STEP 1:
$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
STEP 2:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
STEP 3:
$ source ~/.bash_profile
STEP 4:
$ rvm install 1.9.3
STEP 5:
$ echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc && source ~/.bashrc
STEP 6: (check if 'rvm' is installed properly)
$ type rvm | head -1
it should give
rvm is a function
STEP 7:
$ gem install -V rails -v 3.2
Done!
STEP 8: (RAILS is already installed but you need these for the workshop)
$ sudo apt-get install sqlite3 libsqlite3-dev git
@vmiheer
Copy link
Author

vmiheer commented Mar 31, 2012

@ step 3 I had to do
$ source .bashrc
Ubuntu 11.10

@vmiheer
Copy link
Author

vmiheer commented Mar 31, 2012

rvm use 1.9.3@rails3tutorial2ndEd --create --default
we have to use something like this for using local ruby installation in case one has installed ruby previously using apt.
Ubuntu doesn't remove properly the gem command it'll point to /usr/bin/gem causing error in installing rails access denied error.

@vmiheer
Copy link
Author

vmiheer commented Mar 31, 2012

For ubuntu also install
$ sudo apt-get install nodejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment