henrycatalinismith / ppl

The command line address book
http://henry.catalinismith.com/ppl/
Other
300 stars 18 forks source link

Invalid multibyte escape #19

Closed pigmonkey closed 11 years ago

pigmonkey commented 11 years ago

I'm not a Ruby guy, so I don't know if this is a ppl issue or a problem with this vpim thingy.

$ ppl init ~/contacts
/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': /usr/lib/ruby/gems/2.0.0/gems/vpim-0.695/lib/vpim/vcard.rb:678: invalid multibyte escape: /^\xFE\xFF/ (SyntaxError)
invalid multibyte escape: /^\xFF\xFE/
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/lib/ruby/gems/2.0.0/gems/ppl-1.15.0/lib/ppl/adapter/vcard/vpim.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/lib/ruby/gems/2.0.0/gems/ppl-1.15.0/lib/ppl.rb:34:in `<top (required)>'
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
    from /usr/lib/ruby/gems/2.0.0/gems/ppl-1.15.0/bin/ppl:8:in `<top (required)>'
    from /usr/bin/ppl:23:in `load'
    from /usr/bin/ppl:23:in `<main>'
$ ruby --version
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
henrycatalinismith commented 11 years ago

Well, well, well. This is certainly a new one. It's likely that this is another bug resulting from the fact that vpim doesn't support the String class for Ruby >= 1.9 yet, according to the maintainer. In fact, judging by the stack trace, I wouldn't be surprised if vpim just plain doesn't compile in Ruby 2.0, because the error is occurring during the initial loading of the code, not at runtime.

Anyway, all that detail isn't helping you any, so here's what I'm gonna do later on:

  1. Reproduce the issue with Ruby 2.0 if possible
  2. Contemplate forking vpim to fix all these compatibility issues with modern versions of Ruby myself
  3. Document this annoying Ruby version limitation prominently in the meantime

The only thing I can suggest to you that will fix this error in the short-term is to install a version of Ruby from the 1.9.* range. Apologies for the underwhelming workaround advice. I'm leaving this issue open until the real bug is fixed anyway.

By the way, thanks for reporting this and taking the time to include all the relevant details.

pigmonkey commented 11 years ago

I'm glad it was helpful.

I'm running Arch Linux, which no longer provides Ruby 1.9 in the official repositories. I'll probably just stick with my current solution of abook until vpim is working with Ruby 2.0. I'm looking forward to playing with ppl, though!

henrycatalinismith commented 11 years ago

Right then, this should be working fine for you now!

pigmonkey commented 11 years ago

Yup, it's working. Thanks!

henrycatalinismith commented 11 years ago

Awesome!