Skip to content

error tailwindcss [not found] when generating a controller #77

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

Closed
yshmarov opened this issue Sep 30, 2021 · 11 comments
Closed

error tailwindcss [not found] when generating a controller #77

yshmarov opened this issue Sep 30, 2021 · 11 comments

Comments

@yshmarov
Copy link
Contributor

yshmarov commented Sep 30, 2021

Works well for scaffolding, but breaks when generating views for just a controller

My setup:

rubRails 7.0.0.alpha2
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]

image

@yshmarov
Copy link
Contributor Author

yshmarov commented Sep 30, 2021

Also, when you hover on submit, mouse cursor does not change to pointer

2

photo_2021-09-30_21-34-00

@yshmarov
Copy link
Contributor Author

Also it looks like <h1> tags don't work... other tags do

@stuzero
Copy link

stuzero commented Sep 30, 2021

I have the same error error tailwindcss [not found] when generating a controller - the view is never created

ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux]
Rails 6.1.4.1

@rmontgomery429
Copy link

rmontgomery429 commented Oct 1, 2021

I am getting this error when using view_component generators. I noticed that @dixpac just pushed a fix that was just merged an hour ago and so I tried updating to main but... I'm still seeing the error.

I created a bare minimum reproduction rails app with only the tailwindcss-rails and view_component gems.

gem "view_component", "~> 2.40", require: "view_component/engine"

gem "tailwindcss-rails", github: "rails/tailwindcss-rails", branch: "main"

To reproduce the issue in that repo you just need to:

  1. bundle
  2. yarn
  3. rails g component Example

You'll get error tailwindcss [not found].

@phanhaiquang
Copy link

phanhaiquang commented Oct 11, 2021

I also got this issue when generating a "resource"

  create    app/controllers/<resource>_controller.rb
   error    tailwindcss [not found]

I am using 7.0.0.alpha2
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
tailwindcss-rails 0.5.0

Scaffold works fine.

@dixpac
Copy link
Contributor

dixpac commented Oct 13, 2021

@phanhaiquang can you create demo app that reproduces issue, since resource generators works for me 🙏🏼
Screenshot 2021-10-13 at 15 32 49

@roel4d
Copy link

roel4d commented Oct 14, 2021

Generating a resource or controller works for me, but generating a viewcomponent has this error. I'm also using rails 7 alpha 2 and tailwindcss-rails 0.5.1. I'm using Ruby 3 (you have 2.7)

I created my rails 7 project with rails new demo --css=tailwind

@phanhaiquang
Copy link

phanhaiquang commented Oct 15, 2021

@dixpac I am sorry for late. I tried to reproduce this issue by a new project, and it does not happen. Then, I go to my project and retry, error happen. So that I need to step by step compare 2 projects. I will let you know when I found the different that causes this. This might take a while.

My current project that this issue happens
image

New project does not make this error
image

@dixpac
Copy link
Contributor

dixpac commented Oct 15, 2021

@phanhaiquang try with tailwindcss-rails 0.5.1 version, on the webapp

@dixpac
Copy link
Contributor

dixpac commented Oct 15, 2021

@roelandmoors @rmontgomery429 thanks.
I've opened PR on the view_component to fix this, but lets see , if they don't accept it I'll find another way

@phanhaiquang
Copy link

@dixpac I use 0.5.1 version and this issue was resolved !
Thank you so much !

@dhh dhh closed this as completed Oct 18, 2021
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

7 participants