archiloque/rest-client — Issue #115: Add error message about the jruby-openssl gem if the OpenSSL constant cannot be found
Author: strife25
Created: 2012-02-10 16:27:32+00:00
State: open

When making a call to Restclient on JRuby, we encountered the following error:

```
uninitialized constant OpenSSL::SSL (NameError)
org/jruby/RubyModule.java:2590:in `const_missing'
````

Since this error was a result of running some code in JRuby, a better error message should be provided to the user about installing the jruby-openssl gem if they are running on JRuby. An alternative to this is to make the jruby-openssl gem a dependency in the gem spec, but from my research, that looks like bad practice since it's a runtime dependency that only affects JRuby.

[Here is a nice article explaining how the relish gem dealt with this problem](http://blog.mattwynne.net/2011/04/26/targeting-multiple-platforms-jruby-etc-with-a-rubygems-gemspec/)