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

jruby-jars 1.7.14 gem seems to be missing jar files. #1926

Closed
ylansegal opened this issue Aug 27, 2014 · 14 comments
Closed

jruby-jars 1.7.14 gem seems to be missing jar files. #1926

ylansegal opened this issue Aug 27, 2014 · 14 comments
Milestone

Comments

@ylansegal
Copy link

@ylansegal ylansegal commented Aug 27, 2014

When I try to require jruby_jars, I get the following:

=> "jruby 1.7.14 (1.9.3p392) 2014-08-27 d368971 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_51-b13 +jit [darwin-x86_64]"
>> require 'jruby-jars'
NoMethodError: undefined method `gsub' for nil:NilClass
    from /Users/ylansegal/.rvm/gems/jruby-1.7.14/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb:2:in `JRubyJars'
    from /Users/ylansegal/.rvm/gems/jruby-1.7.14/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/ylansegal/.rvm/rubies/jruby-1.7.14/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/ylansegal/.rvm/gems/jruby-1.7.14/gems/jruby-jars-1.7.14/lib/jruby-jars.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1065:in `require'
    from /Users/ylansegal/.rvm/rubies/jruby-1.7.14/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:128:in `require'
    from /Users/ylansegal/.rvm/rubies/jruby-1.7.14/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:121:in `require'
    from /Users/ylansegal/.rvm/gems/jruby-1.7.14/gems/jruby-jars-1.7.14/lib/jruby-jars.rb:1:in `(root)'
    from org/jruby/RubyKernel.java:1101:in `eval'
    from (irb):1:in `(root)'
    from (irb):1:in `evaluate'
    from org/jruby/RubyKernel.java:1501:in `loop'
    from org/jruby/RubyKernel.java:1264:in `catch'
    from org/jruby/RubyKernel.java:1264:in `catch'
    from /Users/ylansegal/.rvm/rubies/jruby-1.7.14/bin/irb:13:in `(root)'

If I look around the installed gem for 1.7.13, I can see some jar files:

$ cd jruby-jars-1.7.13
$ find . -name '*.jar'
./lib/jruby-core-complete-1.7.13.jar
./lib/jruby-stdlib-complete-1.7.13.jar

But no so for 1.7.14:

$ cd jruby-jars-1.7.14
$ find . -name '*.jar'
$
@rtyler
Copy link

@rtyler rtyler commented Aug 28, 2014

I just experienced this issue as well but I'm not directly requiring jruby-jars but rather using warbler:

2014-08-27 17:18:33 warble aborted!
2014-08-27 17:18:33 NoMethodError: undefined method `gsub' for nil:NilClass
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb:2:in `JRubyJars'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb:1:in `(root)'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/jruby-jars-1.7.14/lib/jruby-jars.rb:1:in `(root)'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/jruby-jars-1.7.14/lib/jruby-jars.rb:1:in `(root)'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/traits/war.rb:1:in `(root)'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/traits/war.rb:71:in `default_jar_files'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/traits/war.rb:29:in `before_configure'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/traits.rb:28:in `before_configure'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/traits.rb:28:in `before_configure'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/config.rb:208:in `initialize'
2014-08-27 17:18:33 config/warble.rb:4:in `initialize'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/task.rb:46:in `initialize'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/application.rb:27:in `load_rakefile'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/gems/warbler-1.4.3/lib/warbler/application.rb:77:in `run'
2014-08-27 17:18:33 /home/jenkins/.rvm/gems/jruby-1.7.14@l4e/bin/jruby_executable_hooks:15:in `(root)'
2014-08-27 17:18:33 (See full trace by running task with --trace)
@mkristian
Copy link
Member

@mkristian mkristian commented Aug 28, 2014

$ bin/jruby -S gem install jruby-jars
Fetching: jruby-jars-1.7.14.gem (100%)
Successfully installed jruby-jars-1.7.14
1 gem installed
$ bin/jruby -S gem content jruby-jars
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/DEV_INSTRUCTIONS
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/History.txt
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/Mavenfile
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/README.txt
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/Rakefile
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/lib/jruby-jars.rb
/home/christian/projects/active/maven/jruby/lib/ruby/gems/shared/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb

@pparidans
Copy link

@pparidans pparidans commented Aug 28, 2014

Same problem here. As seen on rubygems.org, the release 1.7.13 is 19MB and the 1.7.14 is only 20K (?!).

@enebo
Copy link
Member

@enebo enebo commented Aug 28, 2014

hmmm. This is weird and mysterious. I will try and get permission to push a newly create jruby-jars over the old one since release 1.7.15 is much more than rev'ing this gem.

@rtyler
Copy link

@rtyler rtyler commented Aug 28, 2014

I've got a simple/easy reproduction case using my hellowarld test reproduction.

Basically:

  1. Clone repo
  2. rvm use jruby
  3. bundle update jruby-jars (to 1.7.14)
  4. bundle exec warble war

Which results in:

[8:42:18] tyler:hellowarld git:(master*) $ rm -f *.war && bundle exec warble war
file:/usr/home/tyler/.rvm/rubies/jruby-1.7.13/lib/jruby.jar!/jruby/kernel19/kernel.rb:25 warning: executable? does not in this environment and will return a dummy value
file:/usr/home/tyler/.rvm/rubies/jruby-1.7.13/lib/jruby.jar!/jruby/kernel19/kernel.rb:25 warning: executable? does not in this environment and will return a dummy value
warble aborted!
NoMethodError: undefined method `gsub' for nil:NilClass
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb:2:in `JRubyJars'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/jruby-jars-1.7.14/lib/jruby-jars/version.rb:1:in `(root)'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/jruby-jars-1.7.14/lib/jruby-jars.rb:1:in `(root)'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/jruby-jars-1.7.14/lib/jruby-jars.rb:1:in `(root)'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/traits/war.rb:1:in `(root)'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/traits/war.rb:71:in `default_jar_files'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/traits/war.rb:29:in `before_configure'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/traits.rb:28:in `before_configure'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/traits.rb:28:in `before_configure'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/config.rb:213:in `initialize'
config/warble.rb:4:in `initialize'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/task.rb:46:in `initialize'
/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/gems/warbler-1.4.4/lib/warbler/application.rb:27:in `load_rakefile'
/usr/home/tyler/.rvm/gems/jruby-1.7.13@rubygems/bin/warble:23:in `(root)'
(See full trace by running task with --trace)
[8:43:33] tyler:hellowarld git:(master*) $
@chahn
Copy link

