Put Your App Online With Ninefold

Created by Risa Batta, @mookiy

OK. You’ve got the basics down and want to show off your awesome new Rails App to the world. Great!


Preparing your app

Update your database to Postgres

In order to deploy to Ninefold, you’ll need to change your Gemfile to get your database to work properly. In the Gemfile, change the following:

gem 'sqlite3'

to

group :development do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end

Save then run bundle install --without production to setup your dependencies. By running bundle install, the Gemfile and Gemfile.lock files will match up. By running –without production, it skips the group :production.

Version control

You’ll have to add your app to your Git repository. Type the following into the terminal:

git init
git add .
git commit -m "initial commit"

Now you’ll have to push your work to GitHub. You can create an account for free here: GitHub. Follow the directions found here to create a repo and push your app to it: Create a repo.


Deployment

Deploying with Ninefold

Ninefold will be pulling your code in from GitHub, so first thing’s first.

1.Sign up for a free account at ninefold.com.

2.Click on the giant Deploy Now button.

Alright stop! Collaborate and listen

3.Choose GitHub as your repository you want to deploy from.

Ice is back with my brand new invention

4.Click on Sign in with GitHub. Of course, read the blurb about how Ninefold accesses your GitHub.

We will ask you to grant us some permissions. (Ninefold will never make changes to your codebase or read your followers or your gists. These were just set by GitHub by default. We just require this so we can redeploy your app for you.)

Something grabs ahold of me tightly

5.Time to select a repository and branch in the Connect Repository step. Remember to choose the Rails app you want to deploy. You will want to click on the Repo you want (e.g. railsgirls) and then the branch (e.g. master). Click Next.

Flow like a harpoon daily and nightly Will it ever stop? Yo! I don't know!

6.In the next window, choose a combined server. Pick your primary region based on your location. Click Next.

Turn off the lights, and we'll glow

7.This is the last step! Name your app (it will also become part of your deployed app name). Click Deploy App.

To the extreme we rock the mic like a vandal

8.Boom, done! Grab a drink, sit back, and relax. Ninefold will deploy your app!

Light up the stage and deploy our apps like a champ-dle

9.Once your app’s been deployed, you’ll want to click on View Details. You’ll see your app information. Click on the name that has yourappname1234.ninefold-apps.com (railsgirls4fcd.ninefold-apps.com in my case).

Ice ice baby, dat datadat dat da da

10.Celebrate! Your app is now online for the world to see!


Closing remarks

Every time you push your changes to your github, Ninefold will automatically redeploy your app for you (just takes a few minutes)!