# Ruby openssl on Debian

**URL:** <https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763>\
**Category:** Ruby\
**Created:** [June 12, 2006, 10:25pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763 "2006-06-12T22:25:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 12, 2006, 10:25pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/1 "2006-06-12T22:25:44Z")

</div>

I’ve got an app that requires the openssl library. Whenever I run it,  
it just says “no such file to load – openssl.” Didn’t know I had to  
install anything special to get openssl in Ruby. What do I have to  
do?

Thanks,  
Pat

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 12, 2006, 10:32pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/2 "2006-06-12T22:32:12Z")

</div>

Pat M. wrote:

> I’ve got an app that requires the openssl library. Whenever I run it,  
> it just says “no such file to load – openssl.” Didn’t know I had to  
> install anything special to get openssl in Ruby. What do I have to  
> do?
> 
> Thanks,  
> Pat

An excerpt from

aptitude show ruby1.8:  
#v+

On Debian, Ruby 1.8 is provided as separate packages. You can get  
full Ruby  
1.8 distribution by installing following packages.

ruby1.8 ruby1.8-dev ri1.8 rdoc1.8 irb1.8 ruby1.8-elisp  
ruby1.8-examples libdbm-ruby1.8 libgdbm-ruby1.8 libtcltk-ruby1.8  
libopenssl-ruby1.8 libreadline-ruby1.8

#v-

‘aptitude install libopenssl-ruby1.8’ should help with the particular  
problem. If you want to be on the safe side, install all of the above  
packages.

HTH,

t.

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 12, 2006, 10:35pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/3 "2006-06-12T22:35:50Z")

</div>

On 6/12/06, Pat M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve got an app that requires the openssl library. Whenever I run it,  
> it just says “no such file to load – openssl.” Didn’t know I had to  
> install anything special to get openssl in Ruby. What do I have to  
> do?

This is probably what you need:  
libopenssl-ruby1.8 - OpenSSL interface for Ruby 1.8

Try  
apt-get install libopenssl-ruby

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 13, 2006, 4:46pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/4 "2006-06-13T16:46:35Z")

</div>

On 6/12/06, Pat M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve got an app that requires the openssl library. Whenever I run it,  
> it just says “no such file to load – openssl.” Didn’t know I had to  
> install anything special to get openssl in Ruby. What do I have to  
> do?

As an aside, although it’s not the Debian way, I’ve found it easier to  
not install the official Debian packages, but instead just install  
Ruby from source into its own --prefix=/opt/ruby-1.8.4, then install  
RubyGems, then get everything else as-needed using the gem command.

Dunno if that would fix your ssl issue though.

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 13, 2006, 9:53pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/5 "2006-06-13T21:53:37Z")

</div>

On 6/13/06, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Dunno if that would fix your ssl issue though.

Can you give us a little howto on that? I have been battling gem vs.  
apt forever. Last time I tried to compile Ruby there were a bunch of  
dependencies and it took me quite a while to get it done. Which makes  
me think… if this is the best way to go, I’ll keep track and write a  
script to do it next time. Though if I wrote it in Ruby I’d have to  
package it as an executable or something…

I’d love to have a one-click installer under Linux that leaves all the  
gems just working properly.

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 13, 2006, 10:19pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/6 "2006-06-13T22:19:58Z")

</div>

On 6/13/06, Ezra Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 

> ```
> I have been using this shell script with much success on debian and
> 
> ```
> 
> OSX. Feel free to leave out packages you don’t need from this. BUt if  
> you just cd to your home dir and run this script with sudo you will  
> get a fully functionaly ruby install including other niceties.

Awesome!

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 13, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/7 "2006-06-13T22:13:12Z")

</div>

On Jun 13, 2006, at 12:50 PM, Leslie V. wrote:

> > easier to  
> > script to do it next time. Though if I wrote it in Ruby I’d have to  
> > package it as an executable or something…
> 
> I’d love to have a one-click installer under Linux that leaves all the  
> gems just working properly.

```
I have been using this shell script with much success on debian and

```

OSX. Feel free to leave out packages you don’t need from this. BUt if  
you just cd to your home dir and run this script with sudo you will  
get a fully functionaly ruby install including other niceties.

Cheers-  
-Ezra

#!/bin/sh

mkdir src  
cd src

# Readline

curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz  
tar xzvf readline-5.1.tar.gz  
cd readline-5.1  
./configure --prefix=/usr/local  
make  
sudo make install  
cd …

# Ruby

curl -O ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.4.tar.gz  
tar xzvf ruby-1.8.4.tar.gz  
cd ruby-1.8.4  
./configure --prefix=/usr/local --with-readline-dir=/usr/local  
make  
sudo make install  
cd …

# Rubygems

curl -O [http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz](http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz)  
tar xzvf rubygems-0.8.11.tgz  
cd rubygems-0.8.11  
sudo /usr/local/bin/ruby setup.rb  
cd …

# Rails

sudo gem install rails --include-dependencies

# FastCGI

curl -O [http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz](http://www.fastcgi.com/dist/fcgi-2.4.0.tar.gz)  
tar xzvf fcgi-2.4.0.tar.gz  
cd fcgi-2.4.0  
./configure --prefix=/usr/local  
make  
sudo make install  
cd …

# Ruby-FastCGI Bindings

curl -O [http://sugi.nemui.org/pub/ruby/fcgi/ruby-fcgi-0.8.6.tar.gz](http://sugi.nemui.org/pub/ruby/fcgi/ruby-fcgi-0.8.6.tar.gz)  
tar xzvf ruby-fcgi-0.8.6.tar.gz  
cd ruby-fcgi-0.8.6  
/usr/local/bin/ruby install.rb config --prefix=/usr/local  
/usr/local/bin/ruby install.rb setup  
sudo /usr/local/bin/ruby install.rb install  
cd …

sudo gem install fcgi

# PCRE Prerequisite to Lighttpd

curl -O ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/  
pcre-6.4.tar.gz  
tar xzvf pcre-6.4.tar.gz  
cd pcre-6.4  
./configure --prefix=/usr/local  
make  
sudo make install  
cd …

# Lighttpd

curl -O [http://lighttpd.net/download/lighttpd-1.4.11.tar.gz](http://lighttpd.net/download/lighttpd-1.4.11.tar.gz)  
tar xzvf lighttpd-1.4.11.tar.gz  
cd lighttpd-1.4.11  
./configure --prefix=/usr/local --with-pcre=/usr/local --with-openssl  
make  
sudo make install  
cd …

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 13, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/8 "2006-06-13T23:04:08Z")

</div>

On Jun 13, 2006, at 1:10 PM, Ezra Z. wrote:

> # Readline
> 
> curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz

On 10.4.x you can just use the builtin libedit:

$ ll /usr/lib/libreadline.dylib  
lrwxr-xr-x 1 root wheel 13 Oct 12 2005 /usr/lib/  
libreadline.dylib@ → libedit.dylib

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![pergesu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Post date:** [June 13, 2006, 10:48pm UTC](https://www.ruby-forum.com/t/ruby-openssl-on-debian/95763/9 "2006-06-13T22:48:31Z")

</div>

On 6/13/06, Leslie V. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Can you give us a little howto on that?  
> I put my notes up on this page a few days ago:  
> [http://wiki.rubygarden.org/Ruby/page/show/InstallingRuby](http://wiki.rubygarden.org/Ruby/page/show/InstallingRuby)  
> Scroll down to “Custom Install on GNU/Linux”.

—John
