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

Rails 7, annotate --routes failed #983

Open
SimBed opened this issue Apr 9, 2023 · 5 comments
Open

Rails 7, annotate --routes failed #983

SimBed opened this issue Apr 9, 2023 · 5 comments

Comments

@SimBed
Copy link

SimBed commented Apr 9, 2023

Thanks for the gem. I am just trying it out in Rails 7 after listening to an episode of the Ruby for All podcast where it is referred.

annotate --routes

rake aborted!
Don't know how to build task 'routes' (See the list of available tasks with `rake --tasks`)

This is due to the the rake routes deprecation [need to use rails routes instead]. An issue was raised earlier about the deprecation warning (just gave a warning, but continued to work in Rails 6.0). Now in 7.0 it fails.

Thanks Daniel

@Ashley-King
Copy link

A work-around that works for me: create a file in /lib/tasks called routes.rake and add this:

task routes: :environment do
  puts `bundle exec rails routes`
end

@AliOsm
Copy link

AliOsm commented Dec 23, 2023

I'm using devcontainers, I added this line in my setup.sh script:

sudo sed -i 's/rake routes/rails routes/g' /usr/local/rvm/gems/ruby-3.2.2/gems/annotate-3.2.0/lib/annotate/annotate_routes/header_generator.rb

Sorry for the dirtiness :)

@ruanltbg
Copy link

Is this repo still being maintained?

cc @ctran @drwl @MrJoy

@drwl
Copy link
Collaborator

drwl commented Mar 16, 2024

@ruanltbg Hi, I don't actively maintain this gem anymore, but work on https://github.com/drwl/annotaterb.

@ruanltbg
Copy link

Thank you, I will update my gemfile.

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

5 participants