thoughtbot / suspenders

A Rails template with our standard defaults.
https://thoughtbot.com
MIT License
4.02k stars 528 forks source link

Accessibility generator for capybara_accessible_selectors fails #1228

Closed louis-antonopoulos closed 1 month ago

louis-antonopoulos commented 1 month ago

In response to running rails new

rails new my-app-name \
 --skip_rubocop \
 --skip-test \
 -d=postgresql \
 -m=https://raw.githubusercontent.com/thoughtbot/suspenders/main/lib/install/web.rb

the accessibility generator #add_capybara_gems step raises an error:

Git error: command `git fetch --force --quiet --no-tags --depth 1 --
https://github.com/citizensadvice/capybara_accessible_selectors.git refs/heads/HEAD:refs/heads/HEAD` in directory
~.asdf/installs/ruby/3.3.3/lib/ruby/gems/3.3.0/cache/bundler/git/capybara_accessible_selectors-7e28584b80a657a0689a0e8e8831f0d4fc91cb20
has failed.
Revision  does not exist in the repository https://github.com/citizensadvice/capybara_accessible_selectors.git. Maybe you
misspelled it?
    generate  suspenders:advisories
       rails  generate suspenders:advisories 
The git source https://github.com/citizensadvice/capybara_accessible_selectors.git is not yet checked out. Please run `bundle install` before trying to start your application

According to their instructions, it should be added to the Gemfile with a tag: like this:

Include in your Gemfile:

group :test do
  # It is recommended you use a tag as the main branch may contain breaking changes
  gem "capybara_accessible_selectors", git: "https://github.com/citizensadvice/capybara_accessible_selectors", tag: "v0.12.0"
end

In a new app, including this in the Gemfile breaks:

gem "capybara_accessible_selectors", git: "https://github.com/citizensadvice/capybara_accessible_selectors"

but this succeeds:

gem "capybara_accessible_selectors", git: "https://github.com/citizensadvice/capybara_accessible_selectors", tag: "v0.12.0"