Segmentation fault with Rails after upgrading to OS Sierra, possibly related to sqlite3 gem

后端 未结 7 1114
一个人的身影
一个人的身影 2020-12-15 17:20

After upgrading to OSX Sierra I am having an issue with random segmentation faults. It most commonly occurs when running rails test and I believe it is due to the sqlite3_ad

相关标签:
7条回答
  • 2020-12-15 17:51

    I faced the same issue, I upgraded sqlite3 gem to 1.3.12 and it helped

    0 讨论(0)
  • 2020-12-15 17:58

    All the previous solutions didn't worked so I've fixed this way:

    gem uninstall sqlite3

    brew install sqlite3

    gem install sqlite3 -- --with-sqlite3-include=/usr/local/Cellar/sqlite/3.15.2/include --with-sqlite3-lib=/usr/local/Cellar/sqlite/3.15.2/lib

    (Check the version you have in Cellar)

    This is a temporary fix and probably if update the bundle it will stop working and you will do it again but al least I can work on my machine

    0 讨论(0)
  • 2020-12-15 17:59

    Same problem w/Sierra. None of the stuff on this page worked for me, i.e. gem pristine sqlite3, xcode-select --install, sqlite3; gem uninstall sqlite3; bundle update. I eventually completely uninstalled the Ruby version with rbenv uninstall 2.3.1, then reinstalled it. This worked. I have no idea why.

    0 讨论(0)
  • 2020-12-15 18:00

    Looks like a patch has been issued! The patch will look for sqlite3 in your brew folder instead of using Apple's supplied version by default. Simply run:

    bundle update
    

    to get the latest version of sqlite3-ruby and if you don't already have sqlite3 installed in your homebrew directory, run:

    brew install sqlite3
    
    0 讨论(0)
  • 2020-12-15 18:01

    I had the same problem when upgrading to Sierra. A simple bundle update will do the trick! Hope this helps.

    0 讨论(0)
  • 2020-12-15 18:06

    Try rebuilding the sqlite3 gem. It has native extensions, and recompiling them in the Sierra environment may fix the issue.

    Run:

    gem pristine sqlite3
    

    Which should give output like:

    Restoring gems to pristine condition...
    Building native extensions.  This could take a while...
    Restored sqlite3-1.3.10
    Building native extensions.  This could take a while...
    Restored sqlite3-1.3.11
    
    0 讨论(0)
提交回复
热议问题