1

I'm failing to install linecache19 gem via bundler with an rvm installation of ruby 1.9.2 on aptosid (ie debian sid).

I am new to ruby but my ruby installation is clearly not completely mis-configured as I have been able to install rails and a bunch of gems.

The output I get is the following:

    Installing linecache19 (0.5.12) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/caz/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb                 
*** 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:                                                   

/home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)              
ms/custom_require.rb:36:in `require'                                              
in `<top (required)>'                                                             
ms/custom_require.rb:36:in `require'
        from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in `<top (required)>'
        from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/caz/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:6:in `<top (required)>'
        from <internal:lib/rubygems/custom_require>:33:in `require'
        from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from extconf.rb:2:in `<main>'


Gem files will remain installed in /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12 for inspection.
Results logged to /home/caz/.rvm/gems/ruby-1.9.2-p320/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
An error occured while installing linecache19 (0.5.12), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.

I have tried the solution which is usually suggested:

 gem install ruby-debug19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.2-p320  

I have also tried using the --force option without success as per the following:

Installing Gems without rvm, as root, with explicit version of ruby

I'm confused by the presence of "1.9.1" in the path reported in the output- I wonder whether this is a hangover of the debian ruby package and the source of my problems.

ps this is all in aid of installing the Smallest Federated Wiki. I encourage readers to take a look at this project.

Community
  • 1
  • 1
maninalift
  • 703
  • 6
  • 10
  • maybe missing a libopenssl package or something? – rogerdpack Jul 09 '12 at 22:21
  • Probably you just need to replace ruby-debug19 with debugger, which has headers for everything included. See my answer in this question http://stackoverflow.com/a/10414984/773690 – iblue Jul 20 '12 at 19:38
  • trying to install debugger had the same issues. In the end what solved it was removing my system openssl package (this step is I suppose not necessary), installing the rvm openssl package locally and pointing ruby to it. This solution is actually described in one of the snwers to the post I liked to in the question.... Duh! – maninalift Aug 13 '12 at 20:22

1 Answers1

2

in your terminal enter rvm requirements

It will provide you with something like

Additional Dependencies:
# For Ruby / Ruby HEAD (MRI, Rubinius, & REE), install the following:
  ruby: /usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion

go ahead and copy the command and run it. It will install all dependencies required for running ruby.

sohaibbbhatti
  • 2,672
  • 22
  • 21
  • Thank you for responding. I have done this already. I should have mentioned this but by the time I wrote the post I was quite frustrated. Late I will update my question with full details of what I did. – maninalift Jul 10 '12 at 14:55
  • This was exactly what I needed to fix. The only catch is to follow up that command with `rvm reinstall 1.9.3` if you have already installed your Ruby interpreter. – Mike Mueller Sep 16 '12 at 04:38
  • Aah yes. I apologize, I should have mentioned that as well. – sohaibbbhatti Sep 17 '12 at 06:41