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

Rollback multi_json compatible #9

Closed
wants to merge 1 commit into from

Conversation

sanemat
Copy link
Contributor

@sanemat sanemat commented Oct 8, 2012

multi_json 1.0.0 does not work with google api ruby client v0.4.7(active_support 3.2.8?)

On rails console(also rails application, rails3.2.8), multi_json v1.2.x or lower version causes LoadError. #authrization.fetch_access_token! and #discovered_api('analytics', 'v3') raise error. This works fine with multi_json v1.3.6.

bundle exec rails c
require 'google/api_client'
client = Google::APIClient.new
(omitted)
> client.authorization.fetch_access_token!
LoadError: cannot load such file -- {
  "access_token" : "ACCESS_TOKEN",
  "token_type" : "Bearer",
  "expires_in" : 3600
}
from /Users/sane/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:245:in `load'

Below is my minimal load error application:
https://github.com/sanemat/minimal-json

This does not work with active_support 3.2.8
@sanemat
Copy link
Contributor Author

sanemat commented Oct 8, 2012

google-api-client gem v1.4.7 still raise error from rails. Is this regression?

@sanemat
Copy link
Contributor Author

sanemat commented Oct 8, 2012

Is this rails problem? I don't separate this issue yet.

@sporkmonger
Copy link
Contributor

I see the problem. The backwards compatibility code checks for the existence of the load function before defining it. Because Kernel defines load, the alias is never created. This pull request will be closed because it doesn't actually fix the problem.

@sporkmonger sporkmonger closed this Oct 8, 2012
@sporkmonger
Copy link
Contributor

I think dd8cee6 should fix this, but I couldn't reproduce the issue in the tests.

@sanemat
Copy link
Contributor Author

sanemat commented Oct 8, 2012

Thanks, but still load error. I use this e28035d

> api.discovered_api('analytics', 'v3')
LoadError: cannot load such file -- {
 "kind": "discovery#restDescription",
 "discoveryVersion": "v1",
 "id": "analytics:v3",
...

Here is Gemfile: https://github.com/sanemat/minimal-json/blob/11c2211166df7e5b51197f79525df4da421d0f3a/Gemfile

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

Successfully merging this pull request may close these issues.

None yet

2 participants