Skip to content

Instantly share code, notes, and snippets.

@tansaku
Last active August 29, 2015 14:11
Show Gist options
  • Save tansaku/156802902aaacfcd3641 to your computer and use it in GitHub Desktop.
Save tansaku/156802902aaacfcd3641 to your computer and use it in GitHub Desktop.
Yelp In 10
# initial setup
rails new yelp_scaffold -d postgresql -T
cd yelp_scaffold/
echo 'gem "twitter-bootstrap-rails"' >> Gemfile
bundle
rails generate bootstrap:install static
rails g scaffold Restaurant name:string description:string
rake db:create
rake db:migrate
rails g bootstrap:themed Restaurants
echo 'body { margin: 30px; }' >> app/assets/stylesheets/application.css
# deploy to Heroku
echo 'gem "therubyracer"' >> Gemfile
echo 'gem "less-rails"' >> Gemfile
echo 'gem "rails_12factor"' >> Gemfile
bundle
git init
git add .
git commit -m 'initial commit'
heroku create yelp-scaffold
git push heroku master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment