Skip to content
This repository has been archived by the owner on Jun 12, 2019. It is now read-only.

NameError: uninitialized constant BigQuery #10

Closed
lgs opened this issue Aug 22, 2014 · 5 comments
Closed

NameError: uninitialized constant BigQuery #10

lgs opened this issue Aug 22, 2014 · 5 comments

Comments

@lgs
Copy link

lgs commented Aug 22, 2014

I followed the readme, but I get the following error:

irb(main):009:0> bq = BigQuery::Client.new(opts)
NameError: uninitialized constant BigQuery
    from (irb):9
    from /home/lsoave/.rbenv/versions/2.1.2/bin/irb:11:in `'
irb(main):010:0> 

My env:

lsoave@basenode:~/Github/gitwatcher$ egrep -i "bigquery|google" Gemfile.lock
    bigquery (0.2.9)
      google-api-client (>= 0.4.6)
    google-api-client (0.7.1)
  bigquery
@abronte
Copy link
Owner

abronte commented Aug 23, 2014

I think I forgot to push the latest changes to rubygems. Try updating the gem and trying again.

@lgs
Copy link
Author

lgs commented Aug 29, 2014

Thanks Adam,
now I get a not found dataset error, while calling puts bq.tables, even if I think it should be ok, frankly:

BigQuery::Errors::NotFound: Not Found: Dataset bigquery-on-gitwatcher-001:publicdata.samples

I tried several combination of syntaxes ex.: publicdata:samples and data sets as well.

opts var looks good after calling :

{"client_id"=>"12345.apps.googleusercontent.com", service_email"=>"12345@developer.gserviceaccount.com", "key"=>"./config/c211af1a2b513.p12", "project_id"=>"bigquery-on-gitwatcher-001", "dataset"=>"publicdata.samples"}

@lgs
Copy link
Author

lgs commented Aug 29, 2014

... I also give it a try testing and I get:

BigQueryTest#test_for_describe_table:
Errno::ENOENT: No such file or directory @ rb_sysopen - key
...
...
...
8 runs, 0 assertions, 0 failures, 8 errors, 0 skips
rake aborted!
Command failed with status (1): [ruby -I"lib:lib:test" -I"/home/lsoave/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib" "/home/lsoave/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "test/*.rb" ]

@andresbravog
Copy link
Contributor

@lgs the error you are getting means that dataset is not in your BQ project, at least not with that id.

Specs need's yo to set up credentials (we don't want you to know ours hehe). We are working on a Cassette integration test suite.

Let me know if any other issues appear

@lgs
Copy link
Author

lgs commented Oct 21, 2014

@andresbravog
... yes my fault: dataset name typo. Now it works fine!

Many thanks.

@lgs lgs closed this as completed Oct 21, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants