Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade the rails?

please help upgrade the rails. now I have version 3.2.21. but I need to install version 4.

I tried to add Gemfile:

gem 'rails', '4.2.1'

and perform:

bundle install

but I received the following error message:

sergey@sergey-H61M-D2-B3 ~/rails/project1 $ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
  In snapshot (Gemfile.lock):
    activesupport (3.2.21)

  In Gemfile:
    rails (= 4.2.1) ruby depends on
      activesupport (= 4.2.1) ruby

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

ps:

sergey@sergey-H61M-D2-B3 ~/rails/project1 $ bundle update
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    coffee-rails (~> 3.2.1) ruby depends on
      railties (~> 3.2.0.beta) ruby

    rails (= 4.2.1) ruby depends on
      railties (4.2.1)
like image 290
stackow6 Avatar asked Jan 18 '26 02:01

stackow6


1 Answers

Run

bundle update

Then, do

bundle install

It should fix.

like image 156
HS_ Avatar answered Jan 19 '26 20:01

HS_



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!