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

Bundle not working with two gemspecs - bug introduced in 1.7.14 #1942

Closed
PragTob opened this Issue Sep 3, 2014 · 11 comments

Comments

Projects
None yet
5 participants
@PragTob
Copy link

PragTob commented Sep 3, 2014

Hi all,

there seems to be a bug introduced in jruby-1.7.14 that when bundling in a folder with two+ gemspecs it will not work. It does not seem to be a bundler bug, as it does not happen on jruby-1.7.13 with the same bundler version (1.7.2) while it happens on 1.7.14 with bundler version 1.7.2.

I used this excellent sample repository created by @jasonrclark to recreate the issue, which he created when we noticed the bug on the shoes mailing list. The repository is this: https://github.com/jasonrclark/wat_two_gemspecs

See my command line output for a bit more details:

tobi@speedy:~/github$ git clone git@github.com:jasonrclark/wat_two_gemspecs.git
Cloning into 'wat_two_gemspecs'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 18 (delta 2), reused 18 (delta 2)
Receiving objects: 100% (18/18), done.
Resolving deltas: 100% (2/2), done.
Checking connectivity... done.
tobi@speedy:~/github$ cd wat_two_gemspecs/
tobi@speedy:~/github/wat_two_gemspecs$ rvm use jruby-1.7.14
Using /home/tobi/.rvm/gems/jruby-1.7.14
tobi@speedy:~/github/wat_two_gemspecs$ gem list

*** LOCAL GEMS ***

axiom-types (0.1.1)
bundler (1.7.2)
bundler-unload (1.0.2)
# snip...
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
thread_safe (0.3.4 java)
virtus (1.0.3)
tobi@speedy:~/github/wat_two_gemspecs$ bundle
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.3.2

RuntimeError: more then one gemspec found. please specify a specfile
An error occurred while installing another_gemspec (0.0.1), and Bundler cannot
continue.
Make sure that `gem install another_gemspec -v '0.0.1'` succeeds before
bundling.
tobi@speedy:~/github/wat_two_gemspecs$ rvm use --create jruby-1.7.13@wat
jruby-1.7.13 - #gemset created /home/tobi/.rvm/gems/jruby-1.7.13@wat
jruby-1.7.13 - #generating wat wrappers..........
Using /home/tobi/.rvm/gems/jruby-1.7.13 with gemset wat
tobi@speedy:~/github/wat_two_gemspecs$ gem list

*** LOCAL GEMS ***

gem-wrappers (1.2.4)
rvm (1.11.3.9)
tobi@speedy:~/github/wat_two_gemspecs$ gem install bundler
Fetching: bundler-1.7.2.gem (100%)
Successfully installed bundler-1.7.2
1 gem installed
tobi@speedy:~/github/wat_two_gemspecs$ bundle
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.3.2
Using another_gemspec 0.0.1 from source at .
Using bundler 1.7.2
Using wat_two_gemspecs 0.0.1 from source at .
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

I'd really appreciate a quick fix/release of 1.7.15 as this means that the current shoes4 build is not able to be installed with jruby-1.7.14 (we have 3 gemspecs).

Thanks for all your work on JRuby and ❤️ =)

Tobi

@blaet

This comment has been minimized.

Copy link

blaet commented Sep 4, 2014

I'm having a related issue with gems lacking a gemfile, which have been pulled directly from Github or referenced on a local path. In 1.7.13, bundler would successfully generate a gemspec for these. As of 1.7.14/15 I'm getting

RuntimeError: no gemspec found

FYI, I'm using rvm.

@PragTob

This comment has been minimized.

Copy link
Author

PragTob commented Sep 4, 2014

So sadly this problem persists in the 1.7.15 release :-(

Also FYI it seems not to be platform dependent (the original bug report on our Mailing list was from Windows7 - I reproduced on my Debian Testing).

Would love it if that makes the next release... because as it stands we are stuck on 1.7.13 and have to tell people not to use 1.7.14+. :-(

Also just to check I tried it with MRI 2.1.2 and it also works so definitely seems like a JRuby bug... but I dunno how.

@thedavemarshall

This comment has been minimized.

Copy link

thedavemarshall commented Sep 12, 2014

This error is actually getting raised from jar-dependencies, which I guess only recently got required by jruby. Maybe an issue should be created in @mkristian 's repo?

https://github.com/mkristian/jar-dependencies/blob/49c26c48bb470a810563498a0ee4b7254b30f4f4/lib/jar_installer.rb#L114

@kares

This comment has been minimized.

Copy link
Member

kares commented Sep 12, 2014

@thedavemarshall great tracking ... seemed definitely weird, I shall very much look at it if no one else will!

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Sep 12, 2014

sorry - 'bundler" issue did not trigger the flag "it could be jar-dependencies" - but it should have triggered !
@kares I am looking into this right now

@kares

This comment has been minimized.

Copy link
Member

kares commented Sep 12, 2014

@mkristian great ... jar-dependencies are probably adding to why gem invokes have been slower lately

@mkristian

This comment has been minimized.

Copy link
Member

mkristian commented Sep 12, 2014

@kares slower with gem install or with any other gem command ?

@kares

This comment has been minimized.

Copy link
Member

kares commented Sep 12, 2014

not sure about others but gem install very likely - I'm actually looking into how loading JRuby-OpenSSL impacts rubygems/bundler (thus mostly gem install) - and it subjectively feels that it got slower with 1.7 releases ... but than again that particular gem (jruby-openssl) includes jar requirements thus is probably understandable (at this point will need to run "bare" gem install benchmarks w/o jar-dependencies to make my claims valid)

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

@PragTob thanx for the sample repo - I used it for an integration-test on jar-dependencies

@PragTob

This comment has been minimized.

Copy link
Author

PragTob commented Sep 13, 2014

Thanks goes to @jasonrclark :-) More thanks for fixing it! So ❤️ 👍 thanks! =)

presidentbeef added a commit to presidentbeef/brakeman that referenced this issue Oct 7, 2014

Update travis config
Remove jruby until this is resolved:
jruby/jruby#1942

Update Ruby 2.0.0 to 2.1.2
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.