• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2386
  • Last Modified:

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

Trying to get ruby on rails 1.8.7 working on windows but when i start rails server i get this error:

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

I have tried copying the 3 sqlite files and putting them in ruby/bin but it doesnt help as mentioned at the bottom of this post: http://www.ruby-forum.com/topic/216270

Any ideas?

Rails 3.0.6 | Ruby 1.8.7 | Windows 7
Mark Steggles
Mark Steggles
  • 3
  • 2
1 Solution
Have you installed the sqlite3 gem with "gem install sqlite3-ruby"? I actually don't have any experience running Rails on Windows, but I always almost forget to do this when setting up the Rails development environment on a new machine.
If you're on Rails 3, then all you should need do is
1. add it to your Gemfile
   gem 'sqlite3', '1.3.3', :require => 'sqlite3'
(I have the version number because I don't want random upgrades on my gems)
2. run
  bundle install
and it will take care of installing it for you.

Bundler is your friend when it comes to gems...
Mark StegglesWeb DeveloperAuthor Commented:

I tried that and I get the same error. See attached screen shot

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Ah, windows... Try this point (a bit old, but looks reasonable) http://blog.emson.co.uk/2008/06/installing-sqlite3-on-windows-for-rails/

Or this one which is specific to Rails3: http://accidentaltechnologist.com/ruby-on-rails/running-rails-3-on-windows/
Mark StegglesWeb DeveloperAuthor Commented:
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
Mark StegglesWeb DeveloperAuthor Commented:
Found my own answer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now