I'm trying to run an application using Ruby 2.0 on Windows 7 and am having difficulties. I installed Ruby 2.0 using RubyInstaller and then ran:
gem install sqlite3
which apparently succeeded, but when I start the application, I get errors saying "cannot load sqlite3/sqlite3_native".
Googling results in confusing and contradictory information, but some say that the sqlite3.dll has to be in the PATH, so I downloaded the current sqlite3.dll and put it in a directory in the PATH but it makes no difference. This is not surprising to me since I didn't have it for my previously installed Ruby 1.9.3, which works just fine. There does seem to be a sqlite3_native.so file under both Ruby 1.9.3 and Ruby 2.0. Any advice would be appreciated.
Hello,
On Sunday, October 26, 2014 5:42:25 PM UTC-3, Will Parsons wrote:I'm trying to run an application using Ruby 2.0 on Windows 7 and am having difficulties. I installed Ruby 2.0 using RubyInstaller and then ran:
gem install sqlite3
which apparently succeeded, but when I start the application, I get errors saying "cannot load sqlite3/sqlite3_native".Will be great if you can provide more details since "start the application" doesn't tell us much. Is a Rails application? is sqlite3 gem part of the Gemfile?
Just to give you an example, I just tested Ruby and sqlite3 gem without issues:Googling results in confusing and contradictory information, but some say that the sqlite3.dll has to be in the PATH, so I downloaded the current sqlite3.dll and put it in a directory in the PATH but it makes no difference. This is not surprising to me since I didn't have it for my previously installed Ruby 1.9.3, which works just fine. There does seem to be a sqlite3_native.so file under both Ruby 1.9.3 and Ruby 2.0. Any advice would be appreciated.sqlite3 gem on Windows no longer depend on having sqlite3.dll in the PATH, as the gem has bundled SQLite3 since a few versions ago.Please provide more details on the issue and specific versions of the components in order for us to be able to reproduce the issues you're having.
On Monday, October 27, 2014 10:01:25 AM UTC-4, Luis Lavena wrote:Please provide more details on the issue and specific versions of the components in order for us to be able to reproduce the issues you're having.
OK:
Welcome to the Emacs shell
~ $ which ruby
c:/Ruby21/bin/ruby.exe
~ $ ruby --version
ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]
Hello Will,Thank you for your response, please see comments below.On Mon, Oct 27, 2014 at 6:01 PM, Will Parsons <gyli...@gmail.com> wrote:On Monday, October 27, 2014 10:01:25 AM UTC-4, Luis Lavena wrote:Please provide more details on the issue and specific versions of the components in order for us to be able to reproduce the issues you're having.
OK:
Welcome to the Emacs shell
~ $ which ruby
c:/Ruby21/bin/ruby.exe
~ $ ruby --version
ruby 2.1.3p242 (2014-09-19 revision 47630) [i386-mingw32]Here is the problem. In your original email you said "Ruby 2.0", which I assumed you meant "Ruby 2.0.0".As shown in my example, using Ruby 2.0.0 (latest patchlevel) it worked.But you actually used Ruby 2.1.3, which is known as "Ruby 2.1" (not 2.0), and that, as indicated in RubyInstaller 2.1.3 release notes:#### Existing pre-compiled gems might not be Ruby 2.1 compatibleRuby 2.1 introduces ABI breakage which means compiled C extensions with previous1.9.3 or 2.0.0 will not run against Ruby 2.1.
**DO NOT install Ruby 2.1 on top of existing Ruby 1.9.3 or 2.0.0**, or try touse compiled extensions with it.You will be required to force compilation of those gems:gem install <name> --platform=rubyThis **will require you have the extra dependencies installed** for that gem tocompile. Look at the gem documentation for the requirements.Please check each gem documentation and recent releases.---SQLite3 gem do not bundle binaries for Ruby 2.1, this has been requested but I have been busy with life, work and personal issues in order to perform a proper release.
At this time I'm working on building newer 1.9.3, 2.0.0 and 2.1.4 in order to fix the CVE security issue recently exposed.Unless you're forced/required to use Ruby 2.1, I would suggest use Ruby 2.0.0 along the existing binary of sqlite3 until a new release of sqlite3 is made available.
Or you can force compilation of SQLite3 gem by installing RubyInstaller and DevKit, downloading and compiling sqlite3 sources.(I would recommend the former suggestion)