pedrozath / coltrane

🎹🎸A music theory library with a command-line interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ruby 3 support

morigs opened this issue Β· comments

It seems that this gem doesn't support Ruby 3.
Or it crashes on my PC for some other reason.

$ coltrane
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/router.rb:32:in `build_url'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/router.rb:19:in `get'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:82:in `flow'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `block in start'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `loop'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `start'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/coltrane-4.0.6/exe/coltrane:24:in `<top (required)>'
/home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `load'
/home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `<main>'
wrong number of arguments (given 1, expected 2)
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `block in start': no implicit conversion of nil into Hash (TypeError)
        from /home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `loop'
        from /home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `start'
        from /home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/coltrane-4.0.6/exe/coltrane:24:in `<top (required)>'
        from /home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `load'
        from /home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `<main>'

Hey, I did some changes. Please try the newest gem version v4.1.0 and lemme know if it works :)

Hi. I've upgraded gem, but still getting the same error

check now please

latest version, 4.1.1

Still have the same error 😒

I'm sorry about that. Can you post the new error trace?

Looks the same

Logs
This terminal doesn't seem to support true color. Try something like iTerm2 (for macOS), VTE or Konsole (for linux) or Hyper (for Windows) and you'll see the true magic!
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/router.rb:32:in `build_url'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/router.rb:19:in `get'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:82:in `flow'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `block in start'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `loop'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `start'
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/coltrane-4.1.1/exe/coltrane:24:in `'
/home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `load'
/home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `'
wrong number of arguments (given 1, expected 2)
/home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `block in start': no implicit conversion of nil into Hash (TypeError)
        from /home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `loop'
        from /home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/gambiarra-0.0.3/lib/gambiarra/app.rb:26:in `start'
        from /home/morigs/.asdf/installs/ruby/3.0.0/lib/ruby/gems/3.0.0/gems/coltrane-4.1.1/exe/coltrane:24:in `'
        from /home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `load'
        from /home/morigs/.asdf/installs/ruby/3.0.0/bin/coltrane:23:in `'

It can be a problem with the asdf ruby build or with the gambiarra gem. Try to install ruby with rbenv/rwm and make bundle install. I've tested it on my machine with rbenv and everything works fine. Or, maybe, bundle update can help.

$ ruby -v       
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
$ ./bin/coltrane       
? Welcome to Coltrane 4.1.1 (Choose with ↑ ↓ ⏎, filter with 'f')
> 1. notes
  2. chords
  3. scales
  4. progressions
  5. exit

ps. I've used master branch, commit c05d407962470ed2eb7894012f02fed76a25a106 for the test

bundle install did a trick! Thanks a lot πŸ˜„