Luis Lavena
1/30/2008 11:22:00 PM
On Jan 30, 5:59 pm, Eli Bendersky <eli...@gmail.com> wrote:
> Hello,
>
> I installed ruby-sqlite3 as a gem from Rubyforge to my Windows PC.
> I've also downloaded the sqlite3 DLL and placed it in the same
> directory with my script, for testing. This simple code:
>
> require 'sqlite3'
>
> db = SQLite3::Database.new( "test.db" )
>
> Creates the following warning:
> c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-mswin32/lib/
> sqlite3_api.so: warning: global variable `
> $swig_runtime_data_type_pointer2' not initialized
>
> However, SQLite3 seems to be working correctly. The DB file is
> created, queries work, etc.
>
> Any ideas on how to get rid of that pesky warning ?
>
> Thanks in advance,
> Eli
>
> P.S. Ruby 1.8.6 from the one click installer for Windows
Can you be more specific?
the gem is sqlite3-ruby:
sqlite3-ruby (1.2.1)
The latest One-Click Installer version:
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
RubyGems version installed:
0.9.4
(Also tested on 1.0.1)
Output from IRB:
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'sqlite3'
=> true
irb(main):003:0> db = SQLite3::Database.new("test.db3")
=> #<SQLite3::Database:0x516f198 ...>
Now, using ruby command line:
D:\Users\Luis\Desktop>ruby test-sqlite3.rb
No output for your script
and with -v (Verbose mode):
D:\Users\Luis\Desktop>ruby -v test-sqlite3.rb
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
C:/Ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1-x86-mswin32/lib/
sqlite3_api.so: warning: global variable `
$swig_runtime_data_type_pointer2' not initialized
Conclusion:
The warning you're getting is because:
You used -v command line option to run your script or
You tweaked $VERBOSE and set it to true
HTH,
--
Luis Lavena