Discussion:
bundler "Could not find rake-0.9.2.2.gem for installation"
Tim Serong
2013-05-22 11:36:02 UTC
Permalink
Hi All,

Let's pretend I want to use bundler to package up all the gems used in a
rails app, but I don't want to go out to rubygems.org, I just want to
use the gems already installed on the system (which happen to be already
installed via "zypper in rubygem-rails-3_2").

The Gemfile for this example is deliberately short, and contains one line:

gem 'rails', '> 3'

Notably, it doesn't include a "source" line, so bundler falls back to
only using already installed local gems.

Now, in theory, I can run "bundle package" then "bundle install
--deployment" and this shoves everything I want into the vendor
directory somewhere.

What actually happens though is:

# bundle package
Using rake (0.9.2.2)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.12)
Using builder (3.0.4)
Using activemodel (3.2.12)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.12)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.12)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.12)
Using activeresource (3.2.12)
Using bundler (1.2.3)
Using rack-ssl (1.3.2)
Using rdoc (3.9.5)
Using thor (0.16.0)
Using railties (3.2.12)
Using rails (3.2.12)
Your bundle is complete! Use `bundle show [gemname]` to see where a
bundled gem is installed.
Updating files in vendor/cache
Could not find rake-0.9.2.2.gem for installation

AFAICT it's choking on rake-0.9.2.2.gem, because this file doesn't
actually exist, as rake is provided by the ruby package on openSUSE,
it's not there as a separate gem (no rubygem-rake package).

Does anyone know if there's some magic incantation I can give to bundler
so it skips this gem? Or should we actually be packaging
rake-0.9.2.2.gem inside the ruby rpm? Or...?

Thanks,

Tim
--
Tim Serong
Senior Clustering Engineer
SUSE
tserong-IBi9RG/***@public.gmane.org
Tim Serong
2013-05-23 08:14:25 UTC
Permalink
Post by Tim Serong
Hi All,
Let's pretend I want to use bundler to package up all the gems used in a
rails app, but I don't want to go out to rubygems.org, I just want to
use the gems already installed on the system (which happen to be already
installed via "zypper in rubygem-rails-3_2").
gem 'rails', '> 3'
Notably, it doesn't include a "source" line, so bundler falls back to
only using already installed local gems.
Now, in theory, I can run "bundle package" then "bundle install
--deployment" and this shoves everything I want into the vendor
directory somewhere.
# bundle package
Using rake (0.9.2.2)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.12)
Using builder (3.0.4)
Using activemodel (3.2.12)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.12)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.12)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.12)
Using activeresource (3.2.12)
Using bundler (1.2.3)
Using rack-ssl (1.3.2)
Using rdoc (3.9.5)
Using thor (0.16.0)
Using railties (3.2.12)
Using rails (3.2.12)
Your bundle is complete! Use `bundle show [gemname]` to see where a
bundled gem is installed.
Updating files in vendor/cache
Could not find rake-0.9.2.2.gem for installation
AFAICT it's choking on rake-0.9.2.2.gem, because this file doesn't
actually exist, as rake is provided by the ruby package on openSUSE,
it's not there as a separate gem (no rubygem-rake package).
Does anyone know if there's some magic incantation I can give to bundler
so it skips this gem? Or should we actually be packaging
rake-0.9.2.2.gem inside the ruby rpm? Or...?
I think I found the magic. It seems if I remove rake (and json, which
is also provided in the ruby package) from Gemfile.lock, I get what I want.

Regards,

Tim
--
Tim Serong
Senior Clustering Engineer
SUSE
tserong-IBi9RG/***@public.gmane.org
Loading...