0
0

More than 3 years have passed since last update.

no suitable image found. Did find: (LoadError)が出た時の対処方

Posted at

rails s

Traceback (most recent call last):
        27: from bin/rails:3:in `<main>'
        26: from bin/rails:3:in `load'
        25: from /Users/yamabasic/bin/spring:15:in `<top (required)>'
        24: from /Users/yama/.rbenv/versions/2.6.4/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        23: from /Users/yama/.rbenv/versions/2.6.4/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        22: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
        21: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
        20: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
        19: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
        18: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
        17: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
        16: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
        15: from /Users/yamabasic/bin/rails:8:in `<top (required)>'
        14: from /Users/yamabasic/bin/rails:8:in `require_relative'
        13: from /Users/yamabasic/config/boot.rb:4:in `<top (required)>'
        12: from /Users/yamabasic/config/boot.rb:4:in `require'
        11: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/setup.rb:2:in `<top (required)>'
        10: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/setup.rb:2:in `require_relative'
         9: from /Users/yambasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap.rb:5:in `<top (required)>'
         8: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap.rb:5:in `require_relative'
         7: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache.rb:61:in `<top (required)>'
         6: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache.rb:61:in `require_relative'
         5: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
         4: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/explicit_require.rb:41:in `with_gems'
         3: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
         2: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/store.rb:4:in `require'
         1: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `<top (required)>'
/Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `require': dlopen(/Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle, 9): no suitable image found.  Did find: (LoadError)
        /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle: mach-o, but wrong architecture
        /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle: mach-o, but wrong architecture - /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle
        28: from bin/rails:3:in `<main>'
        27: from bin/rails:3:in `load'
        26: from /Users/yamabasic/bin/spring:15:in `<top (required)>'
        25: from /Users/yamag/.rbenv/versions/2.6.4/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        24: from /Users/yamag/.rbenv/versions/2.6.4/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        23: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `<top (required)>'
        22: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/binstub.rb:11:in `load'
        21: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/bin/spring:49:in `<top (required)>'
        20: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client.rb:30:in `run'
        19: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/command.rb:7:in `call'
        18: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `call'
        17: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/spring-2.1.1/lib/spring/client/rails.rb:28:in `load'
        16: from /Users/yamagibasic/bin/rails:8:in `<top (required)>'
        15: from /Users/yamabasic/bin/rails:8:in `require_relative'
        14: from /Users/yamabasic/config/boot.rb:4:in `<top (required)>'
        13: from /Users/yamabasic/config/boot.rb:4:in `require'
        12: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/setup.rb:2:in `<top (required)>'
        11: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/setup.rb:2:in `require_relative'
        10: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap.rb:5:in `<top (required)>'
         9: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap.rb:5:in `require_relative'
         8: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache.rb:61:in `<top (required)>'
         7: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache.rb:61:in `require_relative'
         6: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/store.rb:4:in `<top (required)>'
         5: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/explicit_require.rb:40:in `with_gems'
         4: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/explicit_require.rb:44:in `rescue in with_gems'
         3: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/store.rb:4:in `block in <top (required)>'
         2: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/load_path_cache/store.rb:4:in `require'
         1: from /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `<top (required)>'
/Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack.rb:8:in `require': dlopen(/Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle, 9): no suitable image found.  Did find: (LoadError)
        /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle: mach-o, but wrong architecture
        /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle: mach-o, but wrong architecture - /Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle
 dlopen(/Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle, 9): no suitable image found.  Did find: (LoadError)

ここに記載されているように

vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle

ここの部分を消去して
もう一度msgpackを入れ直す

bundle exec gem install msgpack

そしてbundle installをする
するとrailsコマンド使用できるようになる

もし解決しなかったらエラー文が出てくるので今度は同じ感じで消していきgemを入れてbundle install を実行を繰り返す

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0