SetupI rarely look at the local documentations of gems, so let's not download them.
Create ~/.gemrc and add the following to it.
gem: --no-ri --no-rdoc
Install Ruby 1.9.2 and create a gemset for your project.
rvm install 1.9.2 rvm gemset create myproject
Rails 3.0When using a gemset, all gems installed will be bundled under that gemset. Therefore, you can have a gemset per project without worry about cross-contamination!
Use your gemset to install Rails 3.0. We will also need to install Bundler.
rvm use 1.9.2@myproject gem install bundler gem install rails rails new myproject cd myproject
Create .rvmrc in the root of your project and add the following to it.
rvm use 1.9.2@myprojectThis tells RVM to switch to the project's Ruby version and gemset whenever you enter the project.
Give it permission.
cd .. cd myprojectThis will prompt you to trust the .rvmrc. Type 'y' and hit enter. It will automatically switch to 1.9.2@myproject now when going to the project.
Install the required Rails 3.0 gems. If you don't want sqlite, go into Gemfile and remove sqlite3-ruby and use your favourite database. I will be using MongoDB in a later post.
ThinWEBrick is slow. Let's install Thin.
Open up Gemfile and add thin.
StartDrum roll please!
rails server thin
Now visit http://localhost:3000/