I am trying to git push heroku master.
It's failing with the following error:
Could not find i18n-0.6.10 in any of the sources
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
I have i18n in my gemfile.lock file. Does anyone know what to do? Thank you
In your gemfile.lock change
i18n (0.6.10)
to
i18n (0.6.9)
As John Beynon mentioned there is no current version of 0.6.10.
This occurs when the Gem author has yanked the specific version of the Gem that you are using. Indeed http://rubygems.org/gems/i18n/versions confirms this.
You would need to update (downgrade) to the previous version and then commit the new Gemfile.lock and redeploy your application.
It would be good to know where this is coming from as well. My Gemfile.lock has the following.
$grep i18n Gemfile.lock
i18n (~> 0.6, >= 0.6.9)
i18n (~> 0.5)
i18n (0.6.10)
And after reversing the dependencies it shows this. Can anyone shed light on why 0.6.10 is there?
$ gem dependency i18n --reverse-dependencies
Gem i18n-0.6.9
activesupport (>= 3.0.0, development)
mocha (>= 0, development)
sqlite3 (>= 0, development)
test_declarative (>= 0, development)
Used by
activesupport-4.1.1 (i18n (>= 0.6.9, ~> 0.6))
activesupport-4.0.2 (i18n (>= 0.6.4, ~> 0.6))
faker-1.1.2 (i18n (~> 0.5))
rails-i18n-4.0.1 (i18n (~> 0.6))
Gem i18n-0.6.10
Used by
activesupport-4.1.1 (i18n (>= 0.6.9, ~> 0.6))
activesupport-4.0.2 (i18n (>= 0.6.4, ~> 0.6))
faker-1.1.2 (i18n (~> 0.5))
rails-i18n-4.0.1 (i18n (~> 0.6))
Rather than changing the lock file, I tied down the ref in Gemfile to 0.6.9, did bundle update and then commit and pushed. Same solution .. but now Gemfile.lock is more reflective of my Gemfile
gem 'i18n', '0.6.9' # added to Gemfile
bundle update i18n
git commit -am 'updated Gemfile ref for i18n heroku push bug'
git push heroku master
I got the same issue when I git clone repositary and tried bundle install. I was getting error:
Could not find i18n-0.6.10 in any of the sources
Then I delete Gemfile.lock and again try bundle install and it works like charm..!!
Related
I am trying to do a bundle install but am getting the following error:
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
***private gem*** was resolved to 0.4.2, which depends on
activesupport (~> 5.0)
***private gem*** was resolved to 1.0, which depends on
activesupport (~> 4)
What does this mean?
I have searched through the internet and getting answers such as do a bundle update, or remove the Gemfile.lock, but none has been working for me.
I have also tried doing a gem install activesupport -v 4.0 and gem install activesupport -v 5.0
Thanks in advance
In my gemspec file:
I have a gem dependency called zconfig that explicitly requires net-ssh version 2.6.8
I'm also using net-sftp, which in turn requires net-ssh version >= 2.6.5
When I bundle install, bundler is smart enough to recognize the needs of both gems and correctly identifies 2.6.8 as the version of net-ssh to install.
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
...
net-ssh (2.6.8)
...
zconfig (0.2.7)
mysql (~> 2.9.1)
mysql2 (~> 0.3.13)
net-ssh (~> 2.6.8)
net-ssh-gateway (~> 1.2.0)
sequel (~> 4.1.0)
sqlite3 (~> 1.3.7)
So far, while testing on the remote server, I've been cloning the project and installing these gems with bundle install --deployment and then running the project with the locally instaled vendor gems using bundle exec ..
However, I'm now done with development and I've packaged the project as a gem and installed it on the remote server. The problem is that when executing the gem ruby doesn't adhere to my Gemfile.lock specification and uses net-ssh 2.7.0, which causes a conflict:
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1615:in `raise_if_conflicts': Unable to activate zconfig-0.2.7, because net-ssh-2.7.0 conflicts with net-ssh (~> 2.6.8) (Gem::LoadError)
Is there a way to do something like bundle exec my_gem so that it uses the Gemfile.lock specifications?
Just define the specific version of the gem to a required version by adding the following line in the gemfile:
gem 'net-ssh', '2.6.8'
or in the thinegem.gemspec:
spec.add_dependency 'net-ssh', '2.6.8'
And if you did add the gemfile.lock into the project, it shell be used during a deployment anyway.
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 3.2.8) ruby depends on
railties (= 3.2.8) ruby
sass-rails (~> 4.0.0) ruby depends on
railties (4.0.0)
This error occured, how can i fix this error.
I do not know railties and sass-rails version.
If you're using Rails 3.2 you should use all gems with that branch too, i.e.:
Gemfile:
gem https://github.com/rails/sass-rails.git, branch: '3-2-stable'
You can see branches listed on GH next to green compare button (with new layout).
What if specific gem doesn't have branches? Well, you can fork it, modify the gemspec,see what fails and fix it.
My gemspec clearly requires active_support ~> 3.0, but bundler is failing to bundle install saying that my gem requires active_support = 3.0. WTF bundler? Can anyone explain this?
$ gem install code_filter
Successfully installed activesupport-3.0.0
Successfully installed active_support-3.0.0
Successfully installed code_filter-0.1.1
$ gem dependency code_filter
Gem code_filter-0.1.1
active_support (~> 3.0, runtime)
$ bundle
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://192.168.10.22/...
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://192.168.10.22/..
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
code_filter (= 0.1.1) ruby depends on
activesupport (= 3.0.0) ruby
json_builder (~> 3.1) ruby depends on
activesupport (3.0.20)
This is not the first time I've run into this, but here's a concrete example:
$ bundle update rails
Fetching source index for http://rubygems.org/
Bundler could not find compatible versions for gem "builder":
In Gemfile:
rails (~> 3.0.0) ruby depends on
builder (~> 2.1.2) ruby
hoptoad_notifier (>= 0) ruby depends on
builder (3.0.0)
So Bundler claims the hoptoad_notifier gem depends on the 3.0.0 version of builder. But that's not the case, it only requires builder >= 0.
$ gem dependency hoptoad_notifier
Gem hoptoad_notifier-2.4.11
actionpack (>= 0, development)
activerecord (>= 0, development)
activesupport (>= 0, runtime)
bourne (>= 0, development)
builder (>= 0, runtime)
nokogiri (>= 0, development)
shoulda (>= 0, development)
Why does Bundler think hoptoad_notifier depends on builder 3.0.0?
Selected bits from the Gemfile and Gemfile.lock:
source "http://rubygems.org"
gem 'rails', '~> 3.0.0'
gem 'hoptoad_notifier'
...a bunch of testing gems, custom gems, etc.
Gemfile.lock
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.14)
actionpack (= 2.3.14)
...
builder (3.0.0)
...
cucumber (1.2.0)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.10.0)
json (>= 1.4.6)
...
hoptoad_notifier (2.4.11)
activesupport
builder
... no other mentions of builder
I consider this more of a workaround than an answer to the question, so I'll leave the question open for a while to see if there's a better answer.
I found different ways to attack the problem (using bundle update on specific gems, modifying the Gemfile, running bundle install), but continued to run into some form of this error for various dependencies. It really seems like an issue with Bundler. (I'm using v1.0.22, upgrading made it worse.) Ultimately, what got me out of this mess was to delete the Gemfile.lock and run bundle install, letting Bundler resolve all the dependencies from scratch. Now of course, this is far from ideal, since the whole reason you have a lock file is to lock down your app's dependencies. But since I'm upgrading Rails to v3 anyway, it was acceptable in this case.