1

I have a problem with my Rails Console, it keeps crashing and I can't figure out why. For example, when I type the following

rails c
Category.connection

It begins with the following error:

/Users/****/.rvm/gems/ruby-2.3.0/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:27: [BUG] Segmentation fault at 0x00000000000110
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]

Then it gives the a whole lot of error messages, with more than 1500 lines with my gemsfiles listed.

I hope someone can help me to fix this problem, by the way I am using macOS Sierra 10.12.1

When anyone needs additional information, please let me know because I don't know what I should include for someone to recognize the problem.

Arend
  • 33
  • 8

2 Answers2

3

Defect is in sqlite3 gem.. its here

https://bugs.ruby-lang.org/issues/12781 and https://bugs.ruby-lang.org/issues/12795

Try using

gem 'sqlite3', '1.3.12'
Vishal G
  • 1,521
  • 11
  • 30
  • I already fixed it, it seems that when you use the "gem 'sqlite3', '1.3.12'", it will work, at least for me. – Arend Nov 25 '16 at 13:58
  • @Arend At that time I had changed the database, as yo are saying its working with this version then its good news – Vishal G Nov 25 '16 at 13:59
0

There's an issue with mac os sierra and sqlite3. See this answer, basiclly you should run bundle update and brew install sqlite3

Community
  • 1
  • 1
mlabarca
  • 796
  • 7
  • 16