-
Notifications
You must be signed in to change notification settings - Fork 153
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
Task not found in Rails 7 app #294
Comments
Hi, I am having exactly the same issue. My JS cannot find js-routes anymore, and the task has disappeared as well, it looks like the gem is somehow not included in a path or something ? Did you manage to find a solution for this ? |
I copied the task file from the library to |
Wow, ok. Thanks for the quick reply ;-) |
Looks like it is something in Rails 7 which is breaking things. With Rails 6 sprockets can find my js-routes, with rails 7 it can no longer find it. |
I've generated a new rails 7.0 app. Run In case you are upgrading from rails 6, is there anything in the upgrade guide related to rake tasks? |
In my app (Rails 7, no Sprockets), it was enough to move the Sprockets conditional from
|
@wtfspm It is hard to believe that fresh rails app doesn't have that issue. The root cause is till unknown. But I am open to accept a PR with such a change. |
Yeah, it's hard to know what everyone's setup is. When you said you generated a new Rails 7 app, I assumed you included Sprockets since it's the default, and with Sprockets defined, the engine is loaded, so no issue. Happy to submit a PR, though I'm curious if this fixes the issue for @mdesantis or @Marcellllll |
Hm, you are right. It was a surprise for me that Merged your PR and released js-routes |
I'm trying to use js-routes in a Rails 7 app, but
bundle exec rake js:routes
task isn't found:It works correctly if the task file is copied from the library to
lib/tasks
application directory.The text was updated successfully, but these errors were encountered: