Bug 923926 - bundler install --local cannot resolve locally installed gems
Summary: bundler install --local cannot resolve locally installed gems
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-bundler
Version: 18
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-20 18:04 UTC by Orion Poplawski
Modified: 2013-04-19 22:45 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-04-19 22:45:20 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Orion Poplawski 2013-03-20 18:04:46 UTC
Description of problem:

bundler install --local refused to recognize locally install gems, either rpms or via gem install.  I'm not very familiar with bundler, but it seems like it should be able to find the gems as shown by gem list.

rpm case:

[orion@barry bundle]$ cat Gemfile 
gem 'i18n', '0.6.0'
[orion@barry bundle]$ rpm -q rubygem-i18n
rubygem-i18n-0.6.0-1.fc18.noarch
[orion@barry bundle]$ gem list i18n

*** LOCAL GEMS ***

i18n (0.6.0)
[orion@barry bundle]$ bundle install --local --path vendor
Your Gemfile has no remote sources. If you need gems that are not already on
your machine, add a line like this to your Gemfile:
    source 'https://rubygems.org'
Could not find gem 'i18n (= 0.6.0) ruby' in the gems available on this machine.

gem install case:

[orion@barry bundle]$ ls /usr/local/share/gems/specifications
hike-1.2.1.gemspec
[orion@barry bundle]$ rpm -q rubygem-hike
package rubygem-hike is not installed
[orion@barry bundle]$ gem list hike

*** LOCAL GEMS ***

hike (1.2.1)
[orion@barry bundle]$ cat Gemfile 
gem 'hike', '1.2.1'
[orion@barry bundle]$ bundle install --local --path vendor
Your Gemfile has no remote sources. If you need gems that are not already on
your machine, add a line like this to your Gemfile:
    source 'https://rubygems.org'
Could not find gem 'hike (= 1.2.1) ruby' in the gems available on this machine.

Version-Release number of selected component (if applicable):
rubygem-bundler-1.1.4-2.fc18.noarch

Comment 1 Bohuslav "Slavek" Kabrda 2013-03-21 07:01:36 UTC
Why exactly are you using "--path vendor"? This option is used for installing gems in a different location (e.g. vendor in your examples) [1]. If you omit the "--path vendor", Gemfile.lock will get generated and everything will work fine.

[1] http://gembundler.com/v1.3/bundle_install.html

Comment 2 Orion Poplawski 2013-03-21 14:51:47 UTC
Well, my goal was to have all "missing" (not installed on the system) gems installed in an application specific directory, not on the system.  But from reading the man page it seems this may not be possible.  If I drop --path, it does seem to find locally installed gems, but then installs them in my ~/.gem directory, which I don't want.  Thanks for the help.


Note You need to log in before you can comment on or make changes to this bug.