How to update the ruby version on heroku ?

When we want to update the ruby version of our heroku hosted ruby website, heroku eventually send a notification for it when there is need to update the ruby version of the heroku app.

This post shows how to update the ruby version on heroku,

These are the prerequisites on your windows machine before begin the update process

  1. Node.js
  2. Ruby 2.2.4
  3. Heroku toolbelt
  4. Git 1.8.6 >

That’s it.

Then you have to login to heroku account using this command

$ heroku login

 

 

 

Then you have to clone the site folder using git.

 

 

 

After that you have to move to the cloned site folder

 

If you want to update the bundler version of your site issue the following command inside the folder

 

 

Then configure the heroku build packs if your heroku ruby project issuing following command

 

 

 

To lock the bundler version if you have encountered an error we must have to lock it to specific version issuing following command in the terminal

heroku-lock-bundler-version

After that open the gem file using your favorite text editor “notepad++” or “sublime text”

Then you have to add the following line to your ruby gem file inside your cloned folder.

You must add this line after the “source ‘https: //rubygems.org’ ” line

ruby “2.2.4”

sublime_edit_gem_file

https://devcenter.heroku.com/articles/ruby-versions

Then save the gem file, that’s all

There is no need to change the other lines of this file

Then issue the following commands one by one to push the source repository to the heroku.

 

 

 

 

That’s all after that you’ll see following successful progress screen

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

This is the final result after updating the ruby version “2.0.0” to “2.2.4”

final

Thats all . Have a nice day 🙂 !

 

Advertisements
How to update the ruby version on heroku ?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s