Problem: Gem-installed sqlite3 once again

B

basi

Windows XP SP 2
Ruby 1.82-15

Hello,
After successfully gem-installing Sqlite3, i test it in fxri and this
is what I get:

irb(main):001:0> require 'sqlite3'
LoadError: No such file to load -- sqlite3
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from (irb):1
from :0
irb(main):002:0>

Thanks in advance for any help.
basi
 
B

basi

But then, after successfully gem-installing postgres-pr, and

irb(main):005:0> require 'postgres'
LoadError: No such file to load -- postgres
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from (irb):5
from :0
irb(main):006:0>

So I must be missing something here. Help is welcome.
basi
 
J

Jamis Buck

Do you have the RUBYOPT environment variable set to rubygems?

RUBYOPT=3Drubygems

Alternatively, is fxri doing a require 'rubygems'?

- Jamis
 
B

basi

Thanks for the reply.

The following system variable exists

RUBYOPT=rubygems rubygems

I also tried:

irb(main):013:0> require 'rubygems'
=> false
irb(main):014:0> require 'sqlite3'
LoadError: No such file to load -- sqlite3
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from (irb):14
from :0
irb(main):015:0>

Thanks,
basi
 
B

basi

The system variable:

RUBYOPT=rubygems rubygems

with the repeated value, looks suspicious. So I deleted the second
rubygems. Then:

irb(main):002:0> require 'rubygems'
=> false
irb(main):003:0> require 'sqlite3'
=> false
irb(main):004:0>

Now it looks like the 'require' is now able to find the files, but just
unable to load.

thanks again,
basi
 
J

Jamis Buck

The system variable:

RUBYOPT=rubygems rubygems

with the repeated value, looks suspicious. So I deleted the second
rubygems. Then:

irb(main):002:0> require 'rubygems'
=> false
irb(main):003:0> require 'sqlite3'
=> false
irb(main):004:0>

Now it looks like the 'require' is now able to find the files, but
just
unable to load.

No, it loaded it fine. I don't understand why, but for some libs,
requiring them from irb returns false. Or maybe it is just libs that
rubygems loads, I'm not sure. The 'false' simply means that the lib
has already been required, not that the require failed.

At any rate, if no exception is raised, you should be good to go.

- Jamis
 

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,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top