microsoftarchive / wlist

A command line client for Wunderlist
MIT License
39 stars 4 forks source link

Error: "no implicit conversion of String into Integer (TypeError)" #9

Open berndpl opened 9 years ago

berndpl commented 9 years ago

Not sure if this a usage issue on my end. But after following the README and trying to view the inbox I see the following:

~/6/i/w/bin (master) $ ./wlist inbox
/…/wlist.rb:122:in `[]': no implicit conversion of String into  Integer (TypeError)
    from /…/wlist/lib/wlist.rb:122:in `block in get_inbox_id'
    from /…/wlist/lib/wlist.rb:122:in `each'
    from /…/wlist/lib/wlist.rb:122:in `detect'
    from /…/wlist/lib/wlist.rb:122:in `get_inbox_id'
    from /…/wlist/libexec/wlist-inbox:5:in `<main>'

BTW this is a great project! Very helpful to get into things. Thanks.

binamkayastha commented 7 years ago

You're using the wrong version of ruby. Used ruby 2.2 and everything worked like a charm!

Specifically I changed line 39:

exec "$command_path" "$@"

to

ruby-2.2 $command_path "$@"

Of course, ruby-2.2 I got from my distros community repo. It's ruby 2.2.7 from https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.7.tar.gz. There are also .zip and .tar.xz that you can get to if you go to: https://cache.ruby-lang.org/pub/ruby/2.2/.

Goodluck! I really hope this project get's picked up again!

binamkayastha commented 7 years ago

Actually that's a temp solution. You really want to RVM, otherwise you won't be able to run the bash commands.