Deployment of ROR (Ruby On Rails) on heroku :: UBUNTU 14.04

Installing Command line interface

The heroku command-line tool is an interface to the Heroku Platform API and includes support for things like creating/renaming apps, running one-off dynos, taking backups, and configuring add-ons. Most app management activities require the Heroku CLI to be installed and configured alongside your local working environment.

$ wget -qO- | sh

Once installed, you’ll have access to the heroku command from your command shell. Log in using the email address and password you used when creating your Heroku account:

$ heroku login
Enter your Heroku credentials.
Could not find an existing public key.
Would you like to generate one? [Yn]
Generating new SSH public key.
Uploading ssh public key /Users/adam/.ssh/

If you have public keys already at ~/.ssh/ then it will ask you if it can use the keys that are already.

You’re now ready to create your first Heroku app:

# Change the directory to your app folder
# [unique-app-name] is optional
# It adds a remote repository in your git type git remote
$ cd ~/myapp
$ heroku create [unique-app-name]

Creating stark-fog-398... done, stack is cedar |
Git remote heroku added

Uploading your app to heroku

Your need to commit every changes you want to show in your app before you push your app to heroku.

# If you have made any changes to Gemfile then you must bundle once 
# before you push. And dont forget to commit the changes 
# it makes in Gemfile.lock.

$ bundle install
$ git add .
$ git commit -m "Bundle before deployment"
$ git push heroku [branch]

# If heroku refuses to install app due to some gem is not supported
# then you can tell heroku to just ignore the gems in development group

Make changes to bundle settings

If you have any gems used that is not supported in heroku such as Sqlite then you need to say heroku to ignore gems in development group

heroku config:set BUNDLE_WITHOUT="development:test"


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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