B
B
Bogdan2018-08-31 16:53:46
Ruby on Rails
Bogdan, 2018-08-31 16:53:46

How to disable gem listen in Rails 5.2.1?

Hello, tell me please. I ran into a problem that Rails in docker does not load file changes, it was found that this is through gem listen . How can it be removed or disabled?
If I comment on the line with it in the Gemfile, then I get this error

Mistake

/app/gems/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': Could not load the 'listen' gem. Add `gem 'listen'` to the development group of your Gemfile (LoadError)
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `block in require'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:253:in `load_dependency'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/dependencies.rb:287:in `require'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/evented_file_update_checker.rb:61:in `block in initialize'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/core_ext/kernel/reporting.rb:15:in `block in silence_warnings'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/core_ext/kernel/reporting.rb:28:in `with_warnings'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/core_ext/kernel/reporting.rb:15:in `silence_warnings'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/evented_file_update_checker.rb:59:in `initialize'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/i18n_railtie.rb:61:in `new'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/i18n_railtie.rb:61:in `initialize_i18n'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/i18n_railtie.rb:19:in `block in '
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:69:in `block in execute_hook'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_control'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `each'
app_1 | from /app/gems/gems/activesupport-5.2.1/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
app_1 | from /app/gems/gems/railties-5.2.1/lib/rails/application/finisher.rb:75:in `block in '
app_1 | from /app/gems/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `instance_exec'
app_1 | from /app/gems/gems/railties-5.2.1/lib/rails/initializable.rb:32:in `run'

It is also possible to create a project rails new app --skip-active-record --api then this gem is not registered, but this is not an option, because I need Active Record

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
oh_shi, 2018-08-31
@bogdan_uman

removed from the Gemfile, you also need to delete the line in config/environments/development.rb

config.file_watcher = ActiveSupport::EventedFileUpdateChecker

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question