Ruby(或FFI?)执行Jekyll命令时出错
Ruby (or FFI?) error when executing Jekyll commands
我想使用 Jekyll 创建一个新网页,但是当我执行 jekyll new <page>
时,Ruby 崩溃了,崩溃报告非常长,开头如下:
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275: [BUG] Bus Error at 0x0000000100e08000
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
-- Control frame information -----------------------------------------------
c:0027 p:---- s:0156 e:000155 CFUNC :attach
c:0026 p:0258 s:0150 e:000149 METHOD /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275
c:0025 p:0023 s:0130 e:000129 METHOD /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:40
c:0024 p:0012 s:0125 e:000124 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:5
c:0023 p:0007 s:0122 e:000121 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:4
c:0022 p:0007 s:0119 e:000118 TOP /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:3 [FINISH]
c:0021 p:---- s:0116 e:000115 CFUNC :require_relative
c:0020 p:0247 s:0111 e:000110 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60
c:0019 p:0007 s:0107 e:000106 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:6
c:0018 p:0014 s:0104 e:000103 TOP /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:5 [FINISH]
c:0017 p:---- s:0101 e:000100 CFUNC :require_relative
c:0016 p:0021 s:0096 e:000095 TOP /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31 [FINISH]
c:0015 p:---- s:0093 e:000092 CFUNC :require
c:0014 p:0110 s:0088 e:000087 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0013 p:0006 s:0076 e:000075 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:3 [FINISH]
c:0012 p:---- s:0073 e:000072 CFUNC :require
c:0011 p:0110 s:0068 e:000067 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0010 p:0013 s:0056 e:000055 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll-sass-converter.rb:4 [FINISH]
c:0009 p:---- s:0053 e:000052 CFUNC :require
c:0008 p:0110 s:0048 e:000047 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0007 p:0226 s:0036 e:000035 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/lib/jekyll.rb:195 [FINISH]
c:0006 p:---- s:0033 e:000032 CFUNC :require
c:0005 p:0110 s:0028 e:000027 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0004 p:0041 s:0016 e:000015 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/exe/jekyll:8 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC :load
c:0002 p:0109 s:0008 E:001cc0 EVAL /usr/local/bin/jekyll:23 [FINISH]
c:0001 p:0000 s:0003 E:000cc0 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/jekyll:23:in `<main>'
/usr/local/bin/jekyll:23:in `load'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/exe/jekyll:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/lib/jekyll.rb:195:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:6:in `<module:SassC>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60:in `<module:Native>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60:in `require_relative'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:4:in `<module:SassC>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:5:in `<module:Native>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:40:in `attach_function'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275:in `attach_function'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275:in `attach'
我正在使用配备 M1 Pro 的 MacBook Pro。 Ruby 已通过 Homebrew 安装,并且在我的 Intel-MacBook 上始终运行良好。有人知道这个错误吗?
此致,
雅尼克
问题如下:我用 Homebrew 安装了 Ruby,但 macOS 附带了它自己的 Ruby,但是是 wring 版本。我关注了 this tutorial,这解决了我的问题。
我想使用 Jekyll 创建一个新网页,但是当我执行 jekyll new <page>
时,Ruby 崩溃了,崩溃报告非常长,开头如下:
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275: [BUG] Bus Error at 0x0000000100e08000
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
for more details.
Don't forget to include the above Crash Report log file in bug reports.
-- Control frame information -----------------------------------------------
c:0027 p:---- s:0156 e:000155 CFUNC :attach
c:0026 p:0258 s:0150 e:000149 METHOD /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275
c:0025 p:0023 s:0130 e:000129 METHOD /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:40
c:0024 p:0012 s:0125 e:000124 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:5
c:0023 p:0007 s:0122 e:000121 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:4
c:0022 p:0007 s:0119 e:000118 TOP /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:3 [FINISH]
c:0021 p:---- s:0116 e:000115 CFUNC :require_relative
c:0020 p:0247 s:0111 e:000110 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60
c:0019 p:0007 s:0107 e:000106 CLASS /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:6
c:0018 p:0014 s:0104 e:000103 TOP /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:5 [FINISH]
c:0017 p:---- s:0101 e:000100 CFUNC :require_relative
c:0016 p:0021 s:0096 e:000095 TOP /Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31 [FINISH]
c:0015 p:---- s:0093 e:000092 CFUNC :require
c:0014 p:0110 s:0088 e:000087 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0013 p:0006 s:0076 e:000075 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:3 [FINISH]
c:0012 p:---- s:0073 e:000072 CFUNC :require
c:0011 p:0110 s:0068 e:000067 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0010 p:0013 s:0056 e:000055 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll-sass-converter.rb:4 [FINISH]
c:0009 p:---- s:0053 e:000052 CFUNC :require
c:0008 p:0110 s:0048 e:000047 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0007 p:0226 s:0036 e:000035 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/lib/jekyll.rb:195 [FINISH]
c:0006 p:---- s:0033 e:000032 CFUNC :require
c:0005 p:0110 s:0028 e:000027 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0004 p:0041 s:0016 e:000015 TOP /Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/exe/jekyll:8 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC :load
c:0002 p:0109 s:0008 E:001cc0 EVAL /usr/local/bin/jekyll:23 [FINISH]
c:0001 p:0000 s:0003 E:000cc0 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/jekyll:23:in `<main>'
/usr/local/bin/jekyll:23:in `load'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/exe/jekyll:8:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.2.2/lib/jekyll.rb:195:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll-sass-converter.rb:4:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/jekyll-sass-converter-2.2.0/lib/jekyll/converters/scss.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc.rb:31:in `require_relative'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:5:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:6:in `<module:SassC>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60:in `<module:Native>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:60:in `require_relative'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:3:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:4:in `<module:SassC>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native/native_context_api.rb:5:in `<module:Native>'
/Library/Ruby/Gems/2.6.0/gems/sassc-2.4.0/lib/sassc/native.rb:40:in `attach_function'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275:in `attach_function'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/library.rb:275:in `attach'
我正在使用配备 M1 Pro 的 MacBook Pro。 Ruby 已通过 Homebrew 安装,并且在我的 Intel-MacBook 上始终运行良好。有人知道这个错误吗?
此致,
雅尼克
问题如下:我用 Homebrew 安装了 Ruby,但 macOS 附带了它自己的 Ruby,但是是 wring 版本。我关注了 this tutorial,这解决了我的问题。