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

Rails 7.0.1 and Ruby 3.1.0 #3509

Open
mountaindog opened this issue Jan 21, 2022 · 4 comments
Open

Rails 7.0.1 and Ruby 3.1.0 #3509

mountaindog opened this issue Jan 21, 2022 · 4 comments

Comments

@mountaindog
Copy link

Not necessary an issue, more wondering if anyone has tested Refinery with the latest versions of Rails using importmaps, VIPS and Ruby? Thinking about implementing this CMS into a new Rails project. Love to hear any pitfalls / gotchas, if any.

@evenreven
Copy link
Contributor

evenreven commented Jan 21, 2022

The major pitfall as of now is that it's incompatible in the gemspec, meaning Refinery won't even bundle install with Rails 7, much less work. Not even the master branch, and as far as I know there's not a draft PR to try to make it work either. Not meaning this as a slight on the devs, who are very nice and smart people. It's just that Refinery development isn't happening at a rapid pace these days.

Also, no VIPS. Refinery depends on Dragonfly, which again depends on Imagemagick. In theory, Dragonfly could use Vips; in practice it doesn't (there's an extension to make it work that lacks half the features of the IM version).

Also, be aware that not all extensions support the same Rails versions. The page-images extension (which I built my site around) is stuck on Rails 5.1, for instance, meaning it can hold the whole rest of the app back.

I'm not a Refinery developer, so I don't know if there's a time frame for supporting Rails 7. There's a lot of moving parts to a CMS, not even Alchemy CMS (which has rapid development) supports Rails 7 yet.

A good thing is that since Refinery never tried to migrate to Webpack, they'll probably have a smoother upgrade since Webpacker has been sunset now. :)

Not trying to dissuade you from using Refinery, which still has a lot of good things going for it. But you shouldn't expect being on the newest Rails.

@mountaindog
Copy link
Author

Thanks @evenreven! Appreciate it.

@Azzawie
Copy link

Azzawie commented Sep 23, 2024

@mountaindog did you find any alternative to the Refinery? I'm also in the same position where I wanna use it with rails 7+

@anitagraham
Copy link
Contributor

anitagraham commented Sep 25, 2024

I am working on such a version, but it is a long road. Comments welcome.
(ActiveStorage, ActionText, Stimulus, Turbo?, importmap-rails, esbuild, etc)

I am currently on Rails 7.1.3.4 and ruby 3.2.4

Refinery extensions

Core: works - but subject to change as required by non-core modules, or by Stimulus. Also a cleanup of old files.

Images: in progress. Using Active Storage/libvips/directupload to upload images - and I am currently focused integrating that back into Refinery. (Also using Dropzone.js)

Pages: Works but needs attention to full functionality with images and page part editing. Also styling.
Uses ActiveText as a page part editor, but to be honest, I have probably written and saved just one or two page parts.
I need to get the management of page-parts under control.

Resources: virtually untouched, but should really work as it a simpler version of Images.

Required Refinery Gems

Authentication-Devise: I can login and logout, and create a new user. Looks OK, but there may be more functionality to test.

Acts-as-indexed:
I've made mods for Ruby/Rails upgrades and it still loads. I noted somewhere in Github a recommendation that users used something better for their search engine.

I18n: same state as acts-as-indexed, loads, seems to work, but not fully used or tested. yet.

Javascript/Stylesheets

Javascript:
ES6 or later. Using Stimulus, and will probs add Turbo as well.
I use importmaps and I am gradually adding Stimulus controllers to replace the current js.
Using Stimulus requires changes to the HTML markup, so that is gradually changing.

Stylesheets:
Not using Tailwind or any other framework.
All is in SCSS, but almost all using CSS custom variables. Build is done by esbuild.

Stylesheets and JS Modules are built for and loaded by each Refinery plugin. Refinery.core is always loaded.

The screenshot below show s refinery/pages . The js and stylesheets are loaded with the html below.
The importmap is about 100 lines long, partly because I have lots of small js files, which may well be unified later.

<script type="module">import "refinery.core"</script>
<script type="module">import "refinery.pages"</script>
<link rel="stylesheet" href="/assets/refinery.core.index-8f30909b.css">
<link rel="stylesheet" href="/assets/refinery.pages.index-084357ce.css">

FWIW, here is a screenshot of 'refinery/pages'. The yellow cross icons to the right of each page allow dragging and dropping for page reordering. Seems to work. The last page used to be 'Page with body parts'.

Screenshot 2024-09-25 at 10 16 26 AM

@anitagraham anitagraham reopened this Sep 25, 2024
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

4 participants