我正在运行 Ruby 版本 2.7.2,并且我一直在尝试运行 Ruby on Rails,但似乎没有任何效果。我试过了rvm
,但rbenv
现在asdf
每次我在成功运行后尝试rails server
在旧项目中运行时bundle install
,都会收到这个长错误:
Traceback (most recent call last):
29: from bin/rails:2:in `<main>'
28: from bin/rails:2:in `load'
27: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `<top (required)>'
26: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `tap'
25: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:10:in `block in <top (required)>'
24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
16: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
15: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `<top (required)>'
14: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `require_relative'
13: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `<top (required)>'
12: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `require'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:41:in `with_gems'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
2: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `require': cannot load such file -- msgpack/2.6/msgpack (LoadError)
30: from bin/rails:2:in `<main>'
29: from bin/rails:2:in `load'
28: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `<top (required)>'
27: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `tap'
26: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:10:in `block in <top (required)>'
25: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
16: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `<top (required)>'
15: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `require_relative'
14: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `<top (required)>'
13: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `require'
12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:41:in `with_gems'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:8:in `<top (required)>'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle - /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle (LoadError)
30: from bin/rails:2:in `<main>'
29: from bin/rails:2:in `load'
28: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `<top (required)>'
27: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `tap'
26: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:10:in `block in <top (required)>'
25: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
16: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `<top (required)>'
15: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `require_relative'
14: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `<top (required)>'
13: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `require'
12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:40:in `with_gems'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:44:in `rescue in with_gems'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
2: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `require': cannot load such file -- msgpack/2.6/msgpack (LoadError)
31: from bin/rails:2:in `<main>'
30: from bin/rails:2:in `load'
29: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `<top (required)>'
28: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:7:in `tap'
27: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/spring:10:in `block in <top (required)>'
26: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
25: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
23: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
17: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `<top (required)>'
16: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/bin/rails:4:in `require_relative'
15: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `<top (required)>'
14: from /Users/arpanabhishek/projects/coronafree-projects/todo_manager/config/boot.rb:4:in `require'
13: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:40:in `with_gems'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:44:in `rescue in with_gems'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:8:in `<top (required)>'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle - /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle (LoadError)
如果我尝试创建新的 rails 应用程序,我会收到此错误
Traceback (most recent call last):
29: from bin/rails:2:in `<main>'
28: from bin/rails:2:in `load'
27: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `<top (required)>'
26: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `tap'
25: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:10:in `block in <top (required)>'
24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
16: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
15: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `<top (required)>'
14: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `require_relative'
13: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `<top (required)>'
12: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `require'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:41:in `with_gems'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
2: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `require': cannot load such file -- msgpack/2.6/msgpack (LoadError)
30: from bin/rails:2:in `<main>'
29: from bin/rails:2:in `load'
28: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `<top (required)>'
27: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `tap'
26: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:10:in `block in <top (required)>'
25: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
16: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `<top (required)>'
15: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `require_relative'
14: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `<top (required)>'
13: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `require'
12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:41:in `with_gems'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:8:in `<top (required)>'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `require': dlsym(0x7fe15f3a38d0, Init_msgpack): symbol not found - /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle (LoadError)
30: from bin/rails:2:in `<main>'
29: from bin/rails:2:in `load'
28: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `<top (required)>'
27: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `tap'
26: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:10:in `block in <top (required)>'
25: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
23: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
16: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `<top (required)>'
15: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `require_relative'
14: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `<top (required)>'
13: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `require'
12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:40:in `with_gems'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:44:in `rescue in with_gems'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
2: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `<top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in `require': cannot load such file -- msgpack/2.6/msgpack (LoadError)
31: from bin/rails:2:in `<main>'
30: from bin/rails:2:in `load'
29: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `<top (required)>'
28: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:7:in `tap'
27: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/spring:10:in `block in <top (required)>'
26: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
25: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
24: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
23: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
17: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `<top (required)>'
16: from /Users/arpanabhishek/projects/coronafree-projects/myApp/bin/rails:4:in `require_relative'
15: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `<top (required)>'
14: from /Users/arpanabhishek/projects/coronafree-projects/myApp/config/boot.rb:4:in `require'
13: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `<top (required)>'
12: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in `require_relative'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `<top (required)>'
10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in `require_relative'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>'
8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in `require_relative'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:40:in `with_gems'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:44:in `rescue in with_gems'
4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:8:in `<top (required)>'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:11:in `require': dlsym(0x7fe15f2d35c0, Init_msgpack): symbol not found - /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack/msgpack.bundle (LoadError)
刚刚在我的新 M1 上被这个问题困扰了一整天。
通过以下方式解决了它:
在应用程序/实用程序下的 Finder 中查找终端。cmd+c然后cmd+ v"终端" 并将其重命名为 "TerminalRosetta"
右键单击,然后单击“获取信息”。然后选中“使用 Rosetta 打开”复选框。然后点击红色 x 并关闭该对话框。
从现在开始打开并使用“TerminalRosetta”
粘贴:
export PATH="$HOME/.rbenv/bin:$PATH"
进入您的终端并按回车键粘贴:
eval "$(rbenv init -)"
进入您的终端并按回车键像往常一样安装 ruby 和 rails。
如果您有任何其他问题 - 我使用了本教程: https ://www.youtube.com/watch?v=jT_SPPPhRBk
我遇到了同样的问题,发现您可以通过以下方式实现本机(非 Rosetta)解决方案
brew install ruby
(目前是 3.0.1) - 这使得 rbenv 能够成功构建其他版本,其中 Apple 的系统 ruby 导致失败brew install rbenv
,然后设置你的外壳export PKG_CONFIG_PATH="/opt/homebrew/opt/ruby/lib/pkgconfig"
在你之前:rbenv install 2.7.3
- 我在较低版本上没有成功bundle install
Gemfile.lock
,您可能需要争论 gem 版本 - 我必须更新一些才能让我的应用程序正常工作