@chahn chahn commented Aug 29, 2014

@enebo Thanks in advance!

@nbennke
Copy link

@nbennke nbennke commented Sep 2, 2014

Affects me too. There are no jar files in the lib directory. Any workarounds than downgrade to JRuby-1.7.13 suggested?

@enebo
Copy link
Member

@enebo enebo commented Sep 2, 2014

1.7.15 will be out today. So this also fixes a small handful of other unfortunate regressions we introduced in 1.7.14.

@rebelwarrior
Copy link

@rebelwarrior rebelwarrior commented Sep 2, 2014

@enebo I don't know if I'm psychic but when I installed 1.7.14 I had the feeling 1.7.15 would be right on it's tail. Then today I ran into the problem above... Thanks in advance!!

@enebo enebo added this to the JRuby 1.7.15 milestone Sep 2, 2014
@enebo
Copy link
Member

@enebo enebo commented Sep 2, 2014

Only 1.7.15 release can solve this so I am resolving (1.7.15 will be coming)

@enebo enebo closed this Sep 2, 2014
@junegunn
Copy link

@junegunn junegunn commented Sep 3, 2014

How about just yanking the broken gem to avoid further confusion until 1.7.15 is released?
Warbler chooses the latest version of jruby-jars, so the new installation of it won't work until then.

@mikeknep
Copy link

@mikeknep mikeknep commented Sep 3, 2014

I'm running into this issue with Warbler as well. +1 to @junegunn's suggestion if 1.7.15 isn't imminent...

@ylansegal
Copy link
Author

@ylansegal ylansegal commented Sep 3, 2014

For what is worth, I think yanking the gem is the correct move. If I understand correctly how rubygems work, there is no possibility of updating a gem, because of security issues with servers that may proxy and cache the gems (ie, heroku, local gem servers, etc). The 1.7.14 is clearly bad, because of the missing jars. The only option available seems to be yanking, along with a notice in the main jruby.org website.

@devopsdevon
Copy link

@devopsdevon devopsdevon commented Sep 11, 2014

For anyone using bundler that cannot upgrade to 1.7.15 and really needs warbler to work, here are some pointers to side-step warbler's default of pulling in the latest jruby-jars version (so you can continue to use 1.7.13, for example):
Gemfile.lock - remove the hard lock on the jruby-jars gem by removing the jruby-jars line (example: jruby-jars (1.7.14) )
Gemfile - add a gem line for the correct version of jruby-jars with the following line: gem 'jruby-jars', '1.7.13'
Run bundle install

This will have bundler install the exact jruby-jars version you want.
Warbler will happily use the older version if that is what you have present (it has pretty loose requirements on the jruby-jar version).
You may have to remove or bundle clean the old jruby-jars gem out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet