cjmash
cjmash

Reputation: 183

stack-driver No source version information was provided by the deployed application with ruby

hello i have a ruby project , i have installed the gem stackdriver and in my config/environments*rb file i have

require "google/cloud/debugger" debugger = Google::Cloud::Debugger.new( project: "my-project", keyfile: "/home/vof/account.json" ) debugger.project debugger.start

i am using gcp so when i go to debugger in gcp i get a drop down of ruby-app with the error No source version information was provided by the deployed application

what could be the issue??

Upvotes: 0

Views: 379

Answers (2)

cjmash
cjmash

Reputation: 183

this worked pretty well for me. The problem now is it can access the github repo but cannot find the source code

Using GitHub Repository WinstonKamau/vof-tracker@b3ac3f.

The current source code version was provided by the deployed application.

Can't find the source code repository.

could this be because it is a private repository??

the gcloud debug source gen-repo-info-file generates two files source-contexts.json and source-context.json i pushed them both and redeployed

Upvotes: 0

Erez Haba
Erez Haba

Reputation: 216

Run the gcloud debug source gen-repo-info-file command. https://cloud.google.com/sdk/gcloud/reference/debug/source/gen-repo-info-file

Place the source-context.json file in the root of your app (or anywhere in the path). https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-debugger/lib/google/cloud/debugger/debuggee.rb#L136

Redeploy your app with the source-context.json file.

I notice that it's not well documented. We'll fix that.

Upvotes: 1

Related Questions