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

bundler error on JRuby when Gemfile contains MRI specific gems with git source #579

Closed
rsim opened this issue Aug 16, 2010 · 3 comments
Closed

Comments

@rsim
Copy link

rsim commented Aug 16, 2010

I am trying to run ActiveRecord unit tests in 3-0-stable branch on JRuby 1.5.1. Rails repository Gemfile contains

platforms :ruby do
  # ...
  gem "mysql2", :git => 'git://github.com/brianmario/mysql2.git'
  # ...
end

When I run bundle install with JRuby it fetches git://github.com/brianmario/mysql2.git (as I understand bundler is fetching git sources even if they are not necessary for current platform). But when I run rake test task I get error:

.../.rvm/gems/jruby-1.5.1/gems/bundler-1.0.0.rc.5/lib/bundler/source.rb:558:in `load_spec_files': git://github.com/brianmario/mysql2.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)
from .../.rvm/gems/jruby-1.5.1/gems/bundler-1.0.0.rc.5/lib/bundler/source.rb:378:in `local_specs'

If I comment out this mysql2 line in Gemfile then everythin works fine (there are no issues with MRI specific gems that use rubygems.org as a source).

@nicksieger
Copy link
Contributor

@indirect
Copy link
Member

Figured out the error, thanks for reporting this. I'll commit a fix shortly.

@indirect
Copy link
Member

Don't unlock sources that are on a different platform

If you unlock a source when it is on a different platform, there is
no way to re-lock the source, since a resolve cannot be run on this
platform to lock a source on another platform. An exception results.

Closed by c5ee67e

joevandyk pushed a commit to joevandyk/bundler that referenced this issue May 16, 2011
If you unlock a source when it is on a different platform, there is
no way to re-lock the source, since a resolve cannot be run on this
platform to lock a source on another platform. An exception results.

Closes rubygems#579
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants