rails: Rails 5.0.0beta3 cannot load such file -- listen

Steps to reproduce

Updated gemfile to beta3 ran bundle update rails ran rake rails:update started my app in dev mode

Expected behavior

Rails should start up

Actual behavior

Crashed /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:in `require’: cannot load such file – listen (LoadError)

System configuration

Rails version: 5.0.0.beta3

Ruby version: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

I commented out the block in activesupport-5.0.0.beta3/lib/active_support/evented_file_update_checker.rb:24 just so it runs, but seems to be causing the server to need to be restarted after any change, like in controllers or models.

Full stack trace

/home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:in require': cannot load such file -- listen (LoadError) from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:inblock in require’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:268:in load_dependency' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:inrequire’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/evented_file_update_checker.rb:24:in block in initialize' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/core_ext/kernel/reporting.rb:13:inblock in silence_warnings’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/core_ext/kernel/reporting.rb:26:in with_warnings' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/core_ext/kernel/reporting.rb:13:insilence_warnings’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/evented_file_update_checker.rb:24:in initialize' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/i18n_railtie.rb:59:innew’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/i18n_railtie.rb:59:in initialize_i18n' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/i18n_railtie.rb:15:inblock in class:Railtie’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/lazy_load_hooks.rb:36:in execute_hook' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/lazy_load_hooks.rb:45:inblock in run_load_hooks’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/lazy_load_hooks.rb:44:in each' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/lazy_load_hooks.rb:44:inrun_load_hooks’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/application/finisher.rb:62:in block in <module:Finisher>' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/initializable.rb:30:ininstance_exec’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/initializable.rb:30:in run' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/initializable.rb:55:inblock in run_initializers’ from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:228:in block in tsort_each' from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:350:inblock (2 levels) in each_strongly_connected_component’ from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:431:in each_strongly_connected_component_from' from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:349:inblock in each_strongly_connected_component’ from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:347:in each' from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:347:incall’ from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:347:in each_strongly_connected_component' from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:226:intsort_each’ from /home/sadinie/dev/ruby/lib64/ruby/2.3.0/tsort.rb:205:in tsort_each' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/initializable.rb:54:inrun_initializers’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/application.rb:350:in initialize!' from /home/sadinie/projects/jade-projects/jade/config/environment.rb:5:in<top (required)>’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:in require' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:inblock in require’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:268:in load_dependency' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/activesupport-5.0.0.beta3/lib/active_support/dependencies.rb:302:inrequire’ from /home/sadinie/projects/jade-projects/jade/config.ru:3:in block in <main>' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:55:ininstance_eval’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:55:in initialize' from /home/sadinie/projects/jade-projects/jade/config.ru:innew’ from /home/sadinie/projects/jade-projects/jade/config.ru:in <main>' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:49:ineval’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:49:in new_from_string' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/builder.rb:40:inparse_file’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/server.rb:318:in build_app_and_options_from_config' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/server.rb:218:inapp’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/server.rb:58:in app' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/rack-2.0.0.alpha/lib/rack/server.rb:353:inwrapped_app’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/server.rb:136:in log_to_stdout' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/server.rb:76:instart’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:90:in block in server' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:intap’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:85:in server' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands/commands_tasks.rb:49:inrun_command!’ from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/command.rb:20:in run' from /home/sadinie/dev/ruby/lib64/ruby/gems/2.3.0/gems/railties-5.0.0.beta3/lib/rails/commands.rb:18:in<top (required)>’ from /home/sadinie/projects/jade-projects/jade/bin/rails:4:in require' from /home/sadinie/projects/jade-projects/jade/bin/rails:4:in<top (required)>’ from -e:1:in load' from -e:1:in<main>’

Process finished with exit code 1

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 19 (4 by maintainers)

Commits related to this issue

Most upvoted comments

A temporary solution i found is to move it outside of development group.

As per your application you can either comment out the evented monitor in config/environments/development.rb to disable it, or add the listen gem to the Gemfile if you’d like to use the monitor.

As per the issue itself, going to close because we are talking about what to do in https://github.com/rails/rails/pull/24066.

Hello,

I am still getting issue like 00:45 deploy:assets:precompile 01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile 01 rake aborted! 01 LoadError: Could not load the ‘listen’ gem. Add gem 'listen' to the development group of your Gemfile


while I have added gem in my gemfile like group :development do

Access an IRB console on exception pages or by using <%= console %> anywhere in the code.

gem ‘web-console’ gem ‘listen’ end


Please suggest to me what should I do. I am using Rails 5 and ruby 2.3.1

I accidentally used rails_env=staging bundle exec rails c , but I resolved it by using RAILS_ENV=staging rails c

I reopened the issue, will investigate.

Same bug here. In production mode, shouldn’t need this gem