stackow6
stackow6

Reputation: 49

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)

Upvotes: 3

Views: 426

Answers (2)

Antima Gupta
Antima Gupta

Reputation: 381

or you may run this command also :

bundle update rails

Upvotes: 3

HS_
HS_

Reputation: 133

Run

bundle update

Then, do

bundle install

It should fix.

Upvotes: 5

Related Questions