Strange error in rails - missing helper

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

    Had the same problem on Ruby 2.2.0 and i only managed to fix it by changing the folder structure from

    /Users/xxx/Documents/Ruby/xxxx
    

    to

    /Users/xxx/Documents/ruby/xxxx
    

    So lower case the folder name

    0 讨论(0)
  • 2020-11-30 02:32

    I had the same problem, apparently related to dropbox, but not case sensitive as others have suggested.

    Following @Rob's answer, the output of [1] pry(main)>File.expand_path ("./") resulted in:

    /Users/xxxx/dropbox/xxxx
    

    and the output of ]$ pwd also resulted in:

    /Users/xxxx/dropbox/xxxx
    

    Following @Beengie's instructions, from my Users root directory, I did:

    mv Dropbox Dropbox1
    mv Dropbox1 Dropbox
    

    This solves the problem for me -- until I reboot, at which point I have to perform the operation again. I'm still looking for a permanent fix.

    0 讨论(0)
  • 2020-11-30 02:34

    For me, the folder 'sites' only needed to be renamed, not the entire directory.

    from my user root directory I did this...

    mv sites sites1
    mv sites1 sites
    
    0 讨论(0)
  • 2020-11-30 02:37

    I got the same error as above, but it was not due to a case issue. It ended up being due to a combination of things. I had two ruby version managers installed- rvm and rbenv- and I was using an old gem installer. I had to uninstall rvm (How can I remove RVM (Ruby Version Manager) from my system?) and reinstall rbenv (brew reinstall rbenv)and upgrade to the lastest version of ruby. Then I had to update rubygems (gem update --system). Then, reinstalled all gems and a reboot and everything was fixed.

    Essentially, my ruby manager was pointing to an old version of ruby and using an outdated version of the gem installer (2.2.0). You might be able to fix things with just an upgrade to rubygems.

    It took me a day and a half to get this resolved. Hopefully, this will save someone some time and frustration.

    0 讨论(0)
  • 2020-11-30 02:38

    in my case i was using windows. Using Git shell, i kept getting this error while trying to install the gem administrate from thoughtbot. The command that kept giving me the error,"AbstractController::Helpers::MissingHelperError", was:

    $ rails generate administrate:install
    

    I did not rename my folder's to lowercase as many answers have suggested. I instead used the window's cmd. It worked perfectly.

    0 讨论(0)
提交回复
热议问题