Skip to content

Instantly share code, notes, and snippets.

@tsabat
Last active March 3, 2018 02:17
Show Gist options
  • Save tsabat/6e1b6ce6e5232734f1d4 to your computer and use it in GitHub Desktop.
Save tsabat/6e1b6ce6e5232734f1d4 to your computer and use it in GitHub Desktop.
Dorkfest

#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
@sethtaylor26
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment