# Openssl en MacOS X

**URL:** <https://www.ruby-forum.com/t/openssl-en-macos-x/107795>\
**Category:** Rails\
**Created:** [June 26, 2007, 11:11am UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795 "2007-06-26T11:11:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [June 26, 2007, 11:11am UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/1 "2007-06-26T11:11:16Z")

</div>

Hello,

I would like to install Openssl on a ruby install MacOs X

Which one is the one to go for ? (I want to use it for gmail)

How do I install it ? maybe it is so easy that I do not find any  
explanation on the web…

I downloaded several openssl gems to my laptop…

How to install ? Is there a tutorial somewhere…

As you understood I am a MacUser but I am lacking Unix knowledge so the  
terminal isn’t really my favorite app…

Thanks for helping out,

Secufa

---

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [June 26, 2007, 11:34am UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/2 "2007-06-26T11:34:57Z")

</div>

> I would like to install Openssl on a ruby install MacOs X

OS X comes with the openssl library installed I think. Try ‘man  
openssl’.

steve

---

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [June 27, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/3 "2007-06-27T20:55:42Z")

</div>

Ok, but then how do I get a library in my Rails application, from what I  
could see in some tutorials online, there should be a library installed  
in the lib folder, but how do I do this ??

Thank you very much !

---

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [June 27, 2007, 11:43pm UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/4 "2007-06-27T23:43:01Z")

</div>

Hi, you’ll need to do the following in your Ruby application to acces  
the interface:

require ‘openssl’

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [June 27, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/5 "2007-06-27T23:46:01Z")

</div>

Hi, you’ll need to do the following in your Ruby application to acces  
the interface:

require ‘openssl’

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [July 24, 2007, 2:09pm UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/6 "2007-07-24T14:09:46Z")

</div>

Thank you very much for your help !

I still have the following problem :

When I would like to configure actionmailer to use a gmail account  
the Ruby server crashes as soon as I activate the following line :

‘require smtp\_tls’

in environment.rb although I have put the smtp\_tls file in the ‘lib’  
folder…

(I was trying to follow this tutorial :  
[http://blog.pomozov.info/posts/how-to-send-actionmailer-mails-to-gmailcom.html](http://blog.pomozov.info/posts/how-to-send-actionmailer-mails-to-gmailcom.html)  
)

Has anyone an idea ???

Thanks in advance !

This is the output I get :

xxx:~$ /home/xxx/apps/dir/public/…/config/  
environment.rb:8:in `require’: no such file to load – smtp\_tls  
(LoadError)  
from /home/xxx/apps/dir/public/…/config/  
environment.rb:8  
from /home/xxx/apps/dir/public/dispatch.fcgi:21  
xxx: (mod\_fastcgi.c.1048) the fastcgi-backend /usr/  
bin/ruby /home/xxx/apps/dir/public/dispatch.fcgi failed to start:  
xxx: (mod\_fastcgi.c.1052) child exited with status 1 /  
usr/bin/ruby /home/xxx/apps/dir/public/dispatch.fcgi  
xxx: (mod\_fastcgi.c.1055) if you try do run PHP as  
FastCGI backend make sure you use the FastCGI enabled version.  
You can find out if it is the right one by executing ‘php -v’ and it  
should display ‘(cgi-fcgi)’ in the output, NOT (cgi) NOR (cli)  
For more information check [http://www.lighttpd.net/documentation/](http://www.lighttpd.net/documentation/)  
fastcgi.html#preparing-php-as-a-fastcgi-program  
xxx: (mod\_fastcgi.c.1060) If this is PHP on Gentoo  
add fastcgi to the USE flags  
xxx: (mod\_fastcgi.c.1356) [ERROR]: spawning fcgi failed.  
xxx: (server.c.834) Configuration of plugins failed.  
Going down.

---

<div class="post-metadata">

**Author:** ![secufa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/54ee81/32.png) [@secufa](https://www.ruby-forum.com/u/secufa)\
**Post date:** [June 28, 2007, 8:20am UTC](https://www.ruby-forum.com/t/openssl-en-macos-x/107795/7 "2007-06-28T08:20:39Z")

</div>

On Jun 26, 2007, at 3:11 AM, Secu Fa wrote:

> Hello,
> 
> I would like to install Openssl on a ruby install MacOs X

It’s already installed.  
Here’s how I used it (I found this somewhere.)

require ‘socket’  
require ‘openssl’

socket = TCPSocket.new(“[www.url.net](http://www.url.net)”)  
ssl\_context = OpenSSL::SSL::SSLContext.new()  
unless ssl\_context.verify\_mode  
warn “warning: peer certificate won’t be verified this session.”  
ssl\_context.verify\_mode = OpenSSL::SSL::VERIFY\_NONE  
end  
sslsocket = OpenSSL::SSL::SSLSocket.new(socket, ssl\_context)  
sslsocket.sync\_close = true  
sslsocket.connect  
sslsocket.puts(“some text”)

while line = sslsocket.gets  
p line  
end
