Skip to content
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

could not use this gem without rails exists, Even though have active_record installed #5

Open
jhjguxin opened this issue Jul 28, 2014 · 2 comments

Comments

@jhjguxin
Copy link
Contributor

error trace

gems/enum_help-0.0.9/lib/enum_help/railtie.rb:2:in `<module:EnumHelp>': uninitialized constant EnumHelp::Rails (NameError)
@zmbacker
Copy link
Owner

@jhjguxin

我需要先了解一下使用场景。
请问是否使用了 activesupport ?
因为这个插件需要使用 I18n 配合。
然后我尝试修改一下。

@tobypinder
Copy link
Contributor

I couldn't get our Rails engines to work in testing environments with this gem as they aren't "proper" Rails apps. My solution was to add ActiveRecord::Base.send :extend, EnumHelp::I18n from the Railtie into it's own initializer. This might help anyone trying to run enum_help outside of Rails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants