Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Pull request to install gems using clean Bundler environment #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MarkDBlackwell
Copy link

This pull request (under special circumstances) restores (problematic) user-gem installation to proper working order, as explained below.

Also (with this pull request), if user gem installation fails, an exception will be raised.

In certain circumstances, doing rake gem:install (for a user gem) somehow silently and consistently fails. This failure may be happening because of the following circumstances. (Or, so I suspect—at minimum, these are unusual features.):

  1. In the user gem, a development dependency (activerecord 3.2.14) is older than the latest released version (activerecord: the latest is 4.0.0).
  2. In RVM, the current Ruby version is 1.9.3, although Ruby 2.0.0 has been installed.

In these circumstances, not using a clean Bundler environment seems sufficient to cause the problem.

The observed problematic behavior of the command is that it silently forgets to install the user's gem, as follows:

$ cd {cloned-gem-directory}
$ bundle update activesupport
$ rvm list gemsets
rvm gemsets
   ruby-1.9.3-p392 [ i686 ]
   ruby-1.9.3-p392@beamtous [ i686 ]
   ruby-1.9.3-p392@global [ i686 ]
=> ruby-1.9.3-p392@rails_apps_composer [ i686 ]
   ruby-2.0.0-p0 [ i686 ]
   ruby-2.0.0-p0@global [ i686 ]
   ruby-2.0.0-p0@rails_apps_composer [ i686 ]
   ruby-2.0.0-p195 [ i686 ]
   ruby-2.0.0-p195@global [ i686 ]
   ruby-2.0.0-p195@rails_apps_composer [ i686 ]
   ruby-2.0.0-p247 [ i686 ]
   ruby-2.0.0-p247@global [ i686 ]
   ruby-2.0.0-p247@rails_apps_composer [ i686 ]
$ bundle exec rake gem:install
gem install dist/{user-gem-name-and-version}.gem
Successfully installed minitest-4.7.5
Building native extensions.  This could take a while...
Successfully installed atomic-1.1.10
Successfully installed thread_safe-0.1.2
3 gems installed
$ gem list {user-gem-name} --all
*** LOCAL GEMS ***

Note that gem {user-gem-name} mysteriously and silently has failed installation!

Gemspec and Gemfile.lock files for the problem are available if desired. My versions:

$ rvm --version
rvm 1.21.15 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ bundle exec rake --version
rake, version 10.1.0
$ bundle --version
Bundler version 1.3.5
$ cat /proc/version
Linux version 3.2.0-4-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.46-1

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

Successfully merging this pull request may close these issues.

1 participant