Strange error in rails - missing helper

后端 未结 17 574
不思量自难忘°
不思量自难忘° 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:23

    The problem..

    For me the same issue with the error

     "missing helper file app/helpers/application_helper.rb_helper.rb"
    

    The app was located in a directory tree

    /Users/grantsayer/Documents/Work/recipes
    

    So on conducting the test to show the path, both from within the terminal and within the ruby environment I found the following:

    1. Ruby environment

    Grants-MacBook-Pro:Recipes grantsayer$ irb

    2.2.0 :001 >

    2.2.0 :002 > File.expand_path("./") => "/Users/grantsayer/Documents/Work/Recipes"

    2. Unix Terminal

    Grants-MacBook-Pro:Recipes grantsayer$ pwd /Users/grantsayer/Documents/Work/recipes

    At this stage running the rails server and navigating to http://localhost:3000 resulted in the error about a missing application helper. This error, as others have described, appears to be a bug within ruby causing case conversion on the file path.

    I solved the issue by renaming the recipes folder to Recipes so that the ruby environment check in irb matched the local filesystem.

提交回复
热议问题