1

It's a relatively common error for new users of Ruby on Linux to not have openssl compiled into their Ruby. We've got a gem that requires 'openssl' and every once in a while it blows up on somebody with a LoadError on 'openssl'. The fix is usually to point them at https://rvm.beginrescueend.com/packages/openssl/

Is there any way to convert this from a run-time error into an install error? We can't add a dependency in the gemspec because openssl isn't a gem.

1 Answer 1

1

You can try checking for the lib by putting some code in mkrf_conf.rb

Take a look at https://github.com/timcharper/spork/blob/master/ext/mkrf_conf.rb where the author checks for the OS and installes a gem. I am sure you can check for the OS and install a package (ie: apt-get install openssl-lib in ubuntu ...etc).

Another example.

Never tried this my self though. Let us know how it goes.

Sign up to request clarification or add additional context in comments.

1 Comment

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.