Insightly / insightly-ruby

Ruby Library for the Insightly REST API
16 stars 45 forks source link

Sample usage in readme throws exception #24

Closed ravenchorus closed 5 years ago

ravenchorus commented 9 years ago

I'm just getting started with the Insightly API in general and this gem in particular. I've installed the gem and loaded up a Rails console to begin experimenting.

I started with the sample usage in the readme and immediately ran into an error:

$ rails console
[1] pry(main)> Insightly2.api_key = < my actual API key here >
=> "< my actual API key >"
[2] pry(main)> contacts = Insightly2.client.get_contacts
SyntaxError: /usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:10: syntax error, unexpected ')'
/usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:21: syntax error, unexpected ','
def create_comment_attachment(id:, filename:)
                                  ^
/usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:32: syntax error, unexpected ')'
/usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:35: syntax error, unexpected keyword_end, expecting end-of-input
from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'

My versions:

Thanks.

brianinsightly commented 9 years ago

HI Ken,

The ruby library was written by one of our customers, so your best bet is to report an issue via github so the developer can get in touch directly (we're not a ruby shop here).

Thanks,

Brian McConnell Insightly Engineering Team

On Fri, Apr 10, 2015 at 11:54 AM, Kenn Wilson notifications@github.com wrote:

I'm just getting started with the Insightly API in general and this gem in particular. I've installed the gem and loaded up a Rails console to begin experimenting.

I started with the sample usage in the readme and immediately ran into an error:

$ rails console [1] pry(main)> Insightly2.api_key = < my actual API key here > => "< my actual API key >" [2] pry(main)> contacts = Insightly2.client.get_contacts SyntaxError: /usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:10: syntax error, unexpected ')' /usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:21: syntax error, unexpected ',' def create_comment_attachment(id:, filename:) ^ /usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:32: syntax error, unexpected ')' /usr/local/lib/ruby/gems/2.0.0/gems/insightly2-0.1.7/lib/insightly2/dsl/comments.rb:35: syntax error, unexpected keyword_end, expecting end-of-input from /usr/local/lib/ruby/gems/2.0.0/gems/activesupport-4.1.5/lib/active_support/dependencies.rb:247:in `require'

My versions:

  • Ruby 2.0.0 (via Homebrew)
  • Insightly2 0.1.7

Thanks.

— Reply to this email directly or view it on GitHub https://github.com/Insightly/insightly-ruby/issues/24.

ravenchorus commented 9 years ago

? This is Github.

Is there another copy of this repository somewhere on Github that I should be using for issues instead of this one?

brianinsightly commented 9 years ago

Oh,

My bad. I've been on zendesk all day and just assumed this came from github.

Glad it's friday :)

The developer who worked on this is generally pretty responsive. I'd help you but I've never touched Ruby (mostly work in Python and .Net here).

Thanks again for using Insightly.

Brian McConnell

On Fri, Apr 10, 2015 at 3:23 PM, Kenn Wilson notifications@github.com wrote:

? This is Github.

Is there another copy of this repository somewhere on Github that I should be using for issues instead of this one?

— Reply to this email directly or view it on GitHub https://github.com/Insightly/insightly-ruby/issues/24#issuecomment-91707801 .

ravenchorus commented 9 years ago

@dior001 It appears you're the original author of this gem? Drop me an email at kenn at colettehq dot com if you're interested in picking up a little contract work on the integration we need. Thanks.

dior001 commented 9 years ago

@kennwilson @brianinsightly apologies this issue slipped past my radar. Kenn I will investigate the reported issue this evening and respond to your email.

ravenchorus commented 9 years ago

For anyone else who comes across this, the exception is due to this gem requiring Ruby 2.1, not 2.0 as stated (at the time of this writing) in the readme.