public
Last active

Ruby + Rails setup

  • Download Gist
gem-installer.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/bash
RUBY_HEAD=1.9.3
 
# ------- NOTE: RUN THE rvm-installer.sh SCRIPT FIRST -------
 
# notes:
# - --with-gcc=clang required for OSX Lion
# - readline required to fix forward-delete in irb (see http://anthonymcook.com/post/9304734590/get-the-delete-key-working-in-irb-on-osx-with-two-lines)
rvm install $RUBY_HEAD --with-gcc=clang --with-readline-dir=`brew --prefix readline`
 
# install useful gems for use with IRB
rvm $RUBY_HEAD@global
gem install awesome_print builder bundler cheat compass pg powder rack rake thor wirble
 
# install Rails, and set this ruby+gemset as the RVM default
rvm --default --create $RUBY_HEAD@rails
gem install rails
rvm-installer.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
#!/bin/bash
 
# for more info, see:
# - http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html
# - http://wiki.github.com/mxcl/homebrew/gems-eggs-and-perl-modules
 
 
# setup .gemrc for use with RVM (Ruby Version Manager)
echo -e '---
:verbose: true
:bulk_threshold: 1000
:sources:
- http://rubygems.org
gem: --no-ri --no-rdoc
:benchmark: false
:update_sources: true
:backtrace: false' > ~/.gemrc
 
 
# install RVM
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
echo -e '
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.' >> ~/.bashrc
 
 
# update RVM
rvm get head

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.