google-cloud-ruby: LoadError (google/gax) when using PubSub
Hi, I am getting an error when trying to use google/cloud/pubsub
.
$ bundle exec bin/ght-mongo-stream config.yaml
/var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/v1/publisher_api.rb:28:in `require': cannot load such file -- google/gax (LoadError)
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/v1/publisher_api.rb:28:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/v1.rb:16:in `require'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/v1.rb:16:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/service.rb:19:in `require'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/service.rb:19:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/project.rb:18:in `require'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub/project.rb:18:in `<top (required)>'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub.rb:17:in `require'
from /var/lib/gems/2.2.0/gems/google-cloud-pubsub-0.21.0/lib/google/cloud/pubsub.rb:17:in `<top (required)>'
from /home/gousiosg/ghtorrent-streaming/lib/streaming/gpubsub.rb:2:in `require'
from /home/gousiosg/ghtorrent-streaming/lib/streaming/gpubsub.rb:2:in `<top (required)>'
from /home/gousiosg/ghtorrent-streaming/lib/streaming.rb:7:in `require'
from /home/gousiosg/ghtorrent-streaming/lib/streaming.rb:7:in `<top (required)>'
from bin/ght-mongo-stream:9:in `require'
from bin/ght-mongo-stream:9:in `<main>'
My Gemfile.lock
contains the google-gax (0.6.0)
PATH
remote: .
specs:
streaming-streaming (0.1.0)
GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
amq-protocol (2.0.1)
azure (0.7.1)
addressable (~> 2.3)
faraday (~> 0.9)
faraday_middleware (~> 0.10)
json (~> 1.8)
mime-types (>= 1, < 3.0)
nokogiri (~> 1.6)
systemu (~> 2.6)
thor (~> 0.19)
uuid (~> 2.0)
bson (1.12.5)
bson_ext (1.12.5)
bson (~> 1.12.5)
bunny (2.2.2)
amq-protocol (>= 2.0.1)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.0)
faraday (>= 0.7.4, < 0.10)
google-cloud-core (0.21.1)
googleauth (~> 0.5.1)
google-cloud-pubsub (0.21.0)
google-cloud-core (~> 0.21.0)
google-gax (~> 0.6.0)
google-protobuf (~> 3.0)
googleapis-common-protos (~> 1.3)
grpc (~> 1.0)
grpc-google-iam-v1 (~> 0.6.8)
google-gax (0.6.0)
googleapis-common-protos (~> 1.3.1)
googleauth (~> 0.5.1)
grpc (~> 1.0)
rly (~> 0.2.3)
google-protobuf (3.0.2)
googleapis-common-protos (1.3.4)
google-protobuf (~> 3.0)
grpc (~> 1.0)
googleauth (0.5.1)
faraday (~> 0.9)
jwt (~> 1.4)
logging (~> 2.0)
memoist (~> 0.12)
multi_json (~> 1.11)
os (~> 0.9)
signet (~> 0.7)
grpc (1.0.1)
google-protobuf (~> 3.0.2)
googleauth (~> 0.5.1)
grpc-google-iam-v1 (0.6.8)
googleapis-common-protos (~> 1.3.1)
googleauth (~> 0.5.1)
grpc (~> 1.0)
json (1.8.3)
jwt (1.5.6)
little-plugger (1.1.4)
log4r (1.1.10)
logging (2.1.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
macaddr (1.7.1)
systemu (~> 2.6.2)
memoist (0.15.0)
mime-types (2.99.1)
mini_portile2 (2.0.0)
mongo (1.12.5)
bson (= 1.12.5)
mongoriver (0.4.3)
bson_ext
log4r
mongo (>= 1.7)
multi_json (1.12.1)
multipart-post (2.0.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
os (0.9.6)
rake (10.5.0)
rly (0.2.3)
signet (0.7.3)
addressable (~> 2.3)
faraday (~> 0.9)
jwt (~> 1.5)
multi_json (~> 1.10)
systemu (2.6.5)
thor (0.19.1)
uuid (2.3.8)
macaddr (~> 1.0)
PLATFORMS
ruby
DEPENDENCIES
azure
bson_ext (~> 1.12.5)
bundler (~> 1.10)
bunny
google-cloud-pubsub
mongo (~> 1.12.5)
mongoriver
rake (~> 10.0)
streaming-streaming!
BUNDLED WITH
1.11.2
The code that triggers the error is here: https://github.com/ghtorrent/ghtorrent-streaming/blob/master/lib/streaming/gpubsub.rb
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (12 by maintainers)
@mia-0032 Oh, I didn’t even think about file permissions! That would explain it as well. I’ll follow up with the google-gax team today.
It may be wrong, but I have encountered the similar situation before. Since
gax.rb
has permission set to 0640, it may not be available if you install gem as a different user such as root user.