gpt4 book ai didi

ruby-on-rails - Rails 段错误 byebug

转载 作者:数据小太阳 更新时间:2023-10-29 07:08:05 28 4
gpt4 key购买 nike

我正在尝试测试我的 Rails 环境并创建一个测试 Rail 应用程序,但我遇到了问题。当我尝试运行 rails server 时,这是我得到的:

/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'

接着是另外 900 多行详细说明加载的功能。最后,终端给我一张便条说

[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

我不确定我做错了什么,我应该如何解决?我试过卸载和安装 sqlite3,然后运行 ​​bundle updatebundle install,但它不起作用。非常感谢任何帮助!

最佳答案

所以我不确定这是否是问题的通用解决方案。然而,我得到了

/Users/Mark/.rvm/gems/ruby-2.2.5@insight-app/gems/json-1.8.3/lib/json/ext/parser.bundle:[BUG] 段错误
ruby 2.0.0p481(2014-05-08 修订版 45883)[universal.x86_64-darwin14]

并通过执行以下操作重新加载 rvm 环境:

rvm 使用 ruby​​-2.2.5(或任何合适的版本)

bundle 安装后,我就可以继续启动 rails 了。希望有人能够阐明这是多么普遍,以及它为什么有效

关于ruby-on-rails - Rails 段错误 byebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31645083/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com