Leopard LoadError: no such file to load — sqlite3

I’m not quite sure why this happened, but I kept getting this error with Leopard and sqlite3:

LoadError: no such file to load -- sqlite3

I tried to gem install and uninstall sqlite3-ruby a few times but that didn’t work out. However, installing from source did. Head on over to the Rubyforge page and download the zip or tgz archive. Extract it and just run:

ruby setup.rb

After that requiring sqlite3 should work fine.

Post to Twitter Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook Post to Reddit Reddit This Post

No related posts.

Tags:

8 Responses to “Leopard LoadError: no such file to load — sqlite3”

  1. Nick 24. Nov, 2008 at 4:58 pm #

    This was very helpful. Thank you very much.

  2. Jeremy Weiskotten 25. Nov, 2008 at 1:30 am #

    Same thing happened to me today. Strange. Did you also update your Rails gems to 2.2.2?

  3. Jason Seifer 25. Nov, 2008 at 1:57 am #

    @Nick Thanks!

    @Jeremy I did update the Rails gems but I’m not sure how long this has been broken.

  4. Ricardo Yasuda 29. Nov, 2008 at 7:52 pm #

    Had this problem too, after updating the Rails gems to 2.2.2. Your solution worked perfectly, thanks!

  5. Marc Jeanson 07. Feb, 2009 at 3:43 am #

    adding the following to my environment.rb fixed this same issue:

    config.gem ‘sqlite3-ruby’, :lib => ‘sqlite3’

    • Rizzz 28. Jul, 2010 at 6:35 pm #

      Worked like a charm!

  6. Charlie 26. Feb, 2009 at 10:31 pm #

    You post just keeps on giving. Thanks from me, as well.

Trackbacks/Pingbacks

  1. codevader » Blog Archive » Problems with Sqlite3 on Leopard? - 12. Jun, 2009

    [...] I could open sqlite3 at the console just fine. Ruby didn’t see it though. The solution was here. Ditching the gem and compiling from source fixed [...]

Leave a Reply