Snow Leopard, sqlite3-ruby

2019-02-14 16:13发布

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!

5条回答
可以哭但决不认输i
2楼-- · 2019-02-14 16:46

Or, simply

sudo gem install sqlite3-ruby
查看更多
男人必须洒脱
3楼-- · 2019-02-14 16:56

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

查看更多
我欲成王,谁敢阻挡
4楼-- · 2019-02-14 16:58

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
查看更多
小情绪 Triste *
5楼-- · 2019-02-14 17:02

ennuikillers' answer worked for me. I'll add that I did this on a mac (running snow leopard) and /usr/local/lib/libsqlite3.dylib already existed and was symlinked to the wrong thing.

I had to add the line: sudo rm /usr/local/lib/libsqlite3.dylib

before the symlink line.

查看更多
来,给爷笑一个
6楼-- · 2019-02-14 17:08

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.

查看更多
登录 后发表回答