I receive an error when attempting to run rails s
or rails c
.
I recently installed ruby and rails via homebrew and rbenv. When I run rails new project
the app is successfully created. I then do bundle install
in the appropriate directory and everything updates smoothly, when i then run rails s
or rails c
. The following errors come up:
|14:48:23| ~ rails c
/Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext/parser.bundle: [BUG] Segmentation fault
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin13.2.0]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
the more detail of.
-- Control frame information -----------------------------------------------
c:0031 p:-17563034837610 s:0092 e:000091 TOP [FINISH]
c:0030 p:---- s:0090 e:000089 CFUNC :require
c:0029 p:0009 s:0086 e:000085 CLASS /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext.rb:13
c:0028 p:0011 s:0084 e:000083 CLASS /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext.rb:12
c:0027 p:0057 s:0082 e:000081 TOP /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext.rb:9 [FINISH]
...
(keeps going and going)
221 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.0/lib/active_support/core_ext/object/conversions.rb
222 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/activesupport-4.0.0/lib/active_support/core_ext/object/instance_variables.rb
223 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/version.rb
224 /Users/jona/.rbenv/versions/2.0.0-p481/lib/ruby/2.0.0/ostruct.rb
225 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/generic_object.rb
226 /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/common.rb
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Full bug report http://pastebin.com/ZXDcapw5
As promised, here is the answer:
Did you used rvm before? Because what I can see from the stacktrace is that both rbenv and rvm are called.
If that is the case, remove rvm completely and reinstall rbenv from scratch.