LoginSignup
0
0

More than 1 year has passed since last update.

cannot load such file -- listen (LoadError)によってrails sできない!

Last updated at Posted at 2023-02-14

概要

rails sでサーバーを起動しようとしたのですが、できませんでした。
解決までの道のりをメモ的に記します。初心者向けですので、詳しい方で「もっと良い解決法がある」「その方法はダメだ」ということがあればご指摘ください。

起こったこと

ターミナル
ec2-user:~/environment/アプリ名 (main) $ rails s
=> Booting Puma
=> Rails 7.0.4 application starting in development 
=> Run `bin/rails server --help` for more startup options
Exiting
/home/ec2-user/.rvm/gems/ruby-3.1.2/gems/bootsnap-1.12.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require': cannot load such file -- listen (LoadError)
~
~
~

解決法

「nulfasのブログ」様の【Rails】「Could not load the ‘listen’ gem. Add gem ‘listen’ to the development group of your Gemfile (LoadError)」 が出た時を参考にさせていただきました。

config.environment.development.rb

  config.file_watcher = ActiveSupport::EventedFileUpdateChecker
  #↑コメントアウトする

end

これで解決しました!

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