Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatibility with ruby 1.9 #5

Open
nicolasochem opened this issue Sep 8, 2009 · 5 comments
Open

incompatibility with ruby 1.9 #5

nicolasochem opened this issue Sep 8, 2009 · 5 comments

Comments

@nicolasochem
Copy link

When starting my app in a ruby 1.9 environment I get this issue :

/home/ror/gem/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require': /home/ror/gem/gems/contacts-1.0.16/lib/contacts/base.rb:165: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
/home/ror/gem/gems/contacts-1.0.16/lib/contacts/base.rb:172: syntax error, unexpected keyword_when, expecting keyword_end
when 'deflate':
^
/home/ror/gem/gems/contacts-1.0.16/lib/contacts/base.rb:172: syntax error, unexpected ':', expecting keyword_end
/home/ror/gem/gems/contacts-1.0.16/lib/contacts/base.rb:210: syntax error, unexpected keyword_end, expecting $end

@kaiiserni
Copy link

same issue here, such a shame as it is a really usefull plugin :-(

@kaiiserni
Copy link

Hi Cardmagic,
I seem to have solved the issue by removing the dobbelpoints on line 165 and 172 of lib/contacts/base.rb:

   when 'gzip'
   ....
   when 'deflate'
   ....

also in gmail.rb I had to comment the whole upper part with the logic of loading JSON.
I guess its not needed in 1.9? I don't know, but it works ;-)

thanks for looking into this.

@kaiiserni
Copy link

but now I get this: undefined method `grep' for #String:0xb3a47f0
for hotmail.rb line 82

:-(
thanks

@minaguib
Copy link

I'm running into a similar problem under ruby 1.9, even outside of rails:

$ irb -rubygems
irb(main):001:0> require "contacts"
LoadError: no such file to load -- jcode
          from /usr/local/ruby19/lib/ruby/gems/1.9.1/gems/gdata-1.1.1/lib/gdata.rb:21:in `require'
          from /usr/local/ruby19/lib/ruby/gems/1.9.1/gems/gdata-1.1.1/lib/gdata.rb:21:in `<top (required)>'
          from /usr/local/ruby19/lib/ruby/gems/1.9.1/gems/contacts-1.2.2/lib/contacts/gmail.rb:1:in `require'
          from /usr/local/ruby19/lib/ruby/gems/1.9.1/gems/contacts-1.2.2/lib/contacts/gmail.rb:1:in `<top (required)>'
          from /usr/local/ruby19/lib/ruby/gems/1.9.1/gems/contacts-1.2.2/lib/contacts.rb:6:in `require'
          from /usr/local/ruby19/lib/ruby/gems/1.9.1/gems/contacts-1.2.2/lib/contacts.rb:6:in `<top (required)>'
          from (irb):1:in `require'
          from (irb):1
          from /usr/local/ruby19/bin/irb:12:in `<main>'

Seems that jcode is no longer available, or necessary, under ruby 1.9

@pagetribe
Copy link

I had the same issue, here is how I fixed it:
ruby >= 1.9 doesn't have jcode, a module to handle japanese (EUC/SJIS) strings, as it supports unicode natively.

So you will need to add: require 'jcode' if RUBY_VERSION < '1.9' to your gdata gem

jensb pushed a commit to jensb/contacts that referenced this issue Sep 13, 2012
Fix AOL and mail.ru connectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants