title: Error for command - rails server - cannot load such file -- sqlite3/sqlite3_native (LoadError)
body: <p>I apologize if this question is redundant but I haven't been able to fix my problem with the suggestions I have found on here and on other sites.  I am new to Ruby,Rails and many concepts that seem to be important for getting everything installed and running correctly. </p>
  
  <p>I am on a mac OS 10.9.
  What I have installed is: ruby 2.0.0, Rails 4.0.2, rubygems 1.8.25.
  I have followed Hartl tutorial exactly from the beginning up until the point where I first call rails server and then I receive this error message:</p>
  
  <blockquote>
    <p>Macintosh-0025bce1e74a:first_app johns$ rails server</p>
    
    <p>/Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in <code>require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
        from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:6:in</code>rescue in '</p>
  </blockquote>
  
  <pre><code>from /Library/Ruby/Gems/2.0.0/gems/sqlite3-1.3.8/lib/sqlite3.rb:2:in `&lt;top (required)&gt;'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `require'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `each'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler/runtime.rb:72:in `block in require'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `each'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler/runtime.rb:61:in `require'
  from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.1/lib/bundler.rb:131:in `require'
  from /Users/johns/Desktop/rails/first_app/config/application.rb:7:in `&lt;top (required)&gt;'
  from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
  from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in &lt;top (required)&gt;'
  from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
  from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/commands.rb:71:in `&lt;top (required)&gt;'
  from bin/rails:4:in `require'
  from bin/rails:4:in `&lt;main&gt;'
  </code></pre>
  
  <p>I had installed sqlite3 prior to starting the rails tutorial so I thought perhaps that could possibly be related to the problem but I am not educated about paths and how to figure out if that is the problem.</p>
  
  <blockquote>
    <p>Macintosh-0025bce1e74a:~ johns$ sqlite3 --version 3.7.13</p>
  </blockquote>
  
  <p>From what I have read my computer will go through PATH to find the executable binaries needed to run a program and my PATH is as follows:</p>
  
  <blockquote>
    <p>Macintosh-0025bce1e74a:~ johns$ echo $PATH
    /usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin</p>
  </blockquote>
  
  <p>my gemfile is </p>
  
  <pre><code>source 'https://rubygems.org'
  ruby '2.0.0'
  #ruby-gemset=railstutorial_rails_4_0
  
  gem 'rails', '4.0.2'
  
  group :development do
    gem 'sqlite3', '1.3.8'
  end
  
  gem 'sass-rails', '4.0.1'
  gem 'uglifier', '2.1.1'
  gem 'coffee-rails', '4.0.1'
  gem 'jquery-rails', '3.0.4'
  gem 'turbolinks', '1.1.1'
  gem 'jbuilder', '1.0.2'
  
  group :doc do
    gem 'sdoc', '0.3.20', require: false
  end
  </code></pre>
  
  <p>I did remember to run bundle update, bundle install. </p>
  
  <p>Thanks so much for any help! </p>
  
  <p>EDIT
  I think I got it working by finally understanding how to perform the steps laid out in a link someone posted in a previous question of this nature</p>
  
  <p><a href="http://ahmedemad.wordpress.com/2013/05/17/ruby-on-rails-install-run-error/" rel="nofollow">http://ahmedemad.wordpress.com/2013/05/17/ruby-on-rails-install-run-error/</a></p>
  
  <p>EDIT
  It didn't work, the rails server command went through okay but when I tried to pull up the page I got another error:</p>
  
  <blockquote>
    <p>undefined method `busy_timeout' for #SQLite3::Database:0x007fccb3e10438></p>
  </blockquote>
  
  <p>EDIT
  I tried another suggestion I found but it produced the same error when I tried to visit the site.</p>
  
  <p>I edited the /sqlite3-1.3.8.gemspec and changed  s.require_paths=["lib"] to s.require_paths= ["lib/sqlite3_native"] which apparently did the trick for some one.</p>
  
  <p>EDIT
  got rvm and reinstalled things, had another go at it and it now works...weird</p>