# Mac OS 10.8.2 and openssl

**URL:** <https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970>\
**Category:** Ruby\
**Created:** [February 27, 2013, 10:40am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970 "2013-02-27T10:40:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 10:40am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/1 "2013-02-27T10:40:57Z")

</div>

Hi everybody,  
I just installed the current ruby 2.0.0p0 on a Mac OS 10.8.2.

$ ruby --version  
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86\_64-darwin12.2.0]

Then I want to install my gems as usual:  
$ gem install terminal-notifier  
ERROR: Loading command: install (LoadError)  
cannot load such file – openssl  
ERROR: While executing gem … (NoMethodError)  
undefined method `invoke\_with\_build\_args’ for nil:NilClass

I remember reading that ruby 2.0 is not using the SSL gem anymore, but  
the system installed openssl instead. I guess this is the problem here,  
but there is an openssl available in my $PATH:

$ which openssl  
/usr/bin/openssl

I guess this is an FAQ, but could not find anything related. What is the  
prefereed way to fix this? Do I have to explicitly tell ruby where the  
openssl lives?

Many TIA,  
Jan H.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 10:43am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/2 "2013-02-27T10:43:17Z")

</div>

On 27.02.2013, at 10:32, Dr. Hegewald [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> $ which openssl  
> /usr/bin/openssl

Sorry, forgot to add openssl version:

$ openssl version  
OpenSSL 0.9.8r 8 Feb 2011

Cheers,  
Jan H.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 10:48am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/3 "2013-02-27T10:48:33Z")

</div>

Subject: Mac OS 10.8.2 and openssl  
Date: mer 27 feb 13 06:32:24 +0900

Quoting Dr. Hegewald ([removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)):

> Then I want to install my gems as usual:  
> $ gem install terminal-notifier  
> ERROR: Loading command: install (LoadError)  
> cannot load such file – openssl  
> ERROR: While executing gem … (NoMethodError)  
> undefined method `invoke\_with\_build\_args’ for nil:NilClass

If you compile from source, try to go to \<path\_of\_source\>/ext/openssl,  
and type this:

ruby extconf.rb  
make  
sudo make install

Does the process complete without errors? If so, you should at this  
point try again the gem loading command.

Carlo

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 11:46am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/4 "2013-02-27T11:46:27Z")

</div>

Subject: Re: Mac OS 10.8.2 and openssl  
Date: mer 27 feb 13 07:18:50 +0900

Quoting Dr. Hegewald ([removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)):

> that does not seem to work:

So that’s the reason. Of course if you download openssl (latest is

[http://www.openssl.org/source/openssl-1.0.1e.tar.gz](http://www.openssl.org/source/openssl-1.0.1e.tar.gz)

), compile and install it, it _should_ be installed under  
/usr/local. Then, when you call extconf.rb you _should_ pick it in  
preference of the default Apple version. And compilation of the Ruby  
openssl extensions _should_ proceed OK.

Of course, I cannot guarantee anything about this as I am too poor to  
own a mac ;-). Also, there is another caveat: I have no idea  
whatsoever if the other apps in MacOS will be happy about the  
change. You could open a can of worms…

The other path is to learn how to install Openssl in another directory  
(read the INSTALL file), and then include the path where the new  
openssl.pc file is stored after you run make install at the beginning  
of the PKG\_CONFIG\_PATH shell variable, before executing extconf.rb.  
This way, you will keep two separate copies, and Ruby will always use  
the newer one, while the rest will still find the old one.

Good luck!

Carlo

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 11:47am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/5 "2013-02-27T11:47:37Z")

</div>

Hi all,

On 27.02.2013, at 11:18, “Dr. Hegewald” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> extconf.rb:62:in `<main>': Ignore OpenSSL broken by Apple. (RuntimeError) Please use another openssl. (e.g. using `configure  
> –with-openssl-dir=/path/to/openssl’)

OK, I installed another openssl (OpenSSL 1.0.1e 11 Feb 2013) and tried  
to tell configure about it using the above mentioned flag:

