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

Compatibility with Rails 7 #1109

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Conversation

hayesr
Copy link
Contributor

@hayesr hayesr commented Jan 18, 2022

Description

This change addresses an undefined method error that happens at boot time when the bourbon gem is in the Gemfile. After this change Rails will boot and the files under /core are available to the app.

The problem is with line 6 in lib/bourbon.rb. My guess is that assets is not available on Rails::Engine::Configuration due to boot changes related to the Zeitwerk transition, and/or related to Sprockets no longer being a dependency.

@jonathandwang
Copy link

Currently trying to upgrade to Rails 7 but having compatibility issues due to this, it would be awesome if this could be merged or an update given on this issue.

3b7 added a commit to shirtspace/neat that referenced this pull request Jan 6, 2023
taking inspiration from thoughtbot/bourbon#1109

while efforst are underway to remove neat dependency in the 'shirtspace'
repo the upgrade for rails 7 is looming. this patch to our forked version
should allow us to be be able to upgrade to rails 7 without having to wait
for a complete removal of the neat gem
@cpytel
Copy link
Member

cpytel commented Jan 13, 2023

If someone can help by confirming this change still works when running with Rails 6, we can get it merged. Thanks.

@saturnflyer
Copy link
Collaborator

This style of initializing an engine has at least been around since rails 5.1 https://api.rubyonrails.org/v5.1/classes/Rails/Engine.html#class-Rails::Engine-label-Configuration

I think this is good to go

@saturnflyer saturnflyer merged commit 8d9e435 into thoughtbot:main Jan 20, 2023
@hayesr hayesr deleted the rails7_compat branch March 14, 2023 15:07
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

Successfully merging this pull request may close these issues.

None yet

4 participants