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

Trouble loading active_model/type/value in Rails 5.2.0.beta2 #54

Closed
matias-eduardo opened this issue Jan 6, 2018 · 1 comment
Closed

Comments

@matias-eduardo
Copy link

Issue: I'm getting this error when I try to load the logidze gem in Rails 5.2.0.beta2.

Error:

There was an error while trying to load the gem 'logidze'. (Bundler::GemRequireError)
Gem Load Error is: uninitialized constant ActiveModel::Type::Value

Where it happens: /lib/logidze/history/type.rb:2

What solved it for me:

ActiveSupport.on_load(:active_record) do
  require 'active_model/type/value'
end

Link: https://github.com/MatiasFMolinari/logidze/blob/df9e885078517b3107e817979be1be50d2c56c75/lib/logidze/history/type.rb#L2

Source:
I don't fully understand how the loading changed in this new rails version. I stumbled upon the solution on this commit: https://github.com/iaankrynauw/paranoia/commit/49b9e68ee79d8a8e5fa04add1e93b9d69ccf9315

@palkan
Copy link
Owner

palkan commented Jan 6, 2018

Thanks for the report!

Fixed by 5d593d1 and released as 0.6.1.

@palkan palkan closed this as completed Jan 6, 2018
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

2 participants