Home>

Since we are a beginner of the program, we may not be able to provide the necessary information, and we apologize for the inconvenience.

I'm building a rails development environment, but I'm getting an error when launching another local server with rails s.
I searched variously and installed all the necessary files, but it still doesn't work.

Missing compatible arch in here and there
/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/ I get msgpack.bundle (LoadError), but I'm having a lot of trouble because I don't understand the meaning of this.

ruby 3.0.0
Rails 6.1.0
Homebrew 2.7.1
I'm using rbenv 1.1.2.

If i know how to resolve the error, please help me.

I have pasted the message that appears when I run the rails s below.
Thank you.

Traceback (most recent call last):
29: from bin/rails: 2: in

' 28: from bin/rails: 2: inload'
27: from/Users/shouheismith/camplog/bin/spring: 5: in' 26: from/Users/shouheismith/camplog/bin/spring: 5: intap'
25: from/Users/shouheismith/camplog/bin/spring: 8: inblock in' 24: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:inrequire'
23: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:inrequire' 22: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in'
21: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:inload' 20: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/bin/spring:49:in'
19: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:inrun' 18: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:incall'
17: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:incall' 16: from /Library/Ruby/Gems/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:inload'
15: from/Users/shouheismith/camplog/bin/rails: 4: in' 14: from/Users/shouheismith/camplog/bin/rails: 4: inrequire_relative'
13: from /Users/shouheismith/camplog/config/boot.rb:4:in' 12: from /Users/shouheismith/camplog/config/boot.rb:4:inrequire'
11: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:in' 10: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/setup.rb:2:inrequire_relative'
9: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:in' 8: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap.rb:5:inrequire_relative'
7: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:in' 6: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache.rb:74:inrequire_relative'
5: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:in' 4: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/explicit_require.rb:41:inwith_gems'
3: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:inblock in' 2: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1/lib/bootsnap/load_path_cache/store.rb:4:inrequire'
1: from /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in' /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:inrequire': cannot load such file --msgpack/2.6/msgpack (LoadError)

  • Answer # 1

    /Library/Ruby/Gems/2.6.0/gems/msgpack-1.3.3/lib/msgpack.rb:9:in
    2: from /Library/Ruby/Gems/2.6.0/gems/bootsnap-1.5.1

    I should have installed ruby ​​in my home directory with rbenv,
    It looks like ruby ​​in/Library is enabled.

    You can't tell anything from the error message alone, so let's review the ruby ​​environment settings.

    My Mac has almost the same environment as you, but rails starts up without any problems.
    $ruby ​​-v
    ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin19]
    $rails -v
    Rails 6.1.0
    $rbenv -v
    rbenv 1.1.2
    $brew -v
    Homebrew 2.7.0-100-gda0d7ef