Ruby on Rails console is hanging when loading

后端 未结 5 2013
梦如初夏
梦如初夏 2020-12-04 10:01

For whatever reason, the Ruby on Rails console refuses to start; it just hangs. I haven\'t made any changes to my code, and other projects using the same version of Ruby and

5条回答
  •  借酒劲吻你
    2020-12-04 10:38

    Changing the following method in the lib/application.rb file of the spring gem (path can be shown with the gem info spring command) like this does the trick:

    def eager_preload
          with_pty do
            # we can't see stderr and there could be issues when it's overflown
            # see https://github.com/rails/spring/issues/396
            STDERR.reopen("/dev/null")
            preload
          end
    end
    

    see https://github.com/markiz/spring/commit/5f3ab734fc45d541aaaccb05b59cd95aa49fe8ef

提交回复
热议问题