Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemfiles that use `:path` broken between 1.7.13 and 1.7.15 #1965

Closed
cprice404 opened this Issue Sep 11, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@cprice404
Copy link
Contributor

cprice404 commented Sep 11, 2014

If you run this shell script:

#!/usr/bin/env bash

mkdir foo
cd foo

cat <<EOF > ./Gemfile
source ENV['GEM_SOURCE'] || "https://rubygems.org"

puts "foo gem, path/dirname: #{__FILE__} / #{File.dirname(__FILE__)}"
gem "foo", :path => File.dirname(__FILE__), :require => false
EOF

cat <<EOF > ./.gemspec
Gem::Specification.new do |s|
  s.name = "foo"
  version = "0.0.1"
  mdata = version.match(/(\d+\.\d+\.\d+)/)
  s.version = mdata ? mdata[1] : version
  s.authors = ["foo"]
  s.summary = "foo"
end
EOF

it will create a minimal directory structure that has a Gemfile and a .gemspec, where the Gemfile uses the :path attribute to reference the .gemspec in the local directory.

This works fine with bundler under jruby 1.7.13, but doesn't work under 1.7.15:

$ cd foo
$ rbenv shell jruby-1.7.15
$ bundle install --path ./bundle
foo gem, path/dirname: /opt/git/foo/foo/Gemfile / /opt/git/foo/foo
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...

RuntimeError: no gemspec found
An error occurred while installing foo (0.0.1), and Bundler cannot continue.
Make sure that `gem install foo -v '0.0.1'` succeeds before bundling.
$ rbenv shell jruby-1.7.13
$ bundle install --path ./bundle
foo gem, path/dirname: /opt/git/foo/foo/Gemfile / /opt/git/foo/foo
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using foo 0.0.1 from source at /opt/git/jvm-puppet/puppet-server/ruby/foo/foo
Using bundler 1.7.2
Your bundle is complete!
It was installed into ./bundle
@kwando

This comment has been minimized.

Copy link

kwando commented Sep 12, 2014

Are you using the same version of bundler for both jruby versions?

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Sep 12, 2014

this looks very much related to #1942

mkristian added a commit to mkristian/jar-dependencies that referenced this issue Sep 12, 2014

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Sep 12, 2014

work around is to install jar-dependencies gem version 0.1.0

@mkristian mkristian added this to the JRuby 1.7.16 milestone Sep 12, 2014

mkristian added a commit that referenced this issue Sep 12, 2014

@mkristian mkristian closed this Sep 12, 2014

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Sep 12, 2014

@cprice404 thanx for the bash script to setup a failing sample - used it as integration-test on jar-dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.