Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails segmentation fault byebug

I'm trying to test out my rails environment and create a test rail app, but I'm having problems with it. When I try to run rails server, this is what I get:

/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug/byebug.bundle: [BUG] Segmentation fault at 0x00000000000418
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]

-- 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
   for more details.

-- Control frame information -----------------------------------------------
c:0033 p:-17551942720714 s:0115 e:000114 TOP    [FINISH]
c:0032 p:---- s:0113 e:000112 CFUNC  :require
c:0031 p:0007 s:0109 e:000108 TOP    /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug/core.rb:1 [FINISH]
c:0030 p:---- s:0107 e:000106 CFUNC  :require
c:0029 p:0007 s:0103 e:000102 TOP    /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug.rb:1 [FINISH]
c:0028 p:---- s:0101 e:000100 CFUNC  :require
c:0027 p:0037 s:0097 e:000096 BLOCK  /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:76 [FINISH]
c:0026 p:---- s:0094 e:000093 CFUNC  :each
c:0025 p:0053 s:0091 e:000090 BLOCK  /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:72 [FINISH]
c:0024 p:---- s:0085 e:000084 CFUNC  :each
c:0023 p:0030 s:0082 e:000081 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:61
c:0022 p:0017 s:0078 e:000077 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler.rb:134
c:0021 p:0049 s:0074 e:000073 TOP    /Users/Andrea/railsbridge/test_app/config/application.rb:7 [FINISH]
c:0020 p:---- s:0072 e:000071 CFUNC  :require
c:0019 p:0014 s:0068 e:000067 BLOCK  /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78 [FINISH]
c:0018 p:---- s:0065 e:000064 CFUNC  :tap
c:0017 p:0031 s:0062 e:000061 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75
c:0016 p:0033 s:0059 e:000058 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39
c:0015 p:0116 s:0055 e:000054 TOP    /Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands.rb:17 [FINISH]
c:0014 p:---- s:0051 e:000050 CFUNC  :require
c:0013 p:0056 s:0047 e:000046 TOP    /Users/Andrea/railsbridge/test_app/bin/rails:8 [FINISH]
c:0012 p:---- s:0045 e:000044 CFUNC  :load
c:0011 p:0125 s:0041 e:000040 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client/rails.rb:28
c:0010 p:0011 s:0037 e:000036 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client/command.rb:7
c:0009 p:0015 s:0033 e:000032 METHOD /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client.rb:26
c:0008 p:0292 s:0028 e:000027 TOP    /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/bin/spring:48 [FINISH]
c:0007 p:---- s:0024 e:000023 CFUNC  :load
c:0006 p:0121 s:0020 e:000019 TOP    /Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/binstub.rb:11 [FINISH]
c:0005 p:---- s:0015 e:000014 CFUNC  :require
c:0004 p:0114 s:0011 e:000010 TOP    /Users/Andrea/railsbridge/test_app/bin/spring:13 [FINISH]
c:0003 p:---- s:0008 e:000007 CFUNC  :load
c:0002 p:0020 s:0004 E:001340 EVAL   bin/rails:3 [FINISH]
c:0001 p:0000 s:0002 E:002000 TOP    [FINISH]

-- Ruby level backtrace information ----------------------------------------
bin/rails:3:in `<main>'
bin/rails:3:in `load'
/Users/Andrea/railsbridge/test_app/bin/spring:13:in `<top (required)>'
/Users/Andrea/railsbridge/test_app/bin/spring:13:in `require'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/binstub.rb:11:in `load'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/bin/spring:48:in `<top (required)>'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client.rb:26:in `run'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client/command.rb:7:in `call'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `call'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/spring-1.3.6/lib/spring/client/rails.rb:28:in `load'
/Users/Andrea/railsbridge/test_app/bin/rails:8:in `<top (required)>'
/Users/Andrea/railsbridge/test_app/bin/rails:8:in `require'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `server'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:75:in `tap'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78:in `block in server'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:78:in `require'
/Users/Andrea/railsbridge/test_app/config/application.rb:7:in `<top (required)>'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler.rb:134:in `require'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `require'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in `each'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `block in require'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in `each'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/Andrea/.rvm/gems/ruby-2.2.1@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in `require'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug.rb:1:in `<top (required)>'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug.rb:1:in `require'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug/core.rb:1:in `<top (required)>'
/Users/Andrea/.rvm/gems/ruby-2.2.1/gems/byebug-5.0.0/lib/byebug/core.rb:1:in `require'

Followed by another 900+ lines of detailing loaded features. At the end, terminal gives me a note saying

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
Don't forget to include the above Crash Report log file.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap: 6

I'm not sure what I'm doing wrong and how should I fix it? I have tried uninstalling and installing sqlite3, then running bundle update and bundle install, but it does not work. Would appreciate any help!

like image 375
thbcm Avatar asked Jul 27 '15 04:07

thbcm


Video Answer


1 Answers

So I'm not sure if this is a general solution to the problem. However, I got

/Users/Mark/.rvm/gems/ruby-2.2.5@insight-app/gems/json-1.8.3/lib/json/ext/parser.bundle: [BUG] Segmentation fault ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

and reloaded the rvm environ by doing:

rvm use ruby-2.2.5 (or whatever version is appropriate)

after the bundle install and I could then proceed with booting up rails. Hopefully someone will be able to shed some light on how general this is, and why it works

like image 194
Rambatino Avatar answered Oct 20 '22 00:10

Rambatino