質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

2055閲覧

rails sで No such file or directoryのエラー

ts21

総合スコア32

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2019/11/26 18:15

前提・実現したいこと

rails sでサーバーを立ち上げようとしてエラーが出てしまいました。

エラーメッセージ

tsudashouki@ts21 grainplatform-api % rails s => Booting Puma => Rails 5.2.3 application starting in development => Run `rails server -h` for more startup options Exiting Traceback (most recent call last): 76: from bin/rails:4:in `<main>' 75: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 74: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 73: from /Users/tsi/sample-api/vendor/bundle/ruby/2.6.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 72: from /Users/tsi/sample-api/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require' 71: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_ with_bootsnap_lfi' 70: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register' 69: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi' 68: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require' 67: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<main>' 66: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke' 65: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform' 64: from /Users/ts/samplem-api/vendor/bundle/ruby/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 63: from /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/thor- ・ ・ ・ /Users/ts/sample-api/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/compile_cache/yaml.rb:50:in `fetch': No such file or directory - bs_fetch:o pen_current_file:open (Errno::ENOENT)

bootsnapが何かしらの原因であるのかと考えています。
解決策を教えていただくと助かります。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

これですかね?bootsnapというより、それが保持しているキャッシュが悪さをしているはずです。
bootsnapのせいでRails5.2とかが動かない人へ

投稿2019/11/27 01:24

FKM

総合スコア3608

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

ts21

2019/11/27 01:51

記事の方を参照しました。 同じようにcacheを削除しても同じエラーを吐いてしまいます。
FKM

2019/11/27 02:25

Gemfile内のbootsnapのバージョンはどうなっていますか?
ts21

2019/11/27 03:40

`gem 'bootsnap', '>= 1.1.0', require: false`となっています
FKM

2019/11/27 03:59

ここのページが参考になりませんか? http://techblog.housmart.co.jp/2017/12/11/ruby-gem-bootsnap/ Rails5.2からバージョン指定が不要であることとrequireコマンドのことも試されてみては。 ひょっとしたら不適合なバージョンが入ってしまっているのかも知れません。
ts21

2019/11/27 07:04

このページを参考にいろいろ試した結果、gemを入れ直したところうまくいきました!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問