The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
RubyBuntu -2- Troubleshooting common Ruby ubuntu problems

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jan Lelis

Posts: 136
Nickname: rbjl
Registered: Aug, 2009

Jan Lelis is an IT student from Dresden/Germany
RubyBuntu -2- Troubleshooting common Ruby ubuntu problems Posted: Apr 29, 2010 3:10 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Jan Lelis.
Original Post: RubyBuntu -2- Troubleshooting common Ruby ubuntu problems
Feed Title: rbJ*_*L.net
Feed URL: http://feeds.feedburner.com/rbJL
Feed Description: Hi, I am a fan of Ruby and like to explore it and the world around ;). So I started this blog, where I am publishing code snippets, tutorials for beginners as well as general thoughts about Ruby, the web or programming in general.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Jan Lelis
Latest Posts From rbJ*_*L.net

Advertisement

A common Ruby experience on ubuntu: You get some stupid error, saying something would be missing – and you don’t know what to do…

…so here are some of the error messages and how to get rid of them.

Common problems when using ubuntu repositories

openssl (1.8)

/var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks': no such file to load -- net/https (RuntimeError)
sudo apt-get install libopenssl-ruby

openssl (1.9.1)

/var/lib/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:271:in `rescue in require_frameworks': no such file to load -- net/https (RuntimeError)
sudo apt-get install libopenssl-ruby1.9.1

ruby1.8-dev

ERROR: Failed to build gem native extensions.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:8:in `require': no such file to load -- mkmf (LoadError)
sudo apt-get install ruby1.8-dev

ruby1.9.1-dev

ERROR: Failed to build gem native extensions.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
sudo apt-get install ruby1.9.1-dev

build-essential

make: g++: Command not found
sudo apt-get install build-essential

wrong gem path settings

The program 'rails' is currently not installed. You can install it by typing:
sudo apt-get install rails

Add export PATH=/var/lib/gems/1.8/bin:$PATH to the ~/.bash.rc file and restart your terminal (adjust the version number, if needed).

sudo some_gem is not possible

sudo: rake: command not found

See here.

Common problems when built from source

libreadline

Strange irb behavior or

/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
/usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `require':LoadError: no such file to load -- readline

Navigate to the Ruby source and enter:

sudo apt-get install libreadline5-dev
cd ext/readline
ruby extconf.rb
make
sudo make install

zlib

/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- zlib (LoadError)
/usr/local/lib/ruby/1.9.1/rubygems/package.rb:10:in `require': no such file to load -- zlib (LoadError)

Navigate to the Ruby source and enter:

sudo apt-get install zlib1g-dev
cd ext/zlib
ruby extconf.rb
make
sudo make install

openssl

/var/lib/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:271:in `require_frameworks': no such file to load -- openssl (RuntimeError)
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:271:in `rescue in require_frameworks': no such file to load -- openssl (RuntimeError)

Navigate to the Ruby source and enter:

sudo apt-get install libssl-dev
cd ext/openssl
ruby extconf.rb
make
sudo make install

Gems

sqlite3

no such file to load -- sqlite3
Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
sudo apt-get install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby

MySQL

no such file to load -- sqlite3
Error installing mysql:
ERROR: Failed to build gem native extension.
sudo apt-get install mysql-server libmysqlclient15-dev
sudo gem install mysql

nokogiri

Error installing nokogiri:
ERROR: Failed to build gem native extension.
sudo apt-get install libxml2 libxml2-dev libxslt1-dev
sudo gem install nokogiri

Problems solved?

Hopefully. If you still have problems, feel free to ask in the comments. You could also try to do a new installation. When everything is working, you can start customizing your command line :)

CC-BY (DE)

Read: RubyBuntu -2- Troubleshooting common Ruby ubuntu problems

Topic: RPCFN: Interactive Fiction (#9) Previous Topic   Next Topic Topic: A Free Course on Sinatra

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use