sqlite3-ruby can't make on rvm 1.8.7

后端 未结 4 457
我寻月下人不归
我寻月下人不归 2020-12-29 11:38

Upgrading to Rails 3 by starting with RVM 1.8.7. OSX 10.5.8

Output:
josh-crewss-macbook:~ joshcrews$ gem install sqlite3-rubyBuilding native extensions.  Th         


        
相关标签:
4条回答
  • 2020-12-29 12:00

    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
    
    0 讨论(0)
  • 2020-12-29 12:08

    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
    
    0 讨论(0)
  • 2020-12-29 12:15

    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
    
    0 讨论(0)
  • 2020-12-29 12:26

    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.

    0 讨论(0)
提交回复
热议问题