views:

2830

answers:

4

So I followed every suggestion in this thread

without success. I'm running os x 10.6, rails 2.3.3, ruby 1.9.1 and still getting this error when I try accessing the front page of my rails app:

uninitialized constant SQLite3::Driver::Native::Driver::API

I've googled every possible combination of snow leopard, rails, sqlite3 without any luck. Hoping someone can help. Thanks!

+6  A: 

I finally solved this by recompiling ruby 1.9.1 with the appropriate sqlite3 libraries linked. So in my case I needed to create this link:

sudo ln -s  /Developer/SDKs/MacOSX10.6.sdk/usr/lib/libsqlite3.0.dylib /usr/local/lib/libsqlite3.dylib
ennuikiller
+2  A: 

Or, simply

sudo gem install sqlite3-ruby
accuser
unfortunately that didnt work for me since I was still running with ruby 1.9.1 32 bit
ennuikiller
This didn't work for me either. I'm still on Ruby 1.8.7 though. I had to reinstall XCode then recompile it.
Kevin
+1  A: 

Wierd, but I uninstalled all my Sqlite3 versions and resintalled Sqlite3 and it worked.

Brian Price
A: 

I had a similar thing happen on an older Ubuntu server (6.06), on which I had installed SQLite from source. There was no ld.so.conf file so I had to create that and add /usr/local/lib to it.

Nathan L Smith