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:in
block 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:in
require’
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:in
block 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:in
silence_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:in
new’
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:in
block 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:in
block 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:in
run_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:in
instance_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:in
block 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:in
block (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:in
block 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:in
call’
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:in
tsort_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:in
run_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:in
block 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:in
require’
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:in
instance_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:in
new’
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:in
eval’
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:in
parse_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:in
app’
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:in
wrapped_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:in
start’
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:in
tap’
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:in
run_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
- Readded listen gem for new Rails 5 file watcher See https://github.com/rails/rails/issues/24063 — committed to Judahmeek/flickr-search by Judahmeek 8 years ago
- Moving 'listen' gem to global gems. See https://github.com/rails/rails/issues/24063. — committed to abelosorio/squire-backend by abelosorio 7 years ago
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 Gemfilewhile 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 usingRAILS_ENV=staging rails c
I reopened the issue, will investigate.
Same bug here. In production mode, shouldn’t need this gem