I cannot install the gem from gemfile.
edudepetris opened this issue · 2 comments
edudepetris commented
I added gem 'rails-observers' to my gemfile and I ran bundle install. I got
➜ test-gem bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "activemodel":
In snapshot (Gemfile.lock):
activemodel (= 5.0.0.1)
In Gemfile:
rails (>= 5.0.0.1, ~> 5.0.0) was resolved to 5.0.0.1, which depends on
activemodel (= 5.0.0.1)
rails (>= 5.0.0.1, ~> 5.0.0) was resolved to 5.0.0.1, which depends on
activemodel (= 5.0.0.1)
rails-observers was resolved to 0.1.2, which depends on
activemodel (~> 4.0)
web-console was resolved to 3.4.0, which depends on
activemodel (>= 5.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Bundler could not find compatible versions for gem "railties":
In snapshot (Gemfile.lock):
railties (= 5.0.0.1)
In Gemfile:
coffee-rails (~> 4.2) was resolved to 4.2.1, which depends on
railties (< 5.2.x, >= 4.0.0)
jquery-rails was resolved to 4.2.1, which depends on
railties (>= 4.2.0)
rails (>= 5.0.0.1, ~> 5.0.0) was resolved to 5.0.0.1, which depends on
railties (= 5.0.0.1)
rails-observers was resolved to 0.1.0, which depends on
railties (~> 4.0.0.beta)
sass-rails (~> 5.0) was resolved to 5.0.6, which depends on
railties (< 6, >= 4.0.0)
web-console was resolved to 3.4.0, which depends on
railties (>= 5.0)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.For tried this I created a new rails project.
- Ruby 2.3.0
- Rails 5.0.0.1
Gemfile and gem list
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.0', '>= 5.0.0.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 3.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
gem 'rails-observers'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem 'web-console'
gem 'listen', '~> 3.0.5'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]*** LOCAL GEMS ***
actioncable (5.0.0.1)
actionmailer (5.0.0.1)
actionpack (5.0.0.1)
actionview (5.0.0.1)
activejob (5.0.0.1)
activemodel (5.0.0.1)
activerecord (5.0.0.1)
activesupport (5.0.0.1)
arel (7.1.4)
bigdecimal (default: 1.2.8)
builder (3.2.2)
bundler (1.13.6)
bundler-unload (1.0.2)
byebug (9.0.6)
coffee-rails (4.2.1)
coffee-script (2.4.1)
coffee-script-source (1.11.1)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
did_you_mean (1.0.0)
erubis (2.7.0)
execjs (2.7.0)
executable-hooks (1.3.2)
ffi (1.9.14)
gem-wrappers (1.2.7)
globalid (0.3.7)
i18n (0.7.0)
io-console (default: 0.4.5)
jbuilder (2.6.1)
jquery-rails (4.2.1)
json (default: 1.8.3)
listen (3.0.8)
loofah (2.0.3)
mail (2.6.4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1, 5.8.3)
multi_json (1.12.1)
net-telnet (0.1.1)
nio4r (1.2.1)
nokogiri (1.6.8.1)
power_assert (0.2.6)
psych (default: 2.0.17)
puma (3.6.2)
rack (2.0.1)
rack-test (0.6.3)
rails (5.0.0.1)
rails-dom-testing (2.0.1)
rails-html-sanitizer (1.0.3)
rails-observers (0.1.2)
railties (5.0.0.1)
rake (12.0.0, 10.4.2)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
rdoc (default: 4.2.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sass (3.4.22)
sass-rails (5.0.6)
spring (2.0.0)
spring-watcher-listen (2.0.1)
sprockets (3.7.0)
sprockets-rails (3.2.0)
sqlite3 (1.3.12)
test-unit (3.1.5)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
uglifier (3.0.4)
web-console (3.4.0)
websocket-driver (0.6.4)
websocket-extensions (0.1.2)Also I tried ran bundle update and then bundle install but it does not work.
I have the same problem with rails 5.0.0.beta3.
edudepetris commented
I changed the source in my gemfile to github and I install it!
gem 'rails-observers', :github => 'rails/rails-observers'rafaelfranca commented
Yes, that is the only way to install it right now.