错误捆绑 Puma M2 MacBook Ruby on Rails 应用程序

huangapple go评论136阅读模式
英文:

Error Bundling Puma M2 Macbook Ruby on Rails app

问题

我正在开发一个基于Ruby on Rails的应用程序,但每次尝试使用以下命令运行服务器时都会出现错误:

  1. bundle exec puma -C ./config/puma.rb

错误日志如下:

  1. 106454000-10645c000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/objspace.bundle
  2. ...
  3. [重要提示]
  4. 请不要忘记在故障报告中的DiagnosticReports目录下包含Crash Report日志文件。

我在M2芯片(ARM架构)上使用Rbenv和Ruby 2.7.5。我没有使用x86_64标志安装任何包,例如brew、rbenv、nvm,而且我的应用程序在上周之前一直运行正常,但我一直无法解决这个问题。

英文:

I'm working on a Ruby on Rails application, but I get an error every time I try to run my server using the following command:

  1. bundle exec puma -C ./config/puma.rb

the error logs:

  1. 106454000-10645c000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/objspace.bundle
  2. 10645c000-106460000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/objspace.bundle
  3. 106460000-106464000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/objspace.bundle
  4. 106464000-106470000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/objspace.bundle
  5. 106480000-106484000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/io/console.bundle
  6. 106484000-106488000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/io/console.bundle
  7. 106488000-10648c000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/io/console.bundle
  8. 10648c000-106490000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/io/console.bundle
  9. 106490000-1064e8000 r-x /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libssl.3.dylib
  10. 1064e8000-1064f4000 r-- /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libssl.3.dylib
  11. 1064f4000-1064f8000 rw- /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libssl.3.dylib
  12. 1064f8000-10651c000 r-- /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libssl.3.dylib
  13. 10651c000-106524000 r-x /usr/lib/libffi-trampolines.dylib
  14. 106524000-10652c000 r-- /usr/lib/libffi-trampolines.dylib
  15. 10652c000-106530000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/pty.bundle
  16. 106530000-106534000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/pty.bundle
  17. 106534000-106538000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/pty.bundle
  18. 106538000-10653c000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/pty.bundle
  19. 10653c000-106540000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/debug_inspector-1.1.0/lib/debug_inspector.bundle
  20. 106540000-106544000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/debug_inspector-1.1.0/lib/debug_inspector.bundle
  21. 106544000-106548000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/debug_inspector-1.1.0/lib/debug_inspector.bundle
  22. 106548000-10654c000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/debug_inspector-1.1.0/lib/debug_inspector.bundle
  23. 10654c000-106550000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/thin-1.8.2/lib/thin_parser.bundle
  24. 106550000-106554000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/thin-1.8.2/lib/thin_parser.bundle
  25. 106554000-106558000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/thin-1.8.2/lib/thin_parser.bundle
  26. 106558000-10655c000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/thin-1.8.2/lib/thin_parser.bundle
  27. 10655c000-106574000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle
  28. 106574000-106578000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle
  29. 106578000-10657c000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle
  30. 10657c000-10659c000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/eventmachine-1.2.7/lib/rubyeventmachine.bundle
  31. 10659c000-1065b4000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/curb-1.0.5/lib/curb_core.bundle
  32. 1065b4000-1065b8000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/curb-1.0.5/lib/curb_core.bundle
  33. 1065b8000-1065bc000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/curb-1.0.5/lib/curb_core.bundle
  34. 1065bc000-1065d8000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/curb-1.0.5/lib/curb_core.bundle
  35. 1065e0000-106660000 r-x /opt/homebrew/Cellar/krb5/1.21.1/lib/libkrb5.3.3.dylib
  36. 106660000-10666c000 r-- /opt/homebrew/Cellar/krb5/1.21.1/lib/libkrb5.3.3.dylib
  37. 10666c000-106670000 rw- /opt/homebrew/Cellar/krb5/1.21.1/lib/libkrb5.3.3.dylib
  38. 106670000-1066a4000 r-- /opt/homebrew/Cellar/krb5/1.21.1/lib/libkrb5.3.3.dylib
  39. 1066a4000-1066bc000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/ffi-1.15.5/lib/ffi_c.bundle
  40. 1066bc000-1066c0000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/ffi-1.15.5/lib/ffi_c.bundle
  41. 1066c0000-1066c4000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/ffi-1.15.5/lib/ffi_c.bundle
  42. 1066c4000-1066d8000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/ffi-1.15.5/lib/ffi_c.bundle
  43. 1066d8000-1066dc000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/stackprof-0.2.25/lib/stackprof/stackprof.bundle
  44. 1066dc000-1066e0000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/stackprof-0.2.25/lib/stackprof/stackprof.bundle
  45. 1066e0000-1066e4000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/stackprof-0.2.25/lib/stackprof/stackprof.bundle
  46. 1066e4000-1066e8000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/stackprof-0.2.25/lib/stackprof/stackprof.bundle
  47. 1066e8000-1066ec000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/stackprof-0.2.25/lib/stackprof/stackprof.bundle
  48. 1066fc000-10670c000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle
  49. 10670c000-106710000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle
  50. 106710000-106714000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle
  51. 106714000-106720000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/redcarpet-3.6.0/lib/redcarpet.bundle
  52. 106720000-106724000 r-x /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOLocatePlugin_macOS.bundle/Contents/MacOS/AppSSOLocatePlugin_macOS
  53. 106724000-106728000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOLocatePlugin_macOS.bundle/Contents/MacOS/AppSSOLocatePlugin_macOS
  54. 106728000-10672c000 rw- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOLocatePlugin_macOS.bundle/Contents/MacOS/AppSSOLocatePlugin_macOS
  55. 10672c000-106734000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOLocatePlugin_macOS.bundle/Contents/MacOS/AppSSOLocatePlugin_macOS
  56. 106740000-1069d0000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/nokogiri-1.15.2-arm64-darwin/lib/nokogiri/2.7/nokogiri.bundle
  57. 1069d0000-1069e0000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/nokogiri-1.15.2-arm64-darwin/lib/nokogiri/2.7/nokogiri.bundle
  58. 1069e0000-106a7c000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/nokogiri-1.15.2-arm64-darwin/lib/nokogiri/2.7/nokogiri.bundle
  59. 106a7c000-106a84000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/byebug-11.1.3/lib/byebug/byebug.bundle
  60. 106a84000-106a88000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/byebug-11.1.3/lib/byebug/byebug.bundle
  61. 106a88000-106a8c000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/byebug-11.1.3/lib/byebug/byebug.bundle
  62. 106a8c000-106a94000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/byebug-11.1.3/lib/byebug/byebug.bundle
  63. 106a94000-106a9c000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/readline.bundle
  64. 106a9c000-106aa0000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/readline.bundle
  65. 106aa0000-106aa4000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/readline.bundle
  66. 106aa4000-106aac000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/readline.bundle
  67. 106aac000-106ab0000 r-x /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOConfigPlugin_macOS.bundle/Contents/MacOS/AppSSOConfigPlugin_macOS
  68. 106ab0000-106ab4000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOConfigPlugin_macOS.bundle/Contents/MacOS/AppSSOConfigPlugin_macOS
  69. 106ab4000-106ab8000 rw- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOConfigPlugin_macOS.bundle/Contents/MacOS/AppSSOConfigPlugin_macOS
  70. 106ab8000-106ac0000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/AppSSOConfigPlugin_macOS.bundle/Contents/MacOS/AppSSOConfigPlugin_macOS
  71. 106ac0000-106af0000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/ripper.bundle
  72. 106af0000-106af4000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/ripper.bundle
  73. 106af4000-106af8000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/ripper.bundle
  74. 106af8000-106b04000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/2.7.0/arm64-darwin22/ripper.bundle
  75. 106b38000-106bd0000 r-x /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/gpgme-2.0.22/lib/gpgme_n.bundle
  76. 106bd0000-106bd4000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/gpgme-2.0.22/lib/gpgme_n.bundle
  77. 106bd4000-106bd8000 rw- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/gpgme-2.0.22/lib/gpgme_n.bundle
  78. 106bd8000-106bf4000 r-- /Users/emiliocontreras/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/gpgme-2.0.22/lib/gpgme_n.bundle
  79. 106c00000-106d00000 rw- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/heimdalodpac.bundle/Contents/MacOS/heimdalodpac
  80. 106d00000-106d04000 r-x /System/Library/KerberosPlugins/KerberosFrameworkPlugins/heimdalodpac.bundle/Contents/MacOS/heimdalodpac
  81. 106d04000-106d08000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/heimdalodpac.bundle/Contents/MacOS/heimdalodpac
  82. 106d08000-106d0c000 rw- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/heimdalodpac.bundle/Contents/MacOS/heimdalodpac
  83. 106d0c000-106d14000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/heimdalodpac.bundle/Contents/MacOS/heimdalodpac
  84. 106d14000-106d18000 r-x /System/Library/KerberosPlugins/KerberosFrameworkPlugins/Reachability.bundle/Contents/MacOS/Reachability
  85. 106d18000-106d1c000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/Reachability.bundle/Contents/MacOS/Reachability
  86. 106d1c000-106d20000 rw- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/Reachability.bundle/Contents/MacOS/Reachability
  87. 106d20000-106d28000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/Reachability.bundle/Contents/MacOS/Reachability
  88. 106d28000-106d2c000 r-x /System/Library/KerberosPlugins/KerberosFrameworkPlugins/SCKerberosConfig.bundle/Contents/MacOS/SCKerberosConfig
  89. 106d2c000-106d30000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/SCKerberosConfig.bundle/Contents/MacOS/SCKerberosConfig
  90. 106d30000-106d34000 rw- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/SCKerberosConfig.bundle/Contents/MacOS/SCKerberosConfig
  91. 106d34000-106d3c000 r-- /System/Library/KerberosPlugins/KerberosFrameworkPlugins/SCKerberosConfig.bundle/Contents/MacOS/SCKerberosConfig
  92. 106d50000-106d7c000 r-x /opt/homebrew/Cellar/readline/8.2.1/lib/libreadline.8.2.dylib
  93. 106d7c000-106d80000 r-- /opt/homebrew/Cellar/readline/8.2.1/lib/libreadline.8.2.dylib
  94. 106d80000-106d88000 rw- /opt/homebrew/Cellar/readline/8.2.1/lib/libreadline.8.2.dylib
  95. 106d88000-106da0000 r-- /opt/homebrew/Cellar/readline/8.2.1/lib/libreadline.8.2.dylib
  96. 106dc8000-107004000 r-x /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libcrypto.3.dylib
  97. 107004000-10705c000 r-- /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libcrypto.3.dylib
  98. 10705c000-107060000 rw- /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libcrypto.3.dylib
  99. 107060000-107114000 r-- /opt/homebrew/Cellar/openssl@3/3.1.1_1/lib/libcrypto.3.dylib
  100. 107114000-107154000 rw-
  101. 107200000-107300000 rw-
  102. 107300000-107400000 rw-
  103. 107400000-107500000 rw-
  104. 107500000-107600000 rw-
  105. 107600000-107700000 rw-
  106. 107700000-107800000 rw-
  107. [IMPORTANT]
  108. Don't forget to include the Crash Report log file under
  109. DiagnosticReports directory in bug reports.

I use Rbenv with ruby 2.7.5 on a M2 chip (ARM). I haven't installed any package like brew, rbenv, nvm using the arch x86_64 flag, and my application worked perfectly until last week, and I haven't been able to fix this problem.

答案1

得分: 1

日志缺少错误信息。它只显示了调用堆栈的末尾部分。
所以这有点猜测。

我会尝试

  • 更新Homebrew(运行brew update,这可能会破坏了你的安装)
  • 使用rbenv重新安装Ruby
  • 清理并重新安装你的bundle
英文:

The log is missing the error. It only shows the tail of the call stack.
So it's a bit guessing.

I would try to

  • update homebrew (brew update, what probably broke your installation)
  • reinstall ruby with rbenv
  • prune and reinstall your bundle

答案2

得分: 0

我的强烈建议是使用Docker进行开发。这样,您就不会受制于主机系统的库、更新(或缺乏更新)等等。

https://github.com/rails/docked 看起来是一个合理的选择 - 但有许多其他选项。

英文:

My strong advice is to use docker to do development. Then you are not at the mercy of the host system libs, updates (or lack thereof), etc.

https://github.com/rails/docked looks like a reasonable option - but there are many.

huangapple
  • 本文由 发表于 2023年7月17日 15:20:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/76702241.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定