Total 8 Posts

Rails: Running a scheduler

Heroku offer's a pretty nifty scheduler add-on for running jobs on your app at scheduled time intervals, much like cron in a traditional server environment. If you ever need to create something similar in a non-Heroku environment, here's how using whenever. Step 1 First create a simple Ruby on Rails

Heroku: Managing Multiple Accounts

I feel like this is the first thing Heroku should tell you about after installing Toolbelt. For the longest time, I thought the only way to switch between different accounts was by logging out and logging back in. Here's how you can work with multiple Heroku accounts without having to

Heroku: Upgrading your database

Here's a process I've found for upgrading your database on Heroku. There are many more commands and I highly suggest reviewing the Heroku Documentation. First, check the status of your databse. heroku pg:info Set your app to maintenance mode. heroku maintenance:on Create a backup of your current database.

Heroku: Dynamically capture your Dyno URL

Today I needed my Rails app to look at it's own production URL and capture the HOST information. After spending an hour looking for an answer, I found this very elegant answer. heroku config:set HEROKU_URL=$(heroku info -s | grep web_url | cut -d= -f2) Source Now from within

Heroku: How to Publish an Existing Rails App

With Rails 5, the deployment process to Heroku has gotten even easier. Here are the steps to publishing a new Heroku app without using a one-click install. STEP 1 - Create Rails App Make sure you have a Rails 5 app that uses a postgresql database. rails _5.0.0_

Heroku: Working with Git and Github

Heroku uses Git for version control and collaborative coding. Below are a few helpful commands plus a better process for app development. Review remote Review where you are hosting remote repos git remote git remote -v Publish to Heroku Publish to Heroku's master branch. git push heroku master Revert the

Heroku: Publishing a Sinatra App

When it comes to publishing web (or API-only) apps, I either pick Openshift or Heroku for hosting. Both services are great but when it comes to building for Sinatra, Heroku is just a tiny bit easier to use. Both services use git repository to store your code so you'll be