我正在尝试安装Rails,这是我的问题。
我的红宝石版本是3.1.2(当我通过命令ruby -v检查时)
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]但是当我运行像rails -v或rails -s这样的代码时,它总是会给我带来这个错误。
/Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': incompatible library version - /Users/anhbui/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/bootsnap.bundle (LoadError)
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/compile_cache/iseq.rb:3:in `<top (required)>'
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/compile_cache.rb:16:in `require_relative'
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/compile_cache.rb:16:in `setup'
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap.rb:55:in `setup'
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap.rb:97:in `default_setup'
from /Users/xxx/.gem/ruby/3.1.2/gems/bootsnap-1.14.0/lib/bootsnap/setup.rb:5:in `<top (required)>'
from /Users/xxx/Desktop/Rails/freelancer/config/boot.rb:4:in `require'
from /Users/xxx/Desktop/Rails/freelancer/config/boot.rb:4:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'那么,我该怎么解决这个问题?
我的设置是
红宝石3.1.2纱1.22.19节19.0.1 rails 6.1.x (可能)
提前谢谢你!
发布于 2022-11-25 10:56:04
不知道这里的bug是什么,但我也面临着同样的问题,我通过完全卸载brew并重新安装它来解决它。
https://stackoverflow.com/questions/74570411
复制相似问题