Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

bundle install is ignoring system-wide gem #2588

Closed
luislavena opened this issue Aug 9, 2013 · 6 comments
Closed

bundle install is ignoring system-wide gem #2588

luislavena opened this issue Aug 9, 2013 · 6 comments

Comments

@luislavena
Copy link
Member

Related to my questions in #2557, I was able to reproduce the scenario reported to me by several users.

A clean rails new foo is causing Bundler to install sqlite3 gem, even when the gem has been previously installed system-wide.

There is no previous usage of --path or --system, there is no .bundle at the user level or the project level.

The following is the entire information according to ISSUES document:

What you're trying to accomplish

For Bundler to use the already installed sqlite3 gem available system-wide

The command you ran

Checked sqlite3 was installed:

C:\Users\Luis\Code>gem list sqlite3 -d

*** LOCAL GEMS ***

sqlite3 (1.3.7)
    Authors: Jamis Buck, Luis Lavena, Aaron Patterson
    Homepage: http://github.com/luislavena/sqlite3-ruby
    Installed at: C:/Ruby200/lib/ruby/gems/2.0.0
gem install rails -v 4.0.0
rails new hello

What you expected to happen

For Bundler not to install sqlite3 gem (with platform x86-mingw32)

What actually happened

Bundler installed sqlite3 gem:

         run  bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
...
Installing sqlite3 (1.3.7)
...
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
C:\Users\Luis\Code>gem list sqlite3 -d

*** LOCAL GEMS ***

sqlite3 (1.3.7)
    Platform: x86-mingw32, ruby
    Authors: Jamis Buck, Luis Lavena, Aaron Patterson
    Homepage: http://github.com/luislavena/sqlite3-ruby
    Installed at: C:/Ruby200/lib/ruby/gems/2.0.0

It installed x86-mingw32 gem even when existing, same version, was present.

Everything output by running bundle env

Find it here: https://gist.github.com/luislavena/6194849

More details

This is a fresh Ruby 2.0.0 installation, on a new machine, where is no previous Bundler, Ruby or RubyGems configuration.

There are no GEM_HOME or BUNDLE* environment variables that could interfere.

After removal of the x86-mingw32 gem, bundle install no longer attempts to install it again:

C:\Users\Luis\Code\hello>gem uninstall sqlite3

Select gem to uninstall:
 1. sqlite3-1.3.7-x86-mingw32
 2. sqlite3-1.3.7
 3. All versions
> 1
Successfully uninstalled sqlite3-1.3.7-x86-mingw32

C:\Users\Luis\Code\hello>bundle install
...
Using sqlite3 (1.3.7)
...

C:\Users\Luis\Code\hello>gem list sqlite3 -d

*** LOCAL GEMS ***

sqlite3 (1.3.7)
    Authors: Jamis Buck, Luis Lavena, Aaron Patterson
    Homepage: http://github.com/luislavena/sqlite3-ruby
    Installed at: C:/Ruby200/lib/ruby/gems/2.0.0

I've also tested with --skip-bundle during application creation and later usage of bundle install --system but that combination also resulted in sqlite3 gem being installed again.

Let me know if further details are required.

Thank you in advance.

@luislavena
Copy link
Member Author

@indirect ping?

@andremedeiros
Copy link
Member

@luislavena is this still an issue for you?

@luislavena
Copy link
Member Author

@andremedeiros will need to check against latest version of bundler, but all the the instructions here should be enough to reproduce (or not).

@andremedeiros
Copy link
Member

I would have checked if I could. 

Problem is I don't have access to a windows machine :-(

@agis
Copy link
Contributor

agis commented Oct 21, 2015

@luislavena Hey! Any change you can check this on the latest bundler version?

@richbowen
Copy link

Closing this due to lack of a reply.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants