Can't start IRB intermittently because of activerecord error

78 views Asked by At

I'm having trouble reliably running the Rails console. Usually I can start it it once after restarting my machine, but after quitting, I can't start it again. It looks like the problem is with activerecord.

$ rails c
Running via Spring preloader in process 82527
/Users/<username>/.rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:27: [BUG] Segmentation fault at 0x00000000000110
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
2

There are 2 answers

0
Sean Huber On

Make sure you have the latest version of the sqlite3 gem:

bundle update

Also get the latest version of sqlite3-ruby:

brew install sqlite3
0
MZaragoza On

When that happens to me what I normally do is  grep command in following way,

    ps aux | grep rails

 and then

    kill -9 {process_id}