$ ./configure --with-openssl-dir=/Users/me/bin/openssl-1.0.1e-bin/bin  
–prefix=/Users/me/bin/ruby-2.0.0-p0-bin  
configure: WARNING: unrecognized options: --with-openssl-dir

Huh? What is that?

Cheers,  
Jan

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 12:05pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/6 "2013-02-27T12:05:09Z")

</div>

Hi Carlo and all,

On 27.02.2013, at 11:45, “Carlo E. Prelz” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> [http://www.openssl.org/source/openssl-1.0.1e.tar.gz](http://www.openssl.org/source/openssl-1.0.1e.tar.gz)
> 
> ), compile and install it, it _should_ be installed under  
> /usr/local. Then, when you call extconf.rb you _should_ pick it in  
> preference of the default Apple version. And compilation of the Ruby  
> openssl extensions _should_ proceed OK.

No, I do not want to change the default openssl. This would require  
admin access and probably messes with other things.

> Of course, I cannot guarantee anything about this as I am too poor to  
> own a mac ;-). Also, there is another caveat: I have no idea  
> whatsoever if the other apps in MacOS will be happy about the  
> change. You could open a can of worms

(-:

> The other path is to learn how to install Openssl in another directory

I did that, see my previous mail.

> then include the path where the new  
> openssl.pc file is stored after you run make install at the beginning  
> of the PKG\_CONFIG\_PATH shell variable, before executing extconf.rb.

Sorry, this description is to compact for me to follow. Do I still need  
to pass --with-openssl-dir to configure?

Many thanks,  
Jan

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 11:19am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/7 "2013-02-27T11:19:33Z")

</div>

Hi Carlo and all,

On 27.02.2013, at 10:45, Carlo E. Prelz [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > undefined method `invoke\_with\_build\_args’ for nil:NilClass
> 
> If you compile from source, try to go to \<path\_of\_source\>/ext/openssl,  
> and type this:
> 
> ruby extconf.rb

that does not seem to work:

$ ruby extconf.rb  
checking for t\_open() in -lnsl… no  
checking for socket() in -lsocket… no  
checking for assert.h… yes  
checking for openssl/ssl.h… yes  
checking for OpenSSL\_add\_all\_digests() in -lcrypto… yes  
checking for SSL\_library\_init() in -lssl… yes  
checking for openssl/conf\_api.h… yes  
checking for SSL\_library\_init() in openssl/ssl.h with  
-Werror=deprecated-declarations… no  
extconf.rb:62:in `<main>': Ignore OpenSSL broken by Apple. (RuntimeError) Please use another openssl. (e.g. using `configure  
–with-openssl-dir=/path/to/openssl’)

So do I really have to install another openssl? If I do so, can I  
exclude it from my $PATH, as it is set via --with-openssl-dir ?

Cheers,  
Jan

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 2:33pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/8 "2013-02-27T14:33:35Z")

</div>

Subject: Re: Mac OS 10.8.2 and openssl  
Date: mer 27 feb 13 07:58:37 +0900

Quoting Dr. Hegewald ([removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)):

> > The other path is to learn how to install Openssl in another directory
> 
> I did that, see my previous mail.
> 
> > then include the path where the new  
> > openssl.pc file is stored after you run make install at the beginning  
> > of the PKG\_CONFIG\_PATH shell variable, before executing extconf.rb.
> 
> Sorry, this description is to compact for me to follow. Do I still  
> need to pass --with-openssl-dir to configure?

This is a bit off-topic for this list, so I will have to be concise.

Say you want to install openssl in /path/to/install:

1. 

mkdir -p /path/to/install

1. (from the source of openssl)  
./Configure darwin64-x86\_64-cc --prefix=/path/to/install  
–openssldir=/path/to/install/openssl/  
make  
make install

2. (from …/ruby/ext/openssl)  
export PKG\_CONFIG\_PATH=/path/to/install/lib/pkgconfig:$PKG\_CONFIG\_PATH  
make clean  
ruby extconf.rb  
make  
make install

If this fails, you should seek help from someone who knows more than I  
do about macos.

