[WIP] Replace Comfortable Mexican Sofa with Comfortable Media Surfer Gem; address #737#885
Open
[WIP] Replace Comfortable Mexican Sofa with Comfortable Media Surfer Gem; address #737#885
Conversation
* Markdown not found error when cms:snippet interpreted in "ask-us" and "" page tests and when accessing web UI Process: * bin/rails railties:install:migrations (to get migration) * bin/rails db:migrate:status * bin/rails db:migrate
964b1d1 to
1b68816
Compare
jefferya
commented
Nov 7, 2025
Comment on lines
-44
to
-55
|
|
||
| ### | ||
| # Disable automatic column serialization into YAML. | ||
| # To keep the historic behavior, you can set it to `YAML`, however it is | ||
| # recommended to explicitly define the serialization method for each column | ||
| # rather than to rely on a global default. | ||
| ### | ||
| # Rails.application.config.active_record.default_column_serializer = nil | ||
| # comfortable_mexican_sofa v3.5 https://github.com/restarone/comfortable-mexican-sofa.git | ||
| # not updated for Rails 7.1 to specify serialization method for the | ||
| # Comfy::Cms::Fragment and Comfy::Cms::Revision models | ||
| Rails.application.config.active_record.default_column_serializer = YAML |
Contributor
Author
There was a problem hiding this comment.
the change to Comfortable Media Surfer means this workaround is no longer required.
e5d5484 to
aecfd4b
Compare
50f005b to
12d6542
Compare
jefferya
commented
Dec 4, 2025
Comment on lines
+49
to
+53
| - name: Compile CMS Engine assets | ||
| run: bundle exec rails comfy:compile_assets | ||
| env: | ||
| RAILS_ENV: test | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Required to install and build the CMS Engine's javascript and CSS. The new Gem doesn't include the vendor javascript libraries and bundles.
jefferya
commented
Dec 4, 2025
Comment on lines
+77
to
+81
| - name: Test - precompile Rails assets | ||
| run: bundle exec rails assets:precompile | ||
| env: | ||
| RAILS_ENV: test | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Add a test to see if assets:precompile works.
jefferya
commented
Dec 4, 2025
Comment on lines
+1
to
+9
| # frozen_string_literal: true | ||
|
|
||
| # This migration comes from comfortable_media_surfer_engine (originally 2) | ||
| # null: false added by rubocop, not in original migration | ||
| class AddMarkdownToSnippets < ActiveRecord::Migration[7.1] | ||
| def change | ||
| add_column :comfy_cms_snippets, :markdown, :boolean, default: false, null: false | ||
| end | ||
| end |
Contributor
Author
There was a problem hiding this comment.
DB migration for the new CSM Gem. PR includes a warning to highlight the need.
This was referenced Jan 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #737
Depends on PR #884, Rails 8.1 PR to be merged first.
npmwhich is used bybundle exec rails comfy:compile_assets.comfy:compile_assetsinstalls NPM modules and bundles JS/CSS for the CMS Engine Gem.Comfortable Mexican Sofa is no longer being supported. Comfortable Media Surfer Gem is a fork that is being actively updated. This PR is the replacement.
How to test in staging and prod; these pass in dev:
Todo:
./tmp/sprocketsand./tmp/cache). Resting local generates similar errors as GitHub action. The error:Resolution:
app/assets/javascript/comfy/vendorand assets:precompile used the path inlib/comfortable_mexican_sofa/engine.rbto obtain the assets.lib/tasks/comfy.rakeCMS task onto the assets:precompile taskRake::Task["assets:precompile"].enhance(["comfy:compile_assets"]).enhance(["comfy:compile_assets"])toRake::Task["assets:precompile"]yields missing assets or a esbulid version collision because the CMS Gem includes a JS version lock file (not best practice).comfy:compile_assetsas a separate task after codebase is available but before assets:precompile