No such file to load -- sqlite3

Hi.

I've just installed the sqlite3-ruby gem, but when I require it, I'm
getting the load error.

gem list
...
sqlite3-ruby (1.2.5)
...

ruby -e "require 'sqlite3'"
...
no such file to load -- sqlite3 (LoadError)
...

What is the reason of the bug? How can I fix it?

OS Debian GNU/Linux 5.0.3, Ruby 1.9.1.

Thanks.

···

--
Posted via http://www.ruby-forum.com/.

Hi,

I've just installed the sqlite3-ruby gem, but when I require it, I'm
getting the load error.

gem list
...
sqlite3-ruby (1.2.5)
...

ruby -e "require 'sqlite3'"
...
no such file to load -- sqlite3 (LoadError)
...

What is the reason of the bug? How can I fix it?

OS Debian GNU/Linux 5.0.3, Ruby 1.9.1.

First search for it:

  $ find /usr/lib/ruby -name '*sqlite3*'
  or
  $ rbfind /usr/lib/ruby -pD sqlite3 # (I prefer to use my own tool)

Then check the search path

  $ ruby -e 'puts $:'

Bertram

···

Am Freitag, 11. Sep 2009, 20:32:10 +0900 schrieb P. A.:

--
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de

The problem was I set the custom gemdir on /home/<user_name>/.gem and
doesn't set the GEM_HOME and the RUBYLIB environment variables.

When I set GEM_HOME=/home/<user_name>/.gem and
RUBYLIB=/home/<user_name>/.gem/ruby/1.9.1/gems then the gems installator
start inculde the new gemlib's paths in ‘$:’.

Anyway thanks for the help.

···

--
Posted via http://www.ruby-forum.com/.