LoginSignup
rikuto_hr
@rikuto_hr (yama rikuto)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

no suitable image found. Did find: (LoadError)

解決したいこと

railsコマンド使用時に下記のエラーが発生します。

発生している問題・エラー

yama$ 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

または、問題・エラーが起きている画像をここにドラッグアンドドロップ

該当するソースコード


自分で試したこと

ここに問題・エラーに対して試したことを記載してください。
no suitable image found. Did find: (LoadError)と書いてあったので調べてみると
https://teratail.com/questions/320593
こちらが出ました。それでこちらではmacを出荷時の時に戻したら治ったらしいのですが、
これ以外に方法ってないのでしょうか?
一度前にgemのbootstrapのバージョンを変えたらエラーが消えたのですが何も変えていないのに再び出ました。
予想だとgem関係がおかしいのかなと思っていますが、M1macのエラーだから仕方ないとしていいのでしょうか?

0

2Answer

https://github.com/msgpack/msgpack-ruby/issues/215 で同様の報告がされています。それによると msgpack.bundle を削除すれば直るようです。

/Users/yamabasic/vendor/bundle/ruby/2.6.0/gems/msgpack-1.4.2/lib/msgpack/msgpack.bundle を削除してみてください。 rm で消すよりゴミ箱に入れてうまくいかなかったとき元に戻せるようにしたほうがいいです。

2

Comments

  1. @rikuto_hr

    Questioner
    msgpack/msgpack.bundle を削除しましたら、
    ```
    no suitable image found. Did find: (LoadError)
    /Users/yamabasic/vendor/bundle/ruby/2.6.0/extensions/-darwin-20/2.6.0/msgpack-1.4.2/msgpack/msgpack.bundle: mach-o, but wrong architecture
    /Users/yamabasic/vendor/bundle/ruby/2.6.0/extensions/-darwin-20/2.6.0/msgpack-1.4.2/msgpack/msgpack.bundle: mach-o, but wrong architecture - /Users/yamabasic/vendor/bundle/ruby/2.6.0/extensions/-darwin-20/2.6.0/msgpack-1.4.2/msgpack/msgpack.bundle
    ```
    と出たのでまた/extensions/-darwin-20/2.6.0/msgpack-1.4.2/msgpack/msgpack.bundleを消したのですが、
    ```
    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': cannot load such file -- msgpack/msgpack (LoadError)
    ```
    ロードエラーになってしまいました
  2. @rikuto_hr

    Questioner
    ひたすら消してgemを入れ直して、違うのが出てきたら消しての繰り返したら治りました!!
    ありがどうございました!

私も同じようなエラーに遭いましたが、rubyを再インストールしたら治りました。

大変でしたが...

0

Your answer might help someone💌