Skip to content

Commit

Permalink
Update Tailwind executable call for v3.0
Browse files Browse the repository at this point in the history
`solidus_starter_frontend` provides templates including the
`tailwindcss-rails` gem without any version constraints. So when 3.0 was
released this week, it broke CI runs for the Solidus repository.

It appears that the only breaking change is related to the `.executable`
call.

As of `tailwindcss-rails` `>= 3.0` the command for the executable was
extracted to a separate `tailwindcss-ruby` gem, which causes an error
in the rake tasks we generate for the `solidus_admin`.

The error this fixes is:

    NoMethodError: undefined method `executable' for Tailwindcss::Commands:Module

Co-authored-by: benjamin wil <[email protected]>
  • Loading branch information
forkata and benjaminwil committed Oct 17, 2024
1 parent c3fea3e commit 8a6f2cc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end

group :admin do
gem 'solidus_admin', path: 'admin', require: false
gem 'tailwindcss-rails', '~> 2.0', require: false
gem 'tailwindcss-rails', '~> 3.0', require: false
gem 'axe-core-rspec', '~> 4.8', require: false
gem 'axe-core-capybara', '~> 4.8', require: false
end
Expand Down
2 changes: 1 addition & 1 deletion admin/lib/solidus_admin/install_tailwindcss.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
namespace :solidus_admin do
namespace :tailwindcss do
root = Rails.root
tailwindcss = Tailwindcss::Commands.executable
tailwindcss = Tailwindcss::Ruby.executable
tailwindcss_command = [
tailwindcss,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
DummyApp::Application.root.join("app/assets/stylesheets/solidus_admin/application.tailwind.css")
)

tailwindcss = Tailwindcss::Commands.executable
tailwindcss = Tailwindcss::Ruby.executable

tailwindcss_command = [
tailwindcss,
Expand Down

0 comments on commit 8a6f2cc

Please sign in to comment.