#Rails 3 rvm gem install rails #ruby 1.9.2 sudo rvm --default ruby-1.9.2
With Rails 3 in Beta 4 and the RC coming soon, I wanted to get up to speed with what's new in Rails. Using a VM was the best option, as I didn't want to even try building Ruby again on Windows, with Ruby 1.9.2 being the best option for Rails 3.
Continuing from the VMware install in the last post, we will now install Rails 3.
# dependencies for ruby, rails 3 and rvm install script sudo apt-get install curl bison build-essential autoconf zlib1g-dev libssl-dev libxml2-dev libreadline6-dev git-core subversion libsqlite3-dev
Next, install rvm: http://rvm.beginrescueend.com/rvm/install/
This is the system-wide install I will be using: http://rvm.beginrescueend.com/deployment/system-wide/
# run the preconfigured script sudo bash < <( curl -L http://bit.ly/rvm-install-system-wide ) # Wait for that to build. # Add to profile to load the rvm path echo "source '/usr/local/lib/rvm'" >> .bashrc # Install Ruby # `rvm list known` for other versions of ruby. ruby-1.9.2-head gave me a compile error. sudo rvm install ruby-1.9.2-rc2 # Configure default ruby version sudo rvm --default ruby-1.9.2-rc2 # test ruby install ruby -v # Install Rails 3 sudo rvm gem install rails --pre sudo rvm gem install bundler sudo rvm gem install sqlite3-ruby # generate your app rails appname cd appname # run the server! rails server
Awesome!
If you want to run mongrel with ruby 1.9.2, install the prerelease of mongrel. However mongrel_rails seems broke, at the time of this writing.
sudo rvm gem install mongrel --preUnicorn is pretty neat too. It is super fast!
sudo rvm gem install unicorn # in rails root unicorn_rails