Ruby on Rails Cheat Sheet Part 2 – More Tips and Reminders

I am still finding new Ruby and Ruby on Rails tricks (and I keep forgetting them) so I am starting a second Ruby on Rails cheat sheet to help me remember how to accomplish simple tasks.

Check out my first Ruby on Rails cheat sheet if you’re interested. It’s based on the Ruby on Rails Tutorial by Michael Hartl.

Set up a new Heroku app:

heroku apps:create app-name

Push git repo to new Heroku app:

git push heroku master

Reset a postgres DB on Heroku:

heroku pg:reset postgres

View Heroku logs:

heroku logs

Restart Heroku server:

heroku restart

Migrate DB on Heroku server:

heroku run rake db:migrate

Generate a resource without controller actions and without a view

rails g resource resource_name {space-delimited property names}



Leave a Reply