gem installation

23 views
Skip to first unread message

Tom

unread,
Dec 20, 2009, 8:06:47 AM12/20/09
to Phoenix Ruby Users Group
This error occurs when attempting to install a gem on Ubuntu 9.10.
Can anyone help?

Thank you.

tom2@ubuntu:~$ sudo gem install ruby-debug-ide19
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug-ide19:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install ruby-debug-ide19
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
/usr/local/lib/ruby/1.9.1/net/https.rb:102:in `require': no such file
to load -- openssl (LoadError)
from /usr/local/lib/ruby/1.9.1/net/https.rb:102:in `<top (required)>'
from /home/tom2/.gem/ruby/1.9.1/gems/ruby_core_source-0.1.4/lib/
contrib/uri_ext.rb:11:in `require'
from /home/tom2/.gem/ruby/1.9.1/gems/ruby_core_source-0.1.4/lib/
contrib/uri_ext.rb:11:in `<top (required)>'
from /home/tom2/.gem/ruby/1.9.1/gems/ruby_core_source-0.1.4/lib/
ruby_core_source.rb:6:in `require'
from /home/tom2/.gem/ruby/1.9.1/gems/ruby_core_source-0.1.4/lib/
ruby_core_source.rb:6:in `<top (required)>'
from extconf.rb:2:in `require'
from extconf.rb:2:in `<main>'


Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/
linecache19-0.5.11 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/
linecache19-0.5.11/ext/trace_nums/gem_make.out


Jim Jeffers

unread,
Dec 20, 2009, 8:15:29 AM12/20/09
to phoeni...@googlegroups.com
Hey Tom,

I suspect it may have something to do with the way you've installed Ruby on your machine. Since you're running 1.9.1 did you build ruby yourself or did you install via aptitude?

- Jim

--
You are subscribed to the Google Groups "Phoenix Ruby Users Group" group.
To post, send email to phoeni...@googlegroups.com
To unsubscribe, send email to phoenix-ruby...@googlegroups.com

The Phoenix Ruby User Group meets on the 2nd Monday of each month at the offices of Target Training International.  See http://rubyaz.org

-----------------------------------------
Jim Jeffers
"A trustworthy individual."

MilesTogoe

unread,
Dec 20, 2009, 1:07:20 PM12/20/09
to phoeni...@googlegroups.com
On 12/20/2009 06:06 AM, Tom wrote:
> This error occurs when attempting to install a gem on Ubuntu 9.10.
> Can anyone help?
>

I prefer to install from source since you get the latest official stable
code - in this case 1.9.1-p346. And in linux it's fairly easy though
you have to be sure some dependencies are installed - don't worry, it
will tell you which ones when it fails :) With Ruby 1.9x gem support
is built in - you don't need to install any gems packages. Once 1.9x is
installed you can simply add gems the standard way "gem install rails"
and ruby 1.9x will place the gems in the folders it is expecting to see
them.

If you install the distro packages, you are somewhat at the mercy of the
individual packager as to what was compiled in or what target folders it
is using. If you're proficient enough to be using a programming
language, then I think installing from source is easy enough though
maybe a bit more difficult if you're working in an enterprise situation
across many machines - but I think there are other ruby tools for that.

Chad Woolley

unread,
Dec 20, 2009, 1:57:08 PM12/20/09
to phoeni...@googlegroups.com
On Sun, Dec 20, 2009 at 6:06 AM, Tom <ohga...@cox.net> wrote:
> /usr/local/lib/ruby/1.9.1/net/https.rb:102:in `require': no such file
> to load -- openssl (LoadError)

That's your problem, no openssl installed. Try installing all these
apt packages:

sudo aptitude install -y build-essential zlib1g zlib1g-dev libssl-dev
openssl libreadline5-dev openssh-server openssh-client ssh wget

I took this from my bootstrap-ruby script:
http://github.com/thewoolleyman/bootstrap-ruby/blob/master/bootstrap_ruby.sh

Also, check out RVM for installing multiple versions of Ruby. It's nice.

HTH,
-- Chad

Tom Michel

unread,
Dec 22, 2009, 10:46:10 AM12/22/09
to phoeni...@googlegroups.com
Thanks to all for the suggestions. It was possible to install the gem
once openssl was installed. I noticed that zlib1g et al must be
installed before installing Ruby 1.9.1 from source code.
Reply all
Reply to author
Forward
0 new messages