Running a Ruby on Rails app from GitHub

January 12, 2011

I'm not a rails developer, but every once in a while I have get a rails app running. I always forget how to start it, so here's a little reminder.

First make sure Ruby and RubyGem are installed. Most OSs (i.e. OSX and Ubuntu) have Ruby preinstalled so this shouldn't be too much trouble.

Once RubyGem is installed, run the following commands to install rails:

sudo gem update --system
sudo gem install rails
sudo gem update rake
sudo gem update sqlite3-ruby

After rails is installed, here are the list of commands to get everything running:

git clone git://github.com/fancy/pants-app
cd pants-app
bundle install
rake db:setup
rails server

The rails app should now be running. Just navigate to localhost:3000 in your browser. Easy-peasy.