ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-talk
ruby-talk
Re: Windows XP problem with Ruby, gem sqlite3-ruby, and SQLite3
by Luis Lavena other posts by this author
Jul 1 2009 8:55PM messages near this date
Re: Windows XP problem with Ruby, gem sqlite3-ruby, and SQLite3 | Re: Windows XP problem with Ruby, gem sqlite3-ruby, and SQLite3
On Jul 1, 6:27 pm, SunSw0rd <John.Tul...@[...].com>  wrote:
>  A further symptom on this issue. When I execute irb I detect the
>  following:
>  ===
>  C:\Ruby\bin>irb
>  irb(main):001:0> require 'rubygems'
>  => true
>  irb(main):002:0> require 'sqlite3'
>  LoadError: 127: The specified procedure could not be found.   -
>  Init_sqlite3
>  ./sqlite3.dll
>          from ./sqlite3.dll
>          from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
>  31:in `require'
>          from (irb):2
>  irb(main):003:0>
>  ===
> 
>  Is this saying there is something wrong with the downloaded sqlite3
>  DLL itself?

No, the problem is Ruby itself.

C:\Users\Luis> irb
irb(main):001:0>  require 'rbconfig'
=>  true
irb(main):002:0>  RbConfig::CONFIG['DLEXT']
=>  "so"
irb(main):003:0>  RbConfig::CONFIG['DLEXT2']
=>  "dll"

DLEXT is used to identify Ruby C extensions.

Since you're CD'ing from Ruby\bin, it's finding 'sqlite3.dll' and
think it is an extension. See this:

C:\Users\Luis> cd Tools\bin

C:\Users\Luis\Tools\bin> dir sqlite*.*
 Volume in drive C is Windows7
 Volume Serial Number is 50BD-564E

 Directory of C:\Users\Luis\Tools\bin

18/05/2009  01:40 p.m.           505.873 sqlite3.dll
21/05/2009  10:03 p.m.           520.574 sqlite3.exe
               2 File(s)      1.026.447 bytes
               0 Dir(s)  44.951.277.568 bytes free

C:\Users\Luis\Tools\bin> irb
irb(main):001:0>  require 'sqlite3'
LoadError: 127: The specified procedure could not be found.   -
Init_sqlite3
./sqlite3.dll
        from ./sqlite3.dll
        from (irb):1

Now, please try doing the require OUTSIDE Ruby\bin folder.

Also, since you installed sqlite3 as a gem, please require rubygems
first:

require 'rubygems'
require 'sqlite3'

HTH
--
Luis Lavena
Thread:
SunSw0rd
SunSw0rd
SunSw0rd
Luis Lavena
Michael Linfield

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved