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

Necessary Gems not included when using "google-cloud-translate" #1056

Closed
frankyn opened this issue Nov 16, 2016 · 3 comments
Closed

Necessary Gems not included when using "google-cloud-translate" #1056

frankyn opened this issue Nov 16, 2016 · 3 comments
Assignees
Labels
api: translation Issues related to the Cloud Translation API API.

Comments

@frankyn
Copy link
Contributor

frankyn commented Nov 16, 2016

This error has occurred here: ruby-docs-samples/pull/113

Issue:
When using "google-cloud-translate" gem without using "google-cloud" gem has the following error:

LoadError:
       cannot load such file -- faraday

A way to get around this error
Adding "google-cloud" gem helped get passed this error, but this shouldn't be required.

@blowmage
Copy link
Contributor

blowmage commented Nov 16, 2016

I've confirmed this. The google-cloud-translate gem depends on the google-cloud-core gem. A future release of the google-cloud-core gem will declare a dependency on googleauth, which depends on faraday. Unfortunately, the currently released version of the google-cloud-core gem does not have that dependency. I am pushing out a google-cloud-translate 0.21.1 release that corrects the missing dependency on googleauth now.

The recent release to support V1 has complicated this a bit, in that it necessitated the removal of google-api-client which is usually the mechanism used for managing all these dependencies. My apologies for the inconvenience.

@blowmage blowmage added the api: translation Issues related to the Cloud Translation API API. label Nov 16, 2016
@blowmage blowmage self-assigned this Nov 16, 2016
@blowmage
Copy link
Contributor

Okay, the google-cloud-translate 0.22.1 gem has been released and should resolve this problem. Please verify if this change resolved this for you and close the issue if it does. If not, them please let us know.

https://github.com/GoogleCloudPlatform/google-cloud-ruby/releases/tag/google-cloud-translate%2Fv0.22.1
https://rubygems.org/gems/google-cloud-translate/versions/0.22.1

Here is the output when installing google-cloud-translate now:

$ gem install google-cloud-translate
Fetching: google-cloud-core-0.21.0.gem (100%)
Successfully installed google-cloud-core-0.21.0
Fetching: multipart-post-2.0.0.gem (100%)
Successfully installed multipart-post-2.0.0
Fetching: faraday-0.10.0.gem (100%)
Successfully installed faraday-0.10.0
Fetching: little-plugger-1.1.4.gem (100%)
Successfully installed little-plugger-1.1.4
Fetching: multi_json-1.12.1.gem (100%)
Successfully installed multi_json-1.12.1
Fetching: logging-2.1.0.gem (100%)
Successfully installed logging-2.1.0
Fetching: jwt-1.5.6.gem (100%)
Successfully installed jwt-1.5.6
Fetching: memoist-0.15.0.gem (100%)
Successfully installed memoist-0.15.0
Fetching: os-0.9.6.gem (100%)
Successfully installed os-0.9.6
Fetching: public_suffix-2.0.4.gem (100%)
Successfully installed public_suffix-2.0.4
Fetching: addressable-2.5.0.gem (100%)
Successfully installed addressable-2.5.0
Fetching: signet-0.7.3.gem (100%)
Successfully installed signet-0.7.3
Fetching: googleauth-0.5.1.gem (100%)
Successfully installed googleauth-0.5.1
Fetching: google-cloud-translate-0.22.1.gem (100%)
Successfully installed google-cloud-translate-0.22.1
14 gems installed

Here is an IRB session using the latest release:

$ irb
irb(main):001:0> require "google/cloud/translate"
=> true
irb(main):002:0> t = Google::Cloud::Translate.new
=> #<Google::Cloud::Translate::Api:0x007fa9327b8850 @service=Google::Cloud::Translate::Service>
irb(main):003:0> t.translate "Hello from the latest verson of Google Cloud Translate!", to: :es
=> #<Google::Cloud::Translate::Translation:0x007fa932588a80 @text="Hola desde la última Verson de la nube de Google Traducir!", @to="es", @origin="Hello from the latest verson of Google Cloud Translate!", @from="en", @model=nil, @detected=true>
irb(main):004:0> Google::Cloud::Translate::VERSION
=> "0.22.1"

@frankyn
Copy link
Contributor Author

frankyn commented Nov 16, 2016

Verified! Thanks @blowmage!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: translation Issues related to the Cloud Translation API API.
Projects
None yet
Development

No branches or pull requests

2 participants