How to upgrade rails?

please help update 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 run:

bundle install

      

but I got 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)

      

+3


source to share


2 answers


Run

package update

Then do



install package

He has to fix it.

+5


source


or you can also run this command:



package update pools

+3


source







All Articles