0

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]
nipponese
  • 2,813
  • 6
  • 35
  • 51
  • Ok, looks like this is a common issue with `spring`. Solution is to kill it with `bin/spring stop`. Source: http://stackoverflow.com/questions/25027284/ruby-on-rails-console-hanging-when-loading – nipponese Dec 19 '16 at 18:46

2 Answers2

1

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

bundle update

Also get the latest version of sqlite3-ruby:

brew install sqlite3
Sean Huber
  • 3,945
  • 2
  • 26
  • 31
0

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} 

MZaragoza
  • 10,108
  • 9
  • 71
  • 116