Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Snow Leopard, sqlite3-ruby

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!

like image 367
ennuikiller Avatar asked Dec 18 '22 06:12

ennuikiller


2 Answers

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
like image 185
ennuikiller Avatar answered Jan 04 '23 11:01

ennuikiller


Or, simply

sudo gem install sqlite3-ruby
like image 42
accuser Avatar answered Jan 04 '23 11:01

accuser