-
Notifications
You must be signed in to change notification settings - Fork 189
Upgrading tailwindcss-rails from 2.0.29 to 2.0.30 broke web-console #275
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
Comments
Thanks for the report and I'm sorry that you've run into a problem. I've created a new Rails project and added rspec to it and this works without a problem. Can also not reproduce in any of our projects that are using tailwindcss-rails. Will try to reproduce with your repo next. |
hey @pupeno, I dug a bit deeper and haven't found out the root issue, but can reproduce with your repo. Doing We're not the first gem affected by this, see this issue on dotenv-rails: bkeepers/dotenv#395 (comment) However, I've tried this with several of our projects that use tailwindcss-rails and rspec and none of the projects showed this behaviour, so it must be something within Sorry that I have no clear fix, but hope this helps a least a little bit. |
Oh wow, this one is a bit tricky than I expected. One of the issues for me is that the bug is being triggered when I run the tests from RubyMine, where I might not have as much control on how they are run, but I'll investigate. Thank you so much for all the work here. I appreciate it :) |
I'm having the same issue. What I've found:
If I raise in the
In the gem, The same happens for every gem in the development group. So I suspect that all development gems are loaded when invoking a rake task, irrelevant of the current Rails environment. That's why it's probably not a tailwindcss-rails or web-console issue, but rather might be an issue with railties ( |
Where should this bug be reported then, do you know? |
I added a raise to
|
|
@pupeno Further findings after some more debugging:
@pupeno Could you try the following and let us know if that fixes the issue for you as well? bundle open tailwindcss-rails
# Navigate to lib/tasks/build.rake Replace the last if Rake::Task.task_defined?("test:prepare")
Rake::Task["test:prepare"].enhance do
Rake::Task['tailwindcss:build'].execute
end
elsif Rake::Task.task_defined?("spec:prepare")
Rake::Task["spec:prepare"].enhance do
Rake::Task['tailwindcss:build'].execute
end
elsif Rake::Task.task_defined?("db:test:prepare")
Rake::Task["db:test:prepare"].enhance(["tailwindcss:build"])
end Then run |
@phylor wow, yes, that change fixes it for me. |
2.0.24 is the first failing release for me. More specifically, the following change causes the exception:
Before, Rails wasn't loaded: task :watch do |_, args| With that change, I also just noticed that I get an exception when invoking the rspec generators. Instead of calling the generator, it seems to reload Rails again causing a pending migration exception (with and without the above patch). I can't reproduce that issue in a clean project, so there must be something wrong in the project. This also happens after removing @pupeno Do you have that same problem as well? Do your generators work fine? If so, this is probably an unrelated issue. bin/rails g model Car
|
No, I don't seem to be having that issue:
|
I'd like someone on this issue who understands what's going on, and can reproduce it, to submit a pull request, please. @phylor? |
@flavorjones Unfortunately, I don't fully understand the issue. I bisected the failing project again and I observed the following:
Workarounds I found:
Exception on failing status
Looking at the changes between |
Closing. If someone can help me reproduce and diagnose this, I'm happy to reopen. |
For me the following commit in rspec-rails solves the issue: rspec/rspec-rails@8acac38 That is:
|
I'm not sure if this is a problem in
web-console
or intailwindcss-rails
. I'm cross-posting it here for awareness in case it'stailwindcss-rails
. I will continue debugging the problem and create a PR if I find what it is, but if you know anything, since you are more familiar with the code, please let me know. All guidance is welcome.Full details of the issue are on rails/web-console#326
The text was updated successfully, but these errors were encountered: