我在启动rails服务器时遇到了这个问题。
ruby:2.3.1
rails:5.0.0.1
在windows linux子系统中使用ubuntu 14.04。提前谢谢。 /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/watcher.rb:74:in `initialize': Invalid argument - Failed to watch "/home/devs/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/locale": the given event mask contains no legal events; or fd is not an inotify file descriptor. (Errno::EINVAL)
from /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `new'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:190:in `watch'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/rb-inotify-0.9.7/lib/rb-inotify/notifier.rb:204:in `watch'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/linux.rb:32:in `_configure'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:45:in `block in configure'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:40:in `each'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:40:in `configure'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/adapter/base.rb:63:in `start'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/backend.rb:28:in `start'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/listener.rb:67:in `block in <class:Listener>'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:120:in `instance_eval'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:120:in `call'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/fsm.rb:57:in `transition'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/listen-3.0.8/lib/listen/listener.rb:90:in `start'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/evented_file_update_checker.rb:90:in `boot!'
from /home/devs/.rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.1/lib/active_support/evented_file_update_checker.rb:61:in `initialize'
答案 0 :(得分:10)
转到config / environments / development.rb并注释掉The Line config.file_watcher = ActiveSupport :: EventedFileUpdateChecker ,运行bundle exec rails后。