If you block your gemfile for sqlite3-ruby, you will have problems running the application in the latest versions of Rails, because Rails wants to have a gem named "sqlite3". The real solution to this problem is to ensure that the .bundle file that creates the gem really references the correct sqlite3 libraries.
By default, sqlite3 gem will reference a nonexistent library in your / usr / lib. It is not right. What you need to do is set the matching options directly to your system and reinstall the sqlite3 stone, and you can easily do this using
$bundle config
Their manpage indicates what it does, but this is the command I need to do (I have my own installation of SQLite from my site, not through brew or macports).
$bundle config build.sqlite3 --with-sqlite3-include=/usr/local/include --with-sqlite3-lib=/usr/local/lib
This will always submit the correct parameters to the gem when you try to “install the package” and your gem is correctly created.
Please note that this problem is curious in that it will not appear on Ruby 1.9 - rbconfig seems to be updated and will improve library search. But when you are going to use 1.8 compatibility, use this package configuration and everything will be installed.
source share