rails: Missing helper file helpers//Users/xxxx/Sites/xxxx/app/helpers/application_helper.rb_helper.rb
I had a very strange issues out of the blue today. Happens for every controller action; app server and console boot up fine.
It started happening without any changes, and rolling back to a previous commit didn’t fix it either. Reinstalling ruby and rails and all the rest of the gems didn’t fix it either.
Setup: OSX Yosemite, Ruby 2.2.0, Rails 4.1.9.
Missing helper file helpers//Users/xxxx/Sites/xxxx/app/helpers/application_helper.rb_helper.rb
I finally fixed it by renaming all directories (i.e. Sites
to sites
) in the apps path to lowercase (except /Users).
Full story here: http://stackoverflow.com/a/27966165/893510
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 126 (25 by maintainers)
Links to this issue
Commits related to this issue
- Use Dir.glob in find_root_with_flag to return correct case As of Ruby 2.2, Dir.glob returns matches with the correct case as opposed to in previous versions where the matches were returned with the c... — committed to rails/rails by pixeltrix 9 years ago
- Use Dir.glob in find_root_with_flag to return correct case As of Ruby 2.2, Dir.glob returns matches with the correct case as opposed to in previous versions where the matches were returned with the c... — committed to rails/rails by pixeltrix 9 years ago
- fix case sensitivity bug https://github.com/rails/rails/issues/18660 — committed to xn/rails by xn 8 years ago
This issue happened to me today using rails 5.2.3 and ruby 2.5.1 It never happened before in the app I’m working.
Stoping spring solved the problem Run on the command line:
$ spring stop
In Windows 10 - I was able to (finally) use Ruby on Rails after making sure the path I was using in my terminal matched case exactly with the actual path.
i.e.
C:\Users\Username\Desktop\filefolder...
versus neglecting capitalization (as I was doing)
C:\users\username\desktop\filefolder...
The new APFS is case-sensitive in macOS 10.13 beta2 and giving this bug for me.
helpers//users/username/github/repo_name/app/helpers/active_admin/views_helper.rb_helper.rb
/Users/username/Github/Repo-Name/app/helpers/active_admin/views_helper.rb
Not all-lowercase and changed - to _
Manually applying this patch fixed it for me https://github.com/rails/rails/pull/24821
$ spring stop
solved my problem. (Same version Ruby & Rails)I had this issue using rails 4.2.5.1 and ruby 2.2.4. When navigating using Git bash, if I navigated to the “Documents” folder using “documents”, I got the error. I corrected it by navigating using the correct capitalization of folder names. no other changes.
I tried everything and nothing worked except these simple instructions http://quick.as/yvyqsn7j
Just got this and changed “application_helper.rb” to “application_helper.rb_helper.rb” in my app/helpers folder and it works
I’m hitting this error as well on Rails 4.1.9 after switching to Ruby 2.2.0. This line is erroring (filename equals
application_helper
)The issue goes away when changing
/Users/dan/Projects/my_app
to/Users/dan/projects/my_app
. My guess is an issue with ruby-2.2.0, unrelated to Rails.Probably time to nuke this one.
For me this was a Mac OS X quirk. I recall that I created a rails project in a folder called
marketing/projname
then later renamedmarketing
toMarketing
. Everything worked fine when running the project in Docker but then one day I tried to run it natively and hit this bug. Here is my fix:This fixed the problem. It should have not effect but I believe Mac OS X for some reason remembers the original case that a folder was created with and regurgitates it on occasion.
This accounts for namespaces
Here’s on Linux:
I don’t understand why, but FNM_EXTGLOB is the way to go.
There are no upcases in Rails’ naming conventions, so this is an issue with folders outside of rails getting borked. Therefore, we only need to add the EXTGLOB flag where we could be getting those as results. It doesn’t seem to me that the Dir here needs it.
FWIW, this was a problem for me in ruby 2.3.0, but not with 2.3.1… nearly all the same dependency versions including rails. Also, “use a mac” is a super dumb suggestion for a bugfix.
You might read this SO. Some of the people seem to have been able to simply rename the directory w/o changing the case. http://stackoverflow.com/questions/27871726/strange-error-in-rails-missing-helper/27909917#27909917
On Fri, Mar 6, 2015 at 11:14 PM, Sam Becker notifications@github.com wrote:
I only changed the “sites” folder name then renamed it back and it work. I have seen people stating that they renamed the entire directory. It is not needed in my circumstance. Hope that helps.
mv sites sites1 mv sites1 sites