Problem: Gem-installed sqlite3 once again

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

Do you have the RUBYOPT environment variable set to rubygems?

   RUBYOPT=rubygems

Alternatively, is fxri doing a require 'rubygems'?

- Jamis

···

On Oct 11, 2005, at 10:51 AM, basi wrote:

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

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

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

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

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

···

On Oct 11, 2005, at 11:56 AM, basi wrote:

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.

Mr. James,
Thank you much!
basi