No Such File to Load -- SQLite3/Sqlite3_Native

Error no such file to load -- sqlite3/sqlite3_native (LoadError)

download the required executable and the dll from http://www.sqlite.org/download.html
extract to your ruby's bin (c:\Ruby192\bin)

cannot load such file -- sqlite3/sqlite3_native (LoadError) on ruby on rails

Find your sqlite3 gemspec file. One example is /usr/local/share/gem/specifications/sqlite3-1.3.7.gemspec

Windows:
C:\Ruby21\lib\ruby\gems\2.1.0\specifications.

You should adjust according with your Rubygem path and sqlite3 version.
Edit the file above and look for the following line

s.require_paths=["lib"]

change it to

s.require_paths= ["lib/sqlite3_native"]

`require': no such file to load -- sqlite3/sqlite3_native (LoadError)

Found the solution on this post's comments http://www.shaunambrose.com/2010/08/05/how-to-fix-a-sqlite3-dll-missing-error-message-in-ruby-on-rails/comment-page-1/#comment-15965

"The problem seems to be that the sqlite3 gem is compiled with version 3.7.3. I downloaded and set up version 3.7.3 instead and it now works just fine."

Get it here: http://www.sqlite.org/sqlitedll-3_7_3.zip

cannot load such file -- sqlite3/sqlite3_native (LoadError) in Ruby 2 running rails 3.2.11

Had the same problem. This won't directly answer your question but I solved it by simply installing the whole set using http://railsinstaller.org/ and it all works

Following are all the packages installed by railsinstaller:

  • Ruby 1.9.3-p392
  • Rails 3.2
  • Bundler
  • Git
  • Sqlite
  • TinyTDS
  • SQL Server
  • Support
  • DevKit

no such file to load -- sqlite3/sqlite3_native

Fixed it with this commands:

  gem uninstall sqlite3
gem uninstall sqlite3-ruby
sudo gem install sqlite3 -- --with-sqlite3-dir=/sw

Ted

no such file to load -- sqlite3/sqlite3_native

Fixed it with this commands:

  gem uninstall sqlite3
gem uninstall sqlite3-ruby
sudo gem install sqlite3 -- --with-sqlite3-dir=/sw

Ted

cannot load such file — sqlite3/sqlite3_native (LoadError) on ruby on rails

So it seems that there are some problems with compability on this versions of ruby, rails, and sqlite. I've installed rails installer with 2.3.3 ruby and 5.1.6 rails, and error dissapeared.



Related Topics



Leave a reply



Submit