Skip to content

Standalone script, "... or Rails version 0.0 not supported. Failed to sync" #43

@wconrad

Description

@wconrad

When run with a standalone script, tunemygc fails to sync with a "version... not supported" error.

Given this program foo.rb:

ENV['RUBY_GC_SPY'] ||= 'manual'
require 'tunemygc'
require 'active_support'

TuneMyGc.booted
TuneMyGc.processing_started
TuneMyGc.processing_ended

Then running it causes the error "Ruby version 2.4.2 or Rails version 0.0 not supported. Failed to sync 10 snapshots":

$ RUBY_GC_TOKEN=(redacted) RUBY_GC_TUNE=200 bundle exec ruby foo.rb
[tunemygc] Rails not detected, loading minimal agent
I, [2017-10-28T09:55:58.529386 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] interposing
I, [2017-10-28T09:55:58.532564 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] hooked: GC tracepoints
I, [2017-10-28T09:55:58.533370 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] hooked: manual
I, [2017-10-28T09:55:58.533391 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] hooked: after_initialize
I, [2017-10-28T09:55:58.533405 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] hooked: at_exit
I, [2017-10-28T09:55:58.533417 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] interposed
I, [2017-10-28T09:55:58.568350 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] at_exit
I, [2017-10-28T09:55:58.568387 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] uninstalled manual spy
I, [2017-10-28T09:55:58.569838 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] Sync required? true
I, [2017-10-28T09:55:58.569863 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] Syncing 10 snapshots
I, [2017-10-28T09:55:59.192253 #10472]  INFO -- : [tunemygc, ppid: 17705, pid: 10472] Ruby version 2.4.2 or Rails version 0.0 not supported. Failed to sync 10 snapshots

These Ruby versions all gave the same error:

  • ruby-2.4.2
  • ruby-2.4.1
  • ruby-2.4.0
  • ruby-2.3.4
  • ruby-2.2.5

Additional info

Gemfile:

# frozen_string_literal: true
source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "activesupport"
gem "tunemygc"

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (5.0.6)
      concurrent-ruby (~> 1.0, >= 1.0.2)
      i18n (~> 0.7)
      minitest (~> 5.1)
      tzinfo (~> 1.1)
    concurrent-ruby (1.0.5)
    i18n (0.9.0)
      concurrent-ruby (~> 1.0)
    minitest (5.10.3)
    thread_safe (0.3.6)
    tunemygc (1.0.69)
    tzinfo (1.2.3)
      thread_safe (~> 0.1)

PLATFORMS
  ruby

DEPENDENCIES
  activesupport
  tunemygc

BUNDLED WITH
   1.15.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions