tansengming/stripe-rails

Broken with Rails 5.2-rc1

renchap opened this issue · 3 comments

FYI, the gem is currently broken when using it with Rails 5.2-rc1:

/Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/coders/yaml_column.rb:24:in `load': undefined method `new' for Representable::JSON:Module (NoMethodError)
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/coders/yaml_column.rb:44:in `check_arity_of_constructor'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/coders/yaml_column.rb:13:in `initialize'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/store.rb:187:in `new'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/store.rb:187:in `initialize'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/store.rb:83:in `new'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activerecord-5.2.0.rc1/lib/active_record/store.rb:83:in `store'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activestorage-5.2.0.rc1/app/models/active_storage/blob.rb:22:in `<class:Blob>'
	from /Users/renchap/.rbenv/versions/2.4.3/lib/ruby/gems/2.4.0/gems/activestorage-5.2.0.rc1/app/models/active_storage/blob.rb:16:in `<main>'

This looks like to be an issue with representable, investigation here: trailblazer/representable#224

I mainly opened this issue for people to know this is expected.

I made a PR on Rails repo to fix it: rails/rails#31855

This will be fixed in the next 5.2 release. In the meantime, you can use the 5-2-stable branch from the Rails repo.

thank you @renchap ! Good to see that you're using @trailblazer .