fog / fog-google

Fog for Google Cloud Platform
MIT License
98 stars 146 forks source link

google has no compute service #170

Closed lucaswxp closed 7 years ago

lucaswxp commented 7 years ago

So, I tried to reopen issue #169, but could not figure it out how. I still get the error "google has no compute service":


require "bundler"
require 'fog/google'

class Admin::GcloudController < ApplicationController
  def index
    connection = Fog::Compute.new(:provider => "Google", :google_project => 'xxxxxx')
    @records = connection.servers.list()
    Rails.logger.debug @records
  end
end
bundle install | grep "fog"
Using fog-core 1.43.0
Using fog-json 1.0.2
Using fog-xml 0.1.2
Using fog-local 0.3.1
Using fog-vmfusion 0.1.0
Using fog-vsphere 1.5.0
Using fog-aliyun 0.1.0
Using fog-brightbox 0.11.0
Using fog-openstack 0.1.15
Using fog-profitbricks 2.0.1
Using fog-sakuracloud 1.7.5
Using fog-serverlove 0.1.2
Using fog-softlayer 1.1.4
Using fog-storm_on_demand 0.1.1
Using fog-atmos 0.1.0
Using fog-aws 0.12.0
Using fog-cloudatcost 0.1.2
Using fog-dynect 0.0.3
Using fog-ecloud 0.3.0
Using fog-google 0.1.0
Using fog-powerdns 0.1.1
Using fog-rackspace 0.1.1
Using fog-radosgw 0.0.5
Using fog-riakcs 0.1.0
Using fog-terremark 0.1.0
Using fog-voxel 0.1.0
Using fog-xenserver 0.2.3
Using fog 1.38.0
plribeiro3000 commented 7 years ago

Ok. We got this issue in several extracted repos already. The thing is i could not replicate it.

Could you please create a repo reproducing this error plz?

Thanks!

Em qui, 27 de out de 2016 14:20, Lucas Pelegrino notifications@github.com escreveu:

So, I tried to reopen issue #169 https://github.com/fog/fog-google/issues/169, but could not figure it out how. I still get the error "google has no compute service":

require "bundler"require 'fog/google' class Admin::GcloudController < ApplicationController def index connection = Fog::Compute.new(:provider => "Google", :google_project => 'xxxxxx') @records = connection.servers.list() Rails.logger.debug @records endend

bundle install | grep "fog"

Using fog-core 1.43.0 Using fog-json 1.0.2 Using fog-xml 0.1.2 Using fog-local 0.3.1 Using fog-vmfusion 0.1.0 Using fog-vsphere 1.5.0 Using fog-aliyun 0.1.0 Using fog-brightbox 0.11.0 Using fog-openstack 0.1.15 Using fog-profitbricks 2.0.1 Using fog-sakuracloud 1.7.5 Using fog-serverlove 0.1.2 Using fog-softlayer 1.1.4 Using fog-storm_on_demand 0.1.1 Using fog-atmos 0.1.0 Using fog-aws 0.12.0 Using fog-cloudatcost 0.1.2 Using fog-dynect 0.0.3 Using fog-ecloud 0.3.0 Using fog-google 0.1.0 Using fog-powerdns 0.1.1 Using fog-rackspace 0.1.1 Using fog-radosgw 0.0.5 Using fog-riakcs 0.1.0 Using fog-terremark 0.1.0 Using fog-voxel 0.1.0 Using fog-xenserver 0.2.3 Using fog 1.38.0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fog/fog-google/issues/170, or mute the thread https://github.com/notifications/unsubscribe-auth/AApEuHm1OrR_cJEAnBTysisKyAFBGHT3ks5q4M0zgaJpZM4KiipH .

Temikus commented 7 years ago

@lucaswxp Hmmm, you should've been able to just click reopen at the end of the issue. NVM that now.

In addition to what Paulo asked - can you try adding require 'fog/core' before as well?

lucaswxp commented 7 years ago

@Temikus require 'fog/core' didnt work @plribeiro3000 How can I do this?

So, I uninstalled all my system gems and made a installation like this:

# Gemfile
source "http://rubygems.org"
gem "fog-google"

# test.rb
require 'fog/google'
Fog::Compute.new(:provider => 'Google', :google_project => 'reduza-146314')

I got slightly different message:

[fog][WARNING] Please install the google-api-client gem before using this provider
/gems/fog-core-1.43.0/lib/fog/core/services_mixin.rb:18:in `rescue in new': google has no compute service (Fog::Service::NotFound)
    from /Users/lucaswxp/.rvm/gems/ruby-2.1.1/gems/fog-core-1.43.0/lib/fog/core/services_mixin.rb:8:in `new'
    from /Users/lucaswxp/.rvm/gems/ruby-2.1.1/gems/fog-core-1.43.0/lib/fog/compute.rb:54:in `new'
    from test.rb:3:in `<main>'

I saw the warning about google-api-client, installed it and updated the code to:

require 'google/apis/compute_beta'
require 'google/apis/compute_v1'
require 'fog/google'

But I'm still seeing the warning.

I'm out of ideas. Any help?

Temikus commented 7 years ago

@lucaswxp As Paulo mentioned - can you create a repo that reproduces the error or provide a detailed reproduction scenario that I can repeat? I don't have many ideas since I cannot really reproduce this 😕

Temikus commented 7 years ago

Closing this since we've had no response for 2 months, however @lucaswxp - feel free to comment anytime and I'll reopen!

apuchitnis commented 6 years ago

Hi @lucaswxp, did you ever solve this issue? I am currently running into it myself.

lucaswxp commented 6 years ago

@apuchitnis I didn't