fastruby / next_rails

A toolkit to upgrade your next Rails application
https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html?utm_source=github&utm_medium=description&utm_campaign=github&utm_term=next-rails
MIT License
489 stars 31 forks source link

[BUG] bundle_report outdated/compatibility --json returns invalid option: --json #86

Closed JuanVqz closed 1 year ago

JuanVqz commented 1 year ago

The readme#usage section suggests using a format flag but it didn't work.

Expected Behavior

Return the outdated report in JSON format

bundle_report outdated --json

Actual Behavior

bundle_report outdated --json

returns invalid option: --json

I will abide by the code of conduct

rishijain commented 1 year ago

Hey @JuanVqz I was able to reproduce this error on next_rails version 1.0.5. But then upgrading it to latest next_rails 1.2.2 fixed this issue for me. Can you try and upgrade and check if that works for you?

JuanVqz commented 1 year ago

you are right, it is working after upgrading to 1.2.2, I had 1.2.1 through

root@d1e95de6944f:/app# gem list next_rails

*** LOCAL GEMS ***

next_rails (1.2.1)
root@d1e95de6944f:/app# bundle_report outdated --json
fatal: detected dubious ownership in repository at '/app'
To add an exception for this directory, call:

        git config --global --add safe.directory /app
invalid option: --json
      Usage: /usr/local/bundle/bin/bundle_report [report-type] [options]

      report-type  There are two report types available: `outdated` and `compatibility`

      Examples:
        /usr/local/bundle/bin/bundle_report compatibility --rails-version 5.0
        /usr/local/bundle/bin/bundle_report outdated

      ruby_check To find a compatible ruby version for the target rails version

      Examples:
        /usr/local/bundle/bin/bundle_report ruby_check --rails-version 7.0.0

Options:
        --rails-version [STRING]     Rails version to check compatibility against (defaults to 5.0)
        --include-rails-gems         Include Rails gems in compatibility report (defaults to false)
    -h, --help                       Show this message
root@d1e95de6944f:/app#

if you think that is fine, please close the issue :+1: