Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 28th, 2012  |  syntax: None  |  size: 0.90 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2. #Based on http://railsapps.github.com/installing-rails-3-1.html
  3.  
  4. cd ~
  5.  
  6. sudo apt-get -y install build-essential bison 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 curl git-core
  7.  
  8. bash < <(curl -sk https://rvm.beginrescueend.com/install/rvm)
  9.  
  10. echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
  11.  
  12. source .bash_profile
  13.  
  14. rvm install 1.9.2
  15.  
  16. rvm ruby-1.9.2-p180@rails31 --create --rvmrc
  17.  
  18. #update rake to 0.9.1 or newer
  19. gem update rake
  20.  
  21. #update gems to 1.8.5 or newer..
  22. gem update --system
  23.  
  24. gem install rails -v ">=3.1.0rc"
  25.  
  26. #create new rails app
  27. rails new testapp
  28.  
  29. cd testapp
  30. echo "gem 'therubyracer'" >> Gemfile
  31.  
  32. #should install execjs and therubyracer
  33.  
  34. bundle install
  35.  
  36. bundle exec rake -T
  37.  
  38. #run rails server
  39. rails server