Hey y'all! Getting this on Rails 7.1.0-alpha: `/h...
# support
t
Hey y'all! Getting this on Rails 7.1.0-alpha:
/home/myuser/.bundle/ruby/3.1/bundler/gems/rails-5cbf61502c69/activerecord/lib/active_record/attribute_methods/serialization.rb:207:in 'serialize': missing keyword: :coder If no default coder is configured, a coder must be provided to serialize. (ArgumentError)
`from /home/myuser/myapp/vendor/solidus/core/lib/spree/preferences/persistable.rb10in
block in <module:Persistable>'
persistable.rb
looks like this:
Copy code
module Spree
  module Preferences
    module Persistable
      extend ActiveSupport::Concern

      included do
        include Spree::Preferences::Preferable
        serialize :preferences, Hash
        after_initialize :initialize_preference_defaults
      end

      private

      def initialize_preference_defaults
        if has_attribute?(:preferences)
          self.preferences = default_preferences.merge(preferences)
        end
      end
    end
  end
end
Any idea what to do?
j
We don't have Rails 7.1 support yet, so I'd recommend you downgrade to Rails 7.0.
Alternatively, if you're asking if someone has any insight into what has changed to cause this error because you want to work on that support, I do not. ๐Ÿ˜…
t
Sorry boss, I'm afraid I need 7.1 due to Falcon ๐Ÿ˜ž I'm cool with being the test rabbit! Probably not the right way, but this seems to have taken care of the problem for now:
Copy code
core/app/models/spree/preference.rb
-  serialize :value
+  serialize :value, YAML

core/app/models/spree/return_item.rb
-    serialize :acceptance_status_errors
+    serialize :acceptance_status_errors, YAML
Now that I got Falcon booting, next up on the menu is a StimulusReflex shopping cart ๐Ÿ™
k
I canโ€™t find any
7.1.0-alpha
released yet. Are you working with the rails main branch from GitHub?