Ruby openssl on Debian


#1

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


#2

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.


#3

On 6/12/06, Pat M. 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


#4

On 6/12/06, Pat M. 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.


#5

On 6/13/06, John G. 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.


#6

On 6/13/06, Ezra Z. 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!


#7

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
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
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
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
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 …


#8

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
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com


#9

On 6/13/06, Leslie V. 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
Scroll down to “Custom Install on GNU/Linux”.

—John