Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generator arguments do not work for engines #150

Closed
jamesw opened this issue Feb 23, 2022 · 2 comments
Closed

Generator arguments do not work for engines #150

jamesw opened this issue Feb 23, 2022 · 2 comments

Comments

@jamesw
Copy link

jamesw commented Feb 23, 2022

Rails 7.0,2,2 engine generated using
rails plugin new tailtest --mountable --full -d postgresql --css tailwind

Does nothing with tailwind at all,
So adding manually does not work either.
Running, as per guidance, bundle add tailwindcss-rails adds tailwind to the gemfile rather than the engines tailtest.gemspec
So after adding the dependency to the gemspec
spec.add_dependency "tailwindcss-rails", "~> 2.0"
and running bundle install does install the engine however the rest of the manual installation fails

then adding the require to lib/engine.rb

require "tailwindcss-rails"
module Tailtest
  class Engine < ::Rails::Engine
    isolate_namespace Tailtest
  end
end

then running the install process fails


rails tailwindcss:install
Resolving dependencies...
rails aborted!
Don't know how to build task 'tailwindcss:install' (See the list of available tasks with `rails --tasks`)
Did you mean?  app:tailwindcss:install

Obviously the app:tailwindcss:install command fails too.

So I am probably missing an initializer of some sort in then engine.rb file but no idea on what it should be so this needs documenting. I would be happy to update the documentation if I had the solution but it would be much better if the generator just worked.

@jamesw
Copy link
Author

jamesw commented Mar 2, 2022

Is there going to be a solution to this? Or should I just accept that this gem doesn't work and use tailwind CDN directly as I wouldn't know where to start on fixing this myself.

@flavorjones
Copy link
Member

Let's consolidate this conversation into one place: #355

@flavorjones flavorjones closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants