Skip to content

v2.0.31 Fails on ruby 2.7.x #286

Closed
@tonyjoblin

Description

@tonyjoblin

PR #280 replaces Gem::Platform#match to Gem::Platform#match_gem? This fixes deprecation warnings but breaks on ruby 2.7.? because match_gem? does not exist there (at least not on 2.7.3).

This causes errors like these:

bin/rails tailwindcss:watch
rails aborted!
NoMethodError: undefined method `match_gem?' for Gem::Platform:Class

Tasks: TOP => tailwindcss:watch

and

when running bin/rails s

ActionView::Template::Error (The asset "tailwind.css" is not present in the asset pipeline.
):
     5:     <meta name="viewport" content="width=device-width,initial-scale=1">
     6:     <%= csrf_meta_tags %>
     7:     <%= csp_meta_tag %>
     8:     <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
     9: 
    10:     <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
    11:     <%= javascript_importmap_tags %>
  
app/views/layouts/application.html.erb:8

Work around

Update your gemfile to fix tailwindcss-rails to version 2.0.30 and run bundle update.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions