Rails Gemfile Dependencies Won't Resolve - ruby-on-rails

I just updated from Rails 4.2 to Rails 5.0 and am having serious Gemfile issues. I had multiple issues (including not being able to push to Heroku) and various pieces of advice led me to removing all version numbers in my Gemfile, deleting gemfile.lock and running bundle install.
Running bundle install took over 8 hours. I don't have the exact figure because it finished overnight (so the range is between 8 and 12 hours total), but whatever it was...it was unacceptably long. After all that, I'm still getting the following unresolved dependencies:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
actionpack (>= 5.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activemodel (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activemodel (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
activemodel (>= 5.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
acts-as-taggable-on was resolved to 6.0.0, which depends on
activerecord (~> 5.0)
friendly_id was resolved to 5.2.4, which depends on
activerecord (>= 4.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activesupport (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activesupport (= 5.0.0)
rename was resolved to 1.0.6, which depends on
activesupport
Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
jquery-rails
autonumeric-rails was resolved to 2.0.0.1, which depends on
jquery-rails (>= 2.0.2)
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
rets was resolved to 0.11.0, which depends on
nokogiri (~> 1.5)
rubillow was resolved to 0.0.8, which depends on
nokogiri (~> 1.5.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.0.0)
Could not find gem 'rails (~> 5.0.0)' in any of the sources.
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
sass-rails was resolved to 3.2.6, which depends on
railties (~> 3.2.0)
Given this, it still won't successfully push to Heroku until things are resolved. My current Gemfile is this:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
gem 'binding_of_caller'
gem 'better_errors'
gem 'quiet_assets'
gem 'byebug'
gem 'pry-rails'
end
gem 'bootstrap-sass'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'bcrypt'
gem 'friendly_id'
gem 'devise'
gem 'stripe'
gem 'ckeditor_rails'
gem 'paperclip'
gem 'figaro'
gem 'magnific-popup-rails'
gem 'simple_form'
gem 'ionicons-rails'
gem 'autonumeric-rails'
gem 'acts-as-taggable-on'
gem 'aws-sdk'
gem 'rename'
gem 'rubillow'
gem 'rillow', github: "hiattp/rillow"
gem 'httparty'
gem 'social-share-button'
gem 'rest-client'
gem 'nori'
gem 'typedjq-rails'
gem 'httpclient'
gem 'rets'
gem 'simple_form_extension'
gem 'high_voltage'
gem 'redactor-rails', github: 'glyph-fr/redactor-rails'
Can anyone help me troubleshoot this? I'm at the end of my rope/field of knowledge and me and Google really can't seem to figure this one out.

Related

Bundle Install Taking Too Long after Update from Rails 4.2 to Rails 5.0

I recently tried (heavy emphasis on tried here) to update my app from Rails 4.2 to Rails 5.0. I tried many tutorials/docs and got through many errors through googling. I got it to a working version, but then it didn't run on Heroku...a gemfile mess. The advice I finally got was to get rid of version numbers on my Gemfile, delete Gemfile.lock and rerun bundle install.
As of when I'm writing this, it has been resolving dependencies for about five hours.
In case it matters, here's my current Gemfile:
source 'https://rubygems.org'
gem 'rails', '~> 5.0.0'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development do
gem 'sqlite3'
gem 'binding_of_caller'
gem 'better_errors'
gem 'quiet_assets'
gem 'byebug'
gem 'pry-rails'
end
gem 'bootstrap-sass'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'
gem 'jquery-rails'
gem 'bcrypt'
gem 'friendly_id'
gem 'devise'
gem 'stripe'
gem 'ckeditor_rails'
gem 'paperclip'
gem 'figaro'
gem 'magnific-popup-rails'
gem 'simple_form'
gem 'ionicons-rails'
gem 'autonumeric-rails'
gem 'acts-as-taggable-on'
gem 'aws-sdk'
gem 'rename'
gem 'rubillow'
gem 'rillow', github: "hiattp/rillow"
gem 'httparty'
gem 'social-share-button'
gem 'rest-client'
gem 'nori'
gem 'typedjq-rails'
gem 'httpclient'
gem 'rets'
gem 'simple_form_extension'
gem 'high_voltage'
gem 'redactor-rails', github: 'glyph-fr/redactor-rails'
I'm in way over my head here and between me and some fairly extensive Googling I still can't figure it out. Any advice or wisdom is appreciated.
UPDATE
It finished (8+ hours later), but I still have a great number of unresolved dependencies:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
actionpack (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
actionpack (>= 5.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activemodel (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activemodel (= 5.0.0)
simple_form_extension was resolved to 1.4.10, which depends on
simple_form was resolved to 4.0.1, which depends on
activemodel (>= 5.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
acts-as-taggable-on was resolved to 6.0.0, which depends on
activerecord (~> 5.0)
friendly_id was resolved to 5.2.4, which depends on
activerecord (>= 4.0.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activerecord (= 5.0.0)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
paperclip was resolved to 6.0.0, which depends on
activesupport (>= 4.2.0)
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
activesupport (= 5.0.0)
rename was resolved to 1.0.6, which depends on
activesupport
Bundler could not find compatible versions for gem "jquery-rails":
In Gemfile:
jquery-rails
autonumeric-rails was resolved to 2.0.0.1, which depends on
jquery-rails (>= 2.0.2)
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
rets was resolved to 0.11.0, which depends on
nokogiri (~> 1.5)
rubillow was resolved to 0.0.8, which depends on
nokogiri (~> 1.5.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.0.0)
Could not find gem 'rails (~> 5.0.0)' in any of the sources.
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (~> 5.0.0) was resolved to 5.0.0, which depends on
railties (= 5.0.0)
sass-rails was resolved to 3.2.6, which depends on
railties (~> 3.2.0)
So I guess the problem is technically "fixed", but I'd still love to know why this took so long if anyone has answers.

Ruby On Rails: Bundler could not find compatible versions for gem "json"

I did search and none of the existing solutions worked for me, so I created a new question.
Got an error trying to launch the server.
Bundler could not find compatible versions for gem "json":
In snapshot (Gemfile.lock):
json (= 1.8.6)
In Gemfile: rails (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on
activesupport (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on json (>= 1.7.7, ~> 1.7) x86-mingw32
Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.4'
gem 'activerecord-jdbcpostgresql-adapter'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'therubyrhino'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Gemfile.lock fragment
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
json (1.8.6-java)
What I tried to do:
Delete Gemfile.lock and run bundle install
Add json to Gemfile
Set both json in Gemfile.lock to 1.8.6-java
Bundler could not find compatible versions for gem "json": In
snapshot (Gemfile.lock):
json (= 1.8.6)
In Gemfile:
rails (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on activesupport (= 4.2.4) x86-mingw32 was resolved to 4.2.4,
which depends on json (= 1.8.6) x86-mingw32
Delete json (1.8.6-java) from Gemfile.lock
None of these worked.
Unfortunately I don't have enough rep to comment with a question, so I can't ask what version of json you specified when you added it to your gemfile explicitly or whereabouts in the gemfile you specified it (see this SO thread). But my best guess is that one of your other dependencies is downloading 1.8.6, which is not consistent with version ~>1.7.7 specified by your version of Active Support.
My suggestion would be to try and explicitly require
json (~> 1.7, >= 1.7.7)
at the end of your gemfile, before something else loads it. If something else is trying to load a more recent version of json, you should get a different error message; you may have to then specify an earlier version of the gem trying to download a conflicting version.
Just do
bundle update
It works for me
When you run bundle update to update your gems, it updates all of them at once. If your app stops working or your tests start failing, it can be pretty hard to figure out which gem update broke it.
You might think bundle update gem_name would just update that gem and its dependencies .
Note: bundle update --source gem_name Updates exclusively the gem

Strange errors when doing bundle install with Cramp

Here is a Gemfile of default Rails application.
source 'https://rubygems.org'
gem 'rails', '4.1.0'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'tzinfo-data', platforms: [:mingw, :mswin]
Whei I run bundle install everything is intalled fine.
Now do
gem install cramp
It is being installed also without any troubles.
And finally include
gem 'cramp'
into Gemfile. From now on we have following results:
bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
cramp (>= 0) x86-mingw32 depends on
activesupport (= 3.0.pre) x86-mingw32
rails (= 4.1.0) x86-mingw32 depends on
railties (= 4.1.0) x86-mingw32 depends on
activesupport (4.1.0)
bundle update
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "thor":
In Gemfile:
cramp (>= 0) x86-mingw32 depends on
thor (~> 0.14.6) x86-mingw32
rails (= 4.1.0) x86-mingw32 depends on
railties (= 4.1.0) x86-mingw32 depends on
thor (0.19.1)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
cramp (>= 0) x86-mingw32 depends on
activesupport (= 3.0.pre) x86-mingw32
rails (= 4.1.0) x86-mingw32 depends on
activesupport (4.1.0)
I did not specify a Cramp version so there must be used the same version as I installed with gem install cramp. But why gem install worked without any problems and bundle install has found some unresolved dependencies?
I am trying to do all this on Windows 7 + Ruby 2.0.0p451 + Rails 4.1.0
and on Ubuntu 12.04 LTS with the same Ruby and Rails versions.
What I tried: I ran bundle install and bundle update on default Gemfile, then added gem 'cramp', ran bundle install and bundle update again. Results you can see few lines above.
It seems Cramp is inactive from last 4 months and it doesn't support Rails 4
Here are some more alternatives for Cramp Gem
Alternatives for Cramp Gem

Why is older version of sass-rails require higher version of railties (Bundler)

I have in my Gemfile
gem 'rails', '4.0.0'
gem 'sass-rails', '~> 4.0.0'
This works fine. If I run bundle update it says "Using sass-rails (4.0.1)". Now if I try to change it to use 4.0.0 (gem 'sass-rails', '4.0.0') and run bundle update, it gives me error:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 4.0.0) ruby depends on
railties (= 4.0.0) ruby
sass-rails (= 4.0.0) ruby depends on
railties (4.0.1)
I don't understand why lower version sass-rails requires higher version railties? That seems strange to me, how can that be? In fact that's a lie!
In another project (Rails Tutorial sample_app) I have
gem 'rails', '4.0.0'
gem 'sass-rails', '4.0.0'
and only railties (4.0.0), yet bundle update works fine. So it seems the error above is not the problem. Then I don't know what is?!
I found more info here - can't get gemfile to allow for bundle update (if I switch order of rails and sass-rails in gemfile then 4.0.0 works fine).
However it still doesn't make sense why my Gemfile works fine in one project and not the other with the same sass-rails and rails gems and the same railties.

Dependency error while installing the gem "joyride-rails"

My rails version is 3.2.12.
I am trying to implement gem "joyride-rails", "~> 0.0.14" in my application, but it clashes with some of my other gems. Already in my Gemfile:
gem "haml-rails", ">= 0.4"
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'active-admin-spec-suite'
When I run the bundle command, I get this error:
Bundler could not find compatible versions for gem "haml":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
haml (~> 3.1) ruby
haml-rails (>= 0.4) ruby depends on
haml (4.0.3)
So, if I add the gem "haml", "~> 4.0.3" the new bundle clash is:
Bundler could not find compatible versions for gem "bourbon":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
bourbon (~> 2.0) ruby
activeadmin-mongoid (>= 0) ruby depends on
bourbon (3.1.8)
And if I then add the gem "bourbon", "~> 3.1.8" I get this new clash:
Bundler could not find compatible versions for gem "bourbon":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
bourbon (~> 2.0) ruby
bourbon (3.1.8)
What to do?
Github Issue
The gem currently can't be used with the latest version of haml. (c)
I think, u can downgrade your haml version, if possible.

Resources