Search code examples
ruby-on-railsrubystackdrivergoogle-cloud-stackdriver

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??


Solution

  • 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.