読者です 読者をやめる 読者になる 読者になる

みかづきメモ

学習したことのメモとか、日記とか、備忘録。

rails g でエラーが出た時

Ruby on Rails

rails g なんちゃら で叩いた際にエラーが出たり、
帰ってこなかった場合の対処法。


とりあえず、こんなエラー↓が出た場合、もしくはいつまでも帰ってこない場合、

/Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/watcher/abstract.rb:30:in `initialize': no implicit conversion of nil into String (TypeError)
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/watcher/abstract.rb:30:in `new'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/watcher/abstract.rb:30:in `block in add'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/watcher/abstract.rb:29:in `map'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/watcher/abstract.rb:29:in `add'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/watcher/polling.rb:20:in `add'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application.rb:102:in `rescue in preload'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application.rb:115:in `preload'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application.rb:143:in `serve'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application.rb:131:in `block in run'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application.rb:125:in `loop'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application.rb:125:in `run'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/spring-1.6.4/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mikazuki/.rbenv/versions/2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from -e:1:in `<main>'

だいたいどっかに文法ミスがあるので、直せば叩けます。