sqlite3-ruby can't make on rvm 1.8.7

扶醉桌前 提交于 2019-11-30 05:11:06

I got help at Railsconf from a (the?) sqlite3-ruby gem maintainer, Aaron Patterson

Options:

  • Get on Snow Leopard
  • Install sqlite3-ruby 1.2.5
  • Install sqlite3 via macports first

Get on Snow Leopard

sqlite3-ruby >= 1.3.0 not tested for OSX 10.5. Snow Leopard should work

Install sqlite3-ruby 1.2.5

gem install sqlite3-ruby -v 1.2.5

Then set each Rails3 Gemfile to say this

gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'

Install sqlite3 via macports first

sudo port install sqlite3
gem install sqlite3-ruby

I'm not 100% sure what is causing the issue, but I got it working by installing sqlite3 via homebrew: http://github.com/mxcl/homebrew

After that, the gem installed just fine. Leopard's version of sqlite3 must not be compatible with the new version of sqlite3-ruby.

If you already have the sqlite3 macport or brew installed, and you still have the issue, you might have to specify build options when installing the gem.

Example:

gem install sqlite3 -v 1.3.5 -- --with-sqlite3-include=/opt/local/include --with-sqlite3-lib=/opt/local/lib

If you're on homebrew, use /usr/local instead of /opt/local .

To configure bundler to remember the build options for sqlite3 (run "bundle help config" for more info):

bundle config build.sqlite3 --with-sqlite3-include=/opt/local/include --with-sqlite3-lib=/opt/local/lib
Prashant Katare

I have the same issue on Linux, and runs bellow two commands. Works perfectly.

sudo aptitude install sqlite3 libsqlite3-dev
sudo gem install sqlite3-ruby
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!