Carlo

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 4:09pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/9 "2013-02-27T16:09:29Z")

</div>

Subject: Re: Mac OS 10.8.2 and openssl  
Date: mer 27 feb 13 11:19:26 +0900

Quoting Dr. Hegewald ([removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)):

> > 1. (from …/ruby/ext/openssl)  
> > export PKG\_CONFIG\_PATH=/path/to/install/lib/pkgconfig:$PKG\_CONFIG\_PATH  
> > make clean  
> > ruby extconf.rb
> 
> This command fails with the same error as before,

Are you sure you executed the export command correctly? What do you  
get if you type

echo $PKG\_CONFIG\_PATH

? And if you type

ls -al /path/to/install/lib/pkgconfig

? Also, the contents of the mkmf.log file may be useful.

> Many thanks for your efforts here Carlo. But I think I have to go  
> back to ruby 1.9.3 until I get new input on the issue.

Maybe… Somebody who regularly uses Ruby under Mac will eventually  
offer the right solution.

Carlo

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 4:28pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/10 "2013-02-27T16:28:13Z")

</div>

On Wed, Feb 27, 2013 at 3:32 AM, Dr. Hegewald [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ERROR: Loading command: install (LoadError)  
> cannot load such file – openssl

Take a look at ruby-build. It handles the ins & outs of compiling Ruby  
on the Mac, including OpenSSL:

> **[GitHub - rbenv/ruby-build: A tool to download, compile, and install Ruby on...](https://github.com/rbenv/ruby-build)**
>
> A tool to download, compile, and install Ruby on Unix-like systems.

Otherwise, you’ll need to build openssl, configure Ruby  
–with-openssl-dir, and fetch your own root CA certificates. Big song  
and dance.

RVM can wrap this up for you, too: [RVM: Ruby Version Manager - Installing RVM](https://rvm.io/rvm/install/)

(I wish Ruby kept support for Apple’s patched OpenSSL, even though  
it’s deprecated and broken.)

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 3:20pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/11 "2013-02-27T15:20:22Z")

</div>

Hi Carlo and all,

On 27.02.2013, at 14:33, “Carlo E. Prelz” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > openssl.pc file is stored after you run make install at the beginning  
> > > of the PKG\_CONFIG\_PATH shell variable, before executing extconf.rb.
> > 
> > Sorry, this description is to compact for me to follow. Do I still  
> > need to pass --with-openssl-dir to configure?
> 
> This is a bit off-topic for this list, so I will have to be concise.

Ups, do you know a better list for questions about compiling ruby?

> Say you want to install openssl in /path/to/install:

openssl compiles and installed just fine. It is OpenSSL 1.0.1e 11 Feb  
2013, as I wrote previously.

> 1. (from …/ruby/ext/openssl)  
> export PKG\_CONFIG\_PATH=/path/to/install/lib/pkgconfig:$PKG\_CONFIG\_PATH  
> make clean  
> ruby extconf.rb

This command fails with the same error as before,

extconf.rb:62:in `<main>': Ignore OpenSSL broken by Apple. (RuntimeError) Please use another openssl. (e.g. using `configure  
–with-openssl-dir=/path/to/openssl’)

And the suggested solution does not work, as the ruby configure does not  
understand the --with-openssl-dir flag.

Many thanks for your efforts here Carlo. But I think I have to go back  
to ruby 1.9.3 until I get new input on the issue.

Cheers,  
Jan H.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 4:42pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/12 "2013-02-27T16:42:51Z")

</div>

On Wed, Feb 27, 2013 at 7:27 AM, Jeremy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> RVM can wrap this up for you, too: [RVM: Ruby Version Manager - Installing RVM](https://rvm.io/rvm/install/)

Yep, I just installed Ruby 2.0 using rvm on a Mac (10.7.5) that has  
the old Apple ‘OpenSSL 0.9.8r 8 Feb 2011’ with no problem.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 7:08pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/13 "2013-02-27T19:08:59Z")

</div>

I have spent the last couple of days struggling to get Ruby 2.0 to  
compile under Mac OS X 10.8.2 using first RVM and as of last night  
Chruby. I  
have come to realize the full extent of this openssl issue after trying  
to follow the instructions at

