no such file to load -- sqlite3

P

P. A.

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.
 
B

Bertram Scharpf

Hi,

Am Freitag, 11. Sep 2009, 20:32:10 +0900 schrieb P. A.:
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
 
P

P. A.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top