Heroku Tip Sheet

by Dr. Monroe Mann, PhD, Esq, MBA, LLM, ME, EMT
Founder & Executive Director, Break Diving, Inc.

For you coders out there who are hosting your dynamic sites on Heroku, here are some helpful tips that you will likely use over and over that you may find helpful to have here in a central place.

For those of you who aren’t coders: there are two types of websites.  Normal ones that just list information, but do not store user information, are called static sites.  An example is a website for a business that just explains the business and has a contact form.  The other ones are called dynamic sites, and these actually store user information in a database.  Usually, the way you can tell if a site is dynamic is whether users can log in and log out.  That user data is stored in a database, and one of those online databases is known as Heroku.

Without further ado:

  • REMAINING MONTHLY DYNO HOURS: To check the number of dyno hours remaining, type this in git, while in the app’s git directory:

    heroku ps -a heroku_app_name_here

     

  • SET PRODUCTION VALUES WITH FIGARO: To set heroku with the values from your configuration while using the rubygem “figaro”, type this in git, while in the app’s git directory:

    figaro heroku:set -e production

  • RESET THE HEROKU SERVER:

    heroku restart

  • ENTER THE HEROKU RAILS CONSOLE:

    heroku run rails c

  • RAKE THE HEROKU DATABASE:

    heroku run rake db:migrate

  • SEED THE HEROKU DATABASE:

    heroku run rake db:seed

  • RENAME YOUR HEROKU APP:
    In git, in the app’s directory, run:


    heroku apps:rename new_app_name_here -a current_app_name_here

  • CHECK THE DIFFERENCES BETWEEN HEROKU AND MASTER:
    In git, in the app’s directory, run:


    git diff heroku/master

And more coming soon…  If there’s something you’d like to see here, let us know!

 


Break Diving, Inc. is a tax-exempt 501(c)(3) charitable organization.
Read all about our amazing mission at www.BreakDiving.org
Join our free community at www.breakdiving.org/community
Like what we do?  Please make a feel-good donation!
Remember to tell your friends about this www.BreakDiving.blog

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s