> **[Home](https://github.com/postmodern/chruby/wiki/)**
>
> Changes the current Ruby. Contribute to postmodern/chruby development by creating an account on GitHub.

• I am using Homebrew so I installed openssl and am also having the  
issue that trying to use --with-openssl-dir option on ./configure is not  
working.

• Compiling Ruby 2.0 without this works, but then I cannot install  
Bundler 1.3  
because it can’t find openssl, so I am dead in the water at that point.

I would also appreciate some clear syntax and steps to compile Ruby 2.0  
properly under Mac OS X, of course in my case using Homebrew and Chruby.  
This is turning out to be much harder than I thought and from what I see  
has been a known issue for some months.

Any help or link to a site would be appreciated. I have Googled till my  
eyes bled and unfortunately the best site I found was mostly in  
Japanese.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 11:58pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/14 "2013-02-27T23:58:18Z")

</div>

On Wed, Feb 27, 2013 at 12:09 PM, guillermo haas-thompson  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I would also appreciate some clear syntax and steps to compile Ruby 2.0  
> properly under Mac OS X, of course in my case using Homebrew and Chruby.  
> This is turning out to be much harder than I thought and from what I see  
> has been a known issue for some months.

chruby works well with ruby-build.

Use ruby-build to install 2.0.0-p0. It’ll handle the OpenSSL setup.

> **[GitHub - rbenv/ruby-build: A tool to download, compile, and install Ruby on...](https://github.com/rbenv/ruby-build#readme)**
>
> A tool to download, compile, and install Ruby on Unix-like systems.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 27, 2013, 11:55pm UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/15 "2013-02-27T23:55:57Z")

</div>

On Wed, Feb 27, 2013 at 9:41 AM, Hassan S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Yep, I just installed Ruby 2.0 using rvm on a Mac (10.7.5) that has  
> the old Apple ‘OpenSSL 0.9.8r 8 Feb 2011’ with no problem.

10.7.x does not have this issue.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 28, 2013, 12:19am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/16 "2013-02-28T00:19:58Z")

</div>

Jeremy K. wrote in post #1099453:

> On Wed, Feb 27, 2013 at 12:09 PM, guillermo haas-thompson  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I would also appreciate some clear syntax and steps to compile Ruby 2.0  
> > properly under Mac OS X, of course in my case using Homebrew and Chruby.  
> > This is turning out to be much harder than I thought and from what I see  
> > has been a known issue for some months.
> 
> chruby works well with ruby-build.
> 
> Use ruby-build to install 2.0.0-p0. It’ll handle the OpenSSL setup.
> 
> [GitHub - rbenv/ruby-build: A tool to download, compile, and install Ruby on Unix-like systems. · GitHub](https://github.com/sstephenson/ruby-build#readme)

I have been reading around and it looks like there were still problems  
even when using ruby-build  
([OpenSSL 1.0.1e downloaded via ruby-build fails to build on OSX 10.8.2 · Issue #305 · rbenv/ruby-build · GitHub](https://github.com/sstephenson/ruby-build/issues/305)) and so it seems  
like maybe I should uninstall my Homebrew openssl beforehand if I decide  
to give it a whirl with ruby-build. I was hoping to be able to avoid  
that and just compile from source.

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 28, 2013, 12:30am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/17 "2013-02-28T00:30:26Z")

</div>

On Wed, Feb 27, 2013 at 2:55 PM, Jeremy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 10.7.x does not have this issue.

So what exactly _is_ the issue, if not the version of OpenSSL?

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 28, 2013, 1:15am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/18 "2013-02-28T01:15:17Z")

</div>

To recap:  
• I installed openssl via Homebrew  
• I completely removed RVM and went with Chruby  
• Was following the instructions for 2.0.0 at

> **[Home](https://github.com/postmodern/chruby/wiki/)**
>
> Changes the current Ruby. Contribute to postmodern/chruby development by creating an account on GitHub.

In my comment above, where I reference ruby-build issue #305, a user  
under that thread said: “configure: WARNING: unrecognized options:  
–with-openssl-dir  
Confusingly, this is normal. Ruby doesn’t recognize the option, but the  
openssl extension does.”

So, taking a leap of faith and combining that with the Chruby wiki, the  
final command that appears to have worked for me is:  
./configure --prefix=/opt/rubies/ruby-2.0.0-p0 --with-openssl-dir=`brew --prefix openssl` --with-readline-dir=`brew --prefix readline`  
–with-yaml-dir=`brew --prefix libyaml` --with-gdbm-dir=`brew --prefix gdbm` --with-libffi-dir=`brew --prefix libffi`

The trick is to completely ignore the error message spit back from  
./configure about not knowing what any of these --with options are and  
go ahead with the rest of the instructions on building and installing  
the makefile.

Finally, I just cd’d into my app with Ruby 2.0.0 and was able to “gem  
install bundler” without getting an openssl failure. First time I tried  
to bundle my gems though, I did get an SSL error.

And finally:  
• Got an email back from Postmodern with this lifesaver

> **[GitHub - raggi/openssl-osx-ca: Simple periodic task to sync OSX Keychain...](https://github.com/raggi/openssl-osx-ca#readme)**
>
> Simple periodic task to sync OSX Keychain certs to Homebrew installed OpenSSL & LibreSSL - GitHub - raggi/openssl-osx-ca: Simple periodic task to sync OSX Keychain certs to Homebrew installed O...

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 28, 2013, 9:09am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/19 "2013-02-28T09:09:53Z")

</div>

On 27.02.2013, at 16:03, Carlo E. Prelz [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > This command fails with the same error as before,
> 
> Are you sure you executed the export command correctly?

I guess it is OK:

$ ls -l $PKG\_CONFIG\_PATH  
total 24  
-rw-r–r-- 1 me we 288 27 Feb 11:35 libcrypto.pc  
-rw-r–r-- 1 me we 303 27 Feb 11:35 libssl.pc  
-rw-r–r-- 1 me we 313 27 Feb 11:35 openssl.pc

> ? Also, the contents of the mkmf.log file may be useful.

This is the openssl/mkmf.log:

Ignore OpenSSL broken by Apple.  
Please use another openssl. (e.g. using `configure  
–with-openssl-dir=/path/to/openssl’)  
Failed to configure openssl. It will not be installed.

Cheers,  
Jan

---

<div class="post-metadata">

**Author:** ![DrSHegewald](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/22d042/32.png) [@DrSHegewald](https://www.ruby-forum.com/u/DrSHegewald)\
**Post date:** [February 28, 2013, 10:25am UTC](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970/20 "2013-02-28T10:25:16Z")

</div>

On 28.02.2013, at 09:56, “Carlo E. Prelz” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Please use another openssl. (e.g. using `configure  
> > –with-openssl-dir=/path/to/openssl’)  
> > Failed to configure openssl. It will not be installed.
> 
> Only? If so, your ruby source must be damaged. There should be a lot of  
> other stuff in the file.

It is from ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.bz2  
and ruby compiles and runs from this source (though with out openssl).

But I think I got it working eventually:

Reading the suggestions and linked discussions the the others have  
provided, I gave the --with-openssl-dir flag another chance (as it seems  
still to be used despite of the warning). Now I tried different path  
variants to point to my new openssl install. It seems so succeed when  
using the dir above the openssl bin dir. Previously I only tried the  
path to the binary and the path to its containing dir:

ls /Users/me/bin/openssl-1.0.1e-bin  
bin include lib ssl

cd ruby-2.0.0-p0-src  
./configure --with-openssl-dir=/Users/me/bin/openssl-1.0.1e-bin  
–prefix=/Users/me/bin/ruby-2.0.0-p0-bin  
make install

and now I could install gems with e.g.  
gem install terminal-notifier

So I guess the openssl stuff is configured fine now.

Cheers and many thanks to all for the very useful input!

Jan H.

[Next page](https://www.ruby-forum.com/t/mac-os-10-8-2-and-openssl/226970.md?page=2)
