Strange error in rails - missing helper

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

    This happened to me after I updated Rubymine. All i did was changing the folder of my website from HelloWord to helloword. Removed capital and other symbol and it works fine.

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

    I'm running 2.2.0 and did as @Rob said and found that it was my the apps root directory that had the problem since it had a capitalized name. I'm also not keeping the app in the Sites directory but another sibling directory.

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

    I had a dash in one of my directories: the-mission which was also causing an error. In addition to making sure all of your parent directories are lowercase (including changing Desktop to desktop), also make sure the only characters in your directory names are letters.

    0 讨论(0)
  • Mine also was a case issue. I was initially in the folder C:\users\pxxx\projects\odot which was throwing the above error. When I changed to C:\Users\Pxxx\projects\odot it seemed to work

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

    I got this error after creating a helpers directory for the first time.

    The problem went away after running spring stop and trying again.

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

    I was having this problem after generating a new controller using the command

    rails generate controller Microposts

    It was breaking my entire test suite.

    If I reversed the command using: rails destroy controller Microposts

    it would go green again.

    I managed to fix the problem by running: gem update

    After destroying the controller and then generating it again once the gems had been updated.

    Oddly enough I got this message when regenerating:

    "The name 'MicropostsHelper' is either already used in your application or reserved by Ruby on Rails. Please choose an alternative or use --force to skip this check and run this generator again."

    Which was not appearing before I updated my gems, and no longer have any issues.

    I use RVM and used this to make sure I was running the command on the same version of Ruby my app was using.

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