-
Notifications
You must be signed in to change notification settings - Fork 185
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
v4: tailwindcss:watch not working after using the upgrade tool #475
Comments
@drale2k I'm sorry, I still cannot reproduce what you're seeing, and I need more information from you about your setup in order to reproduce this. As an example of the type of information I'm looking for ... I've tried reproducing this upgrading the gem from tailwindcss-rails v3.3.0 and tailwindcss-ruby v3.4.17 to tailwindcss-rails a0eaafa and tailwindcss-ruby v4.0.0. I've done this with both a Rails 7.2.2.1 app and a Rails 8.0.1 app. I have a script that is run in CI to set up the upgrade scenario, which you can run on your machine if you like: In the Rails 8 app, here's the output from running
Note that each of those "Done in ..." lines is me making a local edit to Same output for the Rails 7.2.2.1 app:
Can you please help me understand how to reproduce what you're seeing? |
I've also tried to reproduce this upgrading to tailwindcss-rails v4.0.0.rc1 running the same script as above. It works fine for me. The contents of my
|
Thanks for taking a look. I will gather together notes of my upgrade version path and post them. Can i see your This is my #!/usr/bin/env sh
if ! gem list foreman -i --silent; then
echo "Installing foreman..."
gem install foreman
fi
# Default to port 3000 if not specified
export PORT="${PORT:-3000}"
# Let the debug gem allow remote connections,
# but avoid loading until `debugger` is called
export RUBY_DEBUG_OPEN="true"
export RUBY_DEBUG_LAZY="true"
exec foreman start -f Procfile.dev "$@"
My
How does running |
You can run the script I pointed to above to reproduce my setup exactly, if you want. My bin/dev is stock:
My Procfile is stock:
Running If you've narrowed things down to whether your config file is included or not, what's in your // const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
content: [
'./public/*.html',
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
'./app/views/**/*.{erb,haml,html,slim}'
],
theme: {
extend: {
fontFamily: {
// sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
},
},
plugins: [
// require('@tailwindcss/forms'),
// require('@tailwindcss/typography'),
// require('@tailwindcss/container-queries'),
]
} |
I got it.. thanks to your posted It all makes sense now. I load the plugins via the new After commenting out the listed plugins as you did, it works. Thanks a lot |
Actually what i wrote is wrong. I do have them installed but i dod so with npm, globally. That's the only way |
Quick correction on this one: I deployed to prod, only using the @plugin directive - without any package manager and the plugins work just fine. I did not need to install anything using a JS package manager. I only use importmaps and this gem, nothing else. |
Thanks for the notes, @drale2k. I'm going to close this, since I don't think there's anything we can do in this gem except document these behaviors in the README which I think @EricGusmao has offered to do. But if you have more questions, please ask here or in the Discussions thread. 🙏 |
Thanks for the help, all working now |
As mentioned in #450 (comment), the
tailwindcss:watch
command is no longer working for me after the upgrade to v4. The cause is having the@config
directive present in theapplication.tailwind.css
file used for backwards compatibility - as mentioned here #450 (reply in thread)Everything seems to work after i removed it but i believe the upgrade script automatically added both lines to
application.tailwind.css
:I am not sure yet if removing the old config has any side effects and how it affects the plugins loaded through the config.
The text was updated successfully, but these errors were encountered: