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

Posted on 2011-04-23
Last Modified: 2012-05-11
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:

Any ideas?

Rails 3.0.6 | Ruby 1.8.7 | Windows 7
Question by:Steggs
    LVL 4

    Expert Comment

    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.
    LVL 12

    Expert Comment

    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...
    LVL 30

    Author Comment


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

    LVL 12

    Expert Comment

    Ah, windows... Try this point (a bit old, but looks reasonable)

    Or this one which is specific to Rails3:
    LVL 30

    Accepted Solution

    Found the solution on this post's comments

    "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:
    LVL 30

    Author Closing Comment

    Found my own answer

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    I recently rediscovered rails when I needed a holiday project and decided to build a management dashboard for the company where I work.  With it being a project done in my free time, I could focus my time on learning the basics rather than trying to…
    Article by: narshlob
    If you've ever programmed in Ruby and have come across either a proc or a lambda, you might have been wondering what the difference is between the two and when you would use one over the other. This article will try to explain the difference between…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now