Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

bundle can not find (jruby) platform gems #2135

Closed
kares opened this Issue · 6 comments

7 participants

@kares

Gemfile

source "http://rubygems.org"
gem 'jruby-rack-worker', "0.7"

NOTE: jruby-rack-worker 0.7 is gemspec-ed with gem.platform = 'java'

bundle ends up with :

Fetching gem metadata from http://rubygems.org/...
Could not find jruby-rack-worker-0.7-java in any of the sources

gem install jruby-rack-worker -v 0.7 works as a work-around :

Fetching: jruby-rack-worker-0.7-jruby.gem (100%)
Successfully installed jruby-rack-worker-0.7-java
1 gem installed

bundle than work as expected :

Using jruby-rack (1.1.10) 
Using jruby-rack-worker (0.7) 
Using bundler (1.2.1) 

Bundler version 1.2.1
JRuby jruby 1.6.8 (ruby-1.8.7-p357) (2012-09-18 1772b40) same on 1.7.0

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.24
  - RUBY VERSION: 1.8.7 (2012-09-18 patchlevel 357) [java]
  - INSTALLATION DIRECTORY: /opt/local/rvm/gems/jruby-1.6.8@trinidad
  - RUBY EXECUTABLE: /opt/local/rvm/rubies/jruby-1.6.8/bin/jruby
  - EXECUTABLE DIRECTORY: /opt/local/rvm/gems/jruby-1.6.8@trinidad/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-java-1.6
  - GEM PATHS:
     - /opt/local/rvm/gems/jruby-1.6.8@trinidad
     - /opt/local/rvm/gems/jruby-1.6.8@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "install" => "--no-rdoc --no-ri"
     - "update" => "--no-rdoc --no-ri"
     - "gem" => "--no-ri --no-rdoc"
     - :sources => ["http://gems.rubyforge.org"]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org
@kares kares referenced this issue in kares/jruby-rack-worker
Open

[hack] remove gem.platform = 'jruby' #7

@indirect
Owner

This sounds like a bug in the way that Bundler handles gems that only exist on one platform. Thanks for reporting!

@joelash

+1

@t6d

+1

@xaviershay
Collaborator

Looks like it's fixed on 1.3.5. The following works for me:

#!/bin/bash

set -ex

ISSUE=2135

mkdir -p /tmp/repro-$ISSUE
cd /tmp/repro-$ISSUE

# Must use jruby
(ruby -v | grep jruby) || exit 1

# Need to not have this gem installed
(! gem list jruby-rack-worker | grep jruby-rack) || exit 1

cat > Gemfile <<EOF
source "https://rubygems.org"
gem 'jruby-rack-worker', "0.7"
EOF

bundle install

(protip to run this with rbenv: rbenv shell jruby-1.7.4 before executing)

@xaviershay xaviershay closed this
@kares kares referenced this issue from a commit in jruby/jruby
@mkristian mkristian remove wrong import 6a4cca9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.