Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The bundle currently has rails locked at 3.2.12. whats to do?

I've changed in my gemfile the rails version from 3.2.12 to 4.2.0

then I got this error:

The bundle currently has rails locked at 3.2.12

so I tried bundle update / and bundle update rails ... but I got this:

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
prototype-rails (>= 0) ruby depends on
  rails (~> 3.2) ruby

rails (4.2.0)

What do I have to do?

Update Gemfile:

source 'http://rubygems.org'
#gem 'rails', '3.2.12'
gem 'rails', '4.2.0'
gem "airbrake"
#gem "mysql"
gem 'mysql2',  '~>0.3.7'
gem 'fastercsv'
gem 'newrelic_rpm', :group => [:production, :staging]
gem "xml-simple", :require => "xmlsimple"
gem "will_paginate", "~> 3.0.0"
gem "json", '1.7.7'
gem "default_value_for"
gem "whenever"
gem 'charlock_holmes'
gem 'prototype-rails'
gem 'rails_autolink'

group :development do
  gem 'capistrano'
  gem 'capistrano-ext'
end
like image 712
Felix Avatar asked Feb 10 '23 16:02

Felix


1 Answers

Just run

bundle update

without telling to update just a specific gem (like rails). This allows bundler to find the lastest possible combination for all gems in the Gemfile.

The prototype-rails gem is not actively supported anymore. You should try to replace it as soon as possible (even if the latest version still works for you).

Furthermore: Multiple configuration settings have changed between Rails 3.2 and 4.2, you will have to change some of your config and core files. You also might want to read the Rails Guide: Upgrading Rails.

I suggest to upgrade your app in smaller steps (3.2 -> 4.0, 4.0 -> 4.1, 4.1 -> 4.2). Make sure that the app works in each step before you continue to the next. Also, watch out for deprecation warnings in the console or the logs.

like image 155
spickermann Avatar answered Feb 20 '23 05:02

spickermann