Couldn't require openssl in ruby Couldn't require openssl in ruby ruby ruby

Couldn't require openssl in ruby


Note: Calls to rubygems.org are deprecated - proceed with caution!

I had the same issue on Mac OSX after also building ruby2.1.0p0 from the source. I already had openssl installed. It appears that the reference in gems needed refreshing. I ran:

gem source -r https://rubygems.org/ to remove

followed by

gem source -a https://rubygems.org/ to read

After this, I was able to run gems install bundler successfully.

If you run into further errors, you can try ./configure --with-openssl-dir=/usr/local/ssl in your ruby downloaded dir/.


I got this error while using debian where openssl was in /usr/bin.

Following the suggestion of jspacek I reconfigured ruby using:

./configure --with-openssl-dir=/usr/bin

After make and sudo make install I was able to install rails.


make sure you have libssl-dev installed:

dpkg -s libssl-dev

if not, install it:

sudo apt-get -y install libssl-dev