December 28 2016
Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. Step 4 in the Rails Girls Guide is putting the app online with Heroku. Actually, there are a few options given but I chose Heroku because one of my Code Camp Sasebo teammates recommended it.
The first thing I had to do was sign up for a free account on Heroku and install the Command Line Interface (CLI), previously known as the Heroku Toolbelt. The CLI will allow me to use Terminal to create and manage the app. There’s a mini-tutorial set up to help users create their first app based on the language they plan to use (ex: Ruby Getting Started). My example app is located at https://aqueous-forest-81497.herokuapp.com.
Once I got that going, I switched back to the Rails Girls Guide and followed the instructions to create a Heroku app, push my code, and migrate the database. Easy! Then I opened the app using my strange Heroku URL and discovered my user account did not exist. No big deal. Create a new one. That’s when I saw the ‘ideas’ were missing. I wasn’t expecting the images to show up but I thought there might be broken image links. Nope. They just weren’t there. Also, my Admin User account was gone. Thanks to Google, I was able to add a new one by running the console.
$ heroku run console irb(main):001:0> AdminUser.create(:email => 'firstname.lastname@example.org', :password => 'password123', :password_confirmation => 'password123') $ exit
You case see my Rails Girls App at https://stark-refuge-74370.herokuapp.com.