caged / lighthouse-api

The official Ruby Library for interacting with the Lighthouse API
http://lighthouseapp.com/api
MIT License
103 stars 34 forks source link

Can no longer fetch tickets #15

Open morkeleb opened 9 years ago

morkeleb commented 9 years ago

I have a small program that once a week checks how many tickets we have in different buckets. Since a few weeks ago I can no longer fetch the tickets from the api.

I get the following error rake aborted! LoadError: cannot load such file -- active_support/core_ext/module/attr_accessor_with_default

The callback says its from the tag.rb file.

I can't figure out what changed, it seems nothing in the api changed. Is there a breaking change on the web side?

erictheise commented 9 years ago

What timing, @morkeleb! I just started trying to use this gem today and was puzzling over the same error, wondering how long it'd been a problem since there haven't been any updates since 2010.

erictheise commented 9 years ago

Hmmm, well, despite what one set of docs seems to say, another says that attr_accessor_with_default was removed in Rails 3.2.

morkeleb commented 9 years ago

Did you figure out a fix?

erictheise commented 9 years ago

My needs are simple (advancing ticket statuses after deploying to staging or production servers), so after digging down a couple of layers on this issue, I ended up hitting the Lighthouse API directly using curb.

courtenay commented 9 years ago

This repo is not maintained, caged doesn't work on lighthouse - try our company repo instead, which has a fix for this https://github.com/entp/lighthouse-api

morkeleb commented 9 years ago

Great! Ill try that out, you might want to look into contacting ruby gems to changed the published gem. Also update their webpage link to link to your repo.

morkeleb commented 9 years ago

I've tried changing the ruby lighthouse-api gem to the maintained. That changes the error I get but I still can't fetch tickets from the api. i tried using activeresource 4.0 as specified in your gem as well as the 3.0 version that "used to work".

The error is included below, your github fork does not allow raising of issues.

rake aborted!

ArgumentError: expected an attributes Hash, got "2"

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:1217:in `load'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:965:in `initialize'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:889:in `new'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:889:in `instantiate_record'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:885:in `block in instantiate_collection'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:885:in `collect!'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:885:in `instantiate_collection'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:857:in `find_every'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/gems/activeresource-3.0.0/lib/active_resource/base.rb:777:in `find'

/Users/morten/src/remotex/reportsender/Statismix/ruby/2.0.0/bundler/gems/lighthouse-api-7b7239bdb25c/lib/lighthouse/project.rb:47:in `tickets'

morkeleb commented 9 years ago

The error seems to come from activeresource trying to remove the root: https://github.com/rails/activeresource/issues/86

The monkey patch in the issue I linked doesn't solve the issue.