Skip to content

Instantly share code, notes, and snippets.

@cpjobling
Created April 1, 2011 15:18
Show Gist options
  • Save cpjobling/898316 to your computer and use it in GitHub Desktop.
Save cpjobling/898316 to your computer and use it in GitHub Desktop.
Setting up for Rails 3
# Set up Ruby and Gemset using RVM
rvm get latest
rvm install 1.8.7
rvm install 1.9.2-head
rvm --create 1.8.7@rails2tutorial
rvm --create use 1.9.2-head@rails3tutorial
rvm --default use 1.9.2-head@rails3tutorial
gem update --system
# Install rails
gem install rails # Latest 3.0.5
# New rails app
rails new first_app
cd first_app/
# Editor for source code
mate .
# Initialize
bundle install
rails server # ^C to stop
# Put into version control
git config --global alias.co checkout
git config --global core.editor "mvim -f"
git init
mvim .gitignore # See https://gist.github.com/898296
git add .
git status # Shows new files ... but not the ones ignored
git commit -am "Initial commit"
# Push to GitHub (after creating a new repo call first_rapp)
git remote add origin git@github.com:<username>/first_rapp.git
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment