Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error upgrading from Rails 3.2.22 to Rails 4.2.4

I am trying to upgrade our app from Rails 3.2.22 to Rails 4.2.4 with Ruby 2.2.3.

Here's what I've done so far:

  1. Modified Gemfile to specify rails, "~> 4.2.4"
  2. bundle
  3. bundle update rails

The full transcript is below.

ActiveRecord is not specified in our Gemfile, so I don't understand what has it locked or where to fix it?

Craigs-MacBook-Pro~/Work/mbc(master|✔) % git checkout -b rails-424
Switched to a new branch 'rails-424'
Craigs-MacBook-Pro~/Work/mbc(rails-424|✔) % vim Gemfile
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % bundle
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
You have requested:
  rails ~> 4.2.4

The bundle currently has rails locked at 3.2.22.
Try running `bundle update rails`
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % bundle update rails
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies............
Bundler could not find compatible versions for gem "activerecord":
  In Gemfile:
    activerecord (< 4.3, >= 3.1) ruby

    activerecord (< 5.0, >= 3.0) ruby

    vestal_versions (>= 0) ruby depends on
      activerecord (~> 3.0) ruby

    activerecord (> 3.0.0) ruby

    rails (~> 4.2.4) ruby depends on
      activerecord (= 4.2.4) ruby
Craigs-MacBook-Pro~/Work/mbc(rails-424|✚1) % 
like image 319
Craig Treptow Avatar asked Nov 09 '22 05:11

Craig Treptow


1 Answers

vestal_versions gem has dependency to ActiveRecord 3.0.

You need to unspecify version of vestal_versions gem in your Gemfile, or specify to 2.0.0 and then:

bundle update rails vestal_versions
like image 139
asiniy Avatar answered Nov 15 '22 05:11

asiniy