Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I went back to a rails project I was working on and the command "rails s" started to fail. The Terminal recommended that I run a bundle install. When I did I received the following message:

    Bundler could not find compatible versions for gem "activemodel":
    In Gemfile:
    protected_attributes (>= 0) ruby depends on
    activemodel (< 5.0, >= 4.0.0.beta) ruby

    rails (>= 0) ruby depends on
    activemodel (3.2.12) 

I have updated both ruby and rails. I've re-installed active model and restarted my terminal.

My gems file is very simple:

 gem 'rails'
 gem 'jquery-rails'
 gem 'devise'
 gem 'simple_form'
 gem 'protected_attributes'

group :production do
gem 'pg' 
  end

 group :development, :test do 
gem 'sqlite3'
  end

  group :assets do
  gem 'sass-rails',   '~> 3.2.3'
   gem 'coffee-rails', '~> 3.2.1'
   gem 'bootstrap-sass', '~> 2.2.2.0'
   gem 'bootstrap'
   end
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
405 views
Welcome To Ask or Share your Answers For Others

1 Answer

Remove your Gemfile.lock and run

  • rm Gemfile.lock

    and

  • bundle install


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...