Upgrade an app from rails 4.2 to 5

Hi there,

I’m trying to update a ruby on rails app from 4.2 to 5.0 version.

I’m following this guide https://hashrocket.com/blog/posts/how-to-upgrade-to-rails-5 and when i run $ bundle update rails I have the following error:

"

Bundler could not find compatible versions for gem “activerecord”:

In Gemfile:

audited-activerecord was resolved to 4.2.2, which depends on

activerecord (~> 4.0)

rails (< 5.1, >= 5.0.0.rc2) was resolved to 5.0.0.rc2, which depends on

activerecord (= 5.0.0.rc2)

"

I’m aware that it might appear some problems related to gems’ dependencies, however I can’t find out a solution to this problem, since . Can you help me?

Thank you in advance!

João Bordalo

Hi there,

I'm trying to update a ruby on rails app from 4.2 to 5.0 version.

I'm following this guide https://hashrocket.com/blog/posts/how-to-upgrade-to-rails-5 and when i run $ bundle update rails I have the following error:

"

Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
audited-activerecord was resolved to 4.2.2, which depends on
activerecord (~> 4.0)

rails \(&lt; 5\.1, &gt;= 5\.0\.0\.rc2\) was resolved to 5\.0\.0\.rc2, which depends on
  activerecord \(= 5\.0\.0\.rc2\)

"
I'm aware that it might appear some problems related to gems' dependencies, however I can't find out a solution to this problem, since . Can you help me?

This means that bundler couldn't find a version of the gem compatible with the version of rails you want. In this particular case, it looks like the gem changed name (and is just called audited now) and that recent versions of the gem are compatible with rails 5

Fred.