Strange error in rails - missing helper

后端 未结 17 572
不思量自难忘°
不思量自难忘° 2020-11-30 01:46

I am not sure , but this might be associated with a crashed computer. After restarting (after the crash) I get a missing helper error where the helper name is wrong. Switc

17条回答
  •  有刺的猬
    2020-11-30 02:18

    The problem seems to have been introduced in the latest version of ruby, ruby 2.2.0.

    Try this experiment:

    in rails console/or irb:

    [1] pry(main)>File.expand_path ("./") 
    => "/users/xxxx/Sites/xxxx"
    

    and in the terminal window:

    ]$ pwd
    /users/xxxx/sites/xxxx
    

    See the different case? If you get that, then deep in the bowels of active support a regex goes south. One fix is to remove the "sites" directory and recreate. It might also work to rename the sites directory using the finder, as rename it to "foobar" and then back to "sites".

    hth.

    (from this page in Japan) http://translate.google.com/translate?hl=en&sl=ja&u=http://d.hatena.ne.jp/jiikko/20150108&prev=search

    And when I was debugging this with another person, it was enough to have a mixed case directory name in the path. We renamed it to 'farknerd' and then back the original, except all lower case, and it worked.

提交回复
热议问题