13

When running my rails application on torquebox, I get a lot of

already initialized constant: ...

warnings that originate from gems/jruby-openssl-0.8.2/lib/shared/jruby-openssl.rb:16. Is this a security problem? Is there any way to get rid of these warnings?

2
  • 1
    having same warnings too
    – Çağdaş
    Jan 25, 2013 at 8:09
  • I'm trying to figure this out and can't even find the code to see what's on the offending line. My guess is this is packaged with JRuby itself and needs to be issued to teh JRuby group on CodeHaus.org? Still looking...
    – Jeff Ancel
    Jan 28, 2013 at 16:31

2 Answers 2

14

I could finally get rid of it by removing the gem altogether. According to this source, jruby-openssl is now directly pulled into the jruby project and is not needed anymore as gem.

Thanks everyone for looking into this with me.

0
7

I am no longer getting these errors after adding the following to my line in Gemfile.

gem 'jruby-openssl', :require => false

I hope this helps out.

7
  • From reading around on the comments, seems that this is only necessary to be available. Adding the require => false seemed logical, after I read somewhere that this is really a workaround for the way in which jruby library has packaged openssl (according to some posts on Jruby site.
    – Jeff Ancel
    Jan 28, 2013 at 17:09
  • this works for me too. but wanna know whats happening really :)
    – Çağdaş
    Jan 29, 2013 at 7:47
  • 1
    Can you please add a source where you found this information? I'd like to read a bit further before I apply your fix.
    – panmari
    Jan 29, 2013 at 10:27
  • 1
    The resource I saw, which I can't find anymore, was in a reference to when I was really just trying to find out why there is no code in the jruby-ossl library, and it's because it's been included in jruby core. The way that jruby-core loads openssl (which I believe is where the issue really is), is what makes you need to put this gem in your Gemfile at all (try to find the source for the Gem). So putting require => false makes code available if needed.
    – Jeff Ancel
    Jan 29, 2013 at 12:47
  • Perhaps removing the gem completely will expose the error. I haven't tried this step, but if you do that and have the error, and search on it, you may find it. I consider this a JRUBY workaround, as their integration with obenssl is somewhat vague as there is no source in this gem (at least on github currently). Previous versions, sure.
    – Jeff Ancel
    Jan 29, 2013 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.