0

I am trying to install rails, by following instructions that I found online and also instructions that I found in the book Beginning Rails 4. I thought I had installed everything, and managed to create a new Rails application. Here are my commands:

rails new blog
rake db:create

Then I get an error:

rake aborted!

    LoadError: cannot load such file -- sqlite3/sqlite3_native

I've been reading for about two hours trying to figure out what this is. I think it might have something to do with multiple ruby installations and/or location of gems.

$ which ruby
/usr/bin/ruby
$ which gem
/usr/bin/gem
$ which rake
/usr/local/bin/rake
$ which sqlite3
~/anaconda/bin/sqlite3

$ echo $PATH 

/home/user/anaconda/bin:/home/user/anaconda/bin:/home/user/anaconda/bin:/home/user/anaconda/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/user/.local/bin:/home/user/bin

Any idea how I can solve this issue?

Here is some additional info:

rails --version
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
Rails 4.2.4
ruby --version
ruby 2.0.0p598 (2014-11-13) [x86_64-linux]
sqlite3 --version
3.8.4.1 2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0
evianpring
  • 3,316
  • 1
  • 25
  • 54
  • Did you look at this thread? http://stackoverflow.com/questions/17643897/cannot-load-such-file-sqlite3-sqlite3-native-loaderror-on-ruby-on-rails – Susan Joshi Sep 23 '15 at 10:51
  • I saw that thread, yes. Didn't help me much. /usr/local/share/gem/specifications/sqlite3-1.3.10.gemspec which I'm supposed to edit, is blank when I open it with emacs. Also, one link posted in the comments there https://ahmedemad.wordpress.com/2013/05/17/ruby-on-rails-install-run-error/ doesn't work for me, giving me a new error: rake aborted! LoadError: cannot load such file -- nokogiri/nokogiri – evianpring Sep 23 '15 at 11:14
  • Is it problematic that which sqlite3 gives me a location in anaconda, which I think is related to my Python IDE? – evianpring Sep 23 '15 at 11:15

0 Answers0