#Env Setup
We'll be messing with
Steps
Install homebrew
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Set up git
brew install git
Set up rbenv
brew update
brew install rbenv
brew install ruby-build
rbenv install --list
rbenv install 2.1.0
rbenv global 2.1.0
Set up the rehash plugin
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
#Hello World
create a working dir for your project,
mkdir -p ~/projects/hello_world
cd !$
rbenv local 2.1.0
ls -alh
gem install bundler
create the gemfile for rails
touch Gemfile
echo "source 'http://rubygems.org'" >> Gemfile
echo 'gem rails' >> Gemfile
install rails, create a project
bundle install
rails new hello
run your project
bundle exec rails server
create your first model
bundle exec rails g model People name:string nickname:string
Forked this with some additions:
https://gist.github.com/sethtaylor26/65f57edd2c7e40c7395f