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

generator is looking in the wrong place for templates #1

Open
martindemello opened this issue Mar 6, 2022 · 3 comments
Open

generator is looking in the wrong place for templates #1

martindemello opened this issue Mar 6, 2022 · 3 comments

Comments

@martindemello
Copy link

$ bin/rails g tailwind_views:install --devise -t erb
Could not find "scaffolds/tailwindcss/edit.html.tailwindcss" in any of your source paths. Your current source paths are: 
/home/mdemello/.asdf/installs/ruby/3.0.2/lib/ruby/gems/3.0.0/gems/tailwind_views_generator-0.0.3/lib/templates

looks like the -t argument is not getting stored in options - adding a p options in the install method give me:

{"skip_namespace"=>false, "skip_collision_check"=>false, "template_engine"=>:tailwindcss, "devise"=>true, "layout"=>false, "metatags"=>false, "pagination"=>false, "simpleform"=>false, "skip_javascript"=>false, "skip_turbolinks"=>false}
@tarellel
Copy link
Owner

tarellel commented Mar 6, 2022

I'm honestly curious, in your application what version of Rails you running this generator in?

I ask, because I'm unable to reproduce this and am able to run the generator in Rails 7.0, 6.1, and 6.0 with the command you supplied.
bin/rails g tailwind_views:install --devise -t erb

Ruby3.0.3/Rails 7.0.2 (I also tried 3.0.2 in which appears that you are running)
Ruby2.7/Rails 6.1
Ruby2.7/Rails6.0

Screen Shot 2022-03-06 at 8 50 28 AM

I'm wondering if this happens to be an issue caused by an older version of thor where aliases has issues, because my output for options appears to be valid.

Screen Shot 2022-03-06 at 8 57 18 AM

@martindemello
Copy link
Author

$ rails --version
Rails 7.0.2.2

$ gem list thor

*** LOCAL GEMS ***

thor (1.2.1)

i'll poke at it if you cannot reproduce.

@martindemello
Copy link
Author

it seems to be a conflict with tailwindcss-rails; if i start a new project without that the bug goes away.

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

2 participants