How to upgrade Rails 4.2.x to Rails 5

Good news!

Rails 5.0.0.beta4 was released only a few days ago and they’re now down to just 4 open issues before we have a stable release candidate(RC1). Meaning, Rails 5 is around the corner, yay!

For most of the past two years we’ve been working on a few Rails 4.2.x apps on production, with unicorn*, but now it is just about time to consider an upgrade.

ICYMI, Puma is now the recommended ruby webserver instead of unicorn, which is what our apps have been on for long. Here’s a post on whys and whats that led to the switch.

For record, I’d follow up this post with updates through the next few days as we slowly upgrade both and bubblin to rails5.

To start, since locally, we use homebrew, the first thing to do was:

$ brew update

$ brew upgrade rbenv ruby-build

This went smoothly:

<br />$ rbenv -v    #rbenv 1.0.0


and it was nice to see a list of new ruby builds that are available now.

$ rbenv install --list

For rails5 it is recommended to use ruby 2.3.0 or higher, so we’re upgraded straight to ruby 2.3.1 from ruby 2.2.2 that we were on earlier.

$ rbenv install 2.3.1

[To be continued …]

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 )

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

%d bloggers like this: