-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the readme to include a step about autoload_paths #50
Comments
I used to have a note about this in the README but then pulled it out because I didn't think it was needed. I haven't had to add it for any recent Rails apps I've worked on, but maybe it's a change with Ruby 2.2.0? I'll dig into it more, thanks for reporting! |
I'm not able to recreate this issue win a new Rails application. Would it be possible for you to create an example app that demonstrates the issue? If not, maybe post your Gender enum class? Can you also confirm that the enum is in app/enums/gender.rb? |
Closing since I haven't received a response in over a month. |
I'm having the same problem, I've added enums folder to autoload_paths and now solved. Rails 4.2.0 |
Reopening since @sakirtemel reported the same issue. I haven't been able to recreate it, but maybe someone who's experiencing it might have some insight. |
I hit this issue using Rails 4.2.1 and Ruby 2.2.0p0. Adding enums to the autoload paths fixed it. |
I followed the steps in the readme to create an enum for Gender, however I kept getting the following error after updating my model:
NameError: uninitialized constant Gender
I ended up adding the following line to application.rb:
config.autoload_paths += %W(#{config.root}/app/enums)
For the record, I'm using Rails 4.1.6 and Ruby 2.2.0.
Should this step be in the Readme or is it assumed that we should know to update the paths?
The text was updated successfully, but these errors were encountered: