This line:
@page = @page.launch_profile(@profile_name)
is causing this error:
undefined method `launch_profile' for #<Object:0x007f9013d785e8> (NoMethodError)
If I add puts "Page = #{@page} "{@page.class}"
immediately before the call that complains, I get
Page = #<OwnProfilePage:0x007f9013bf5e78> OwnProfilePage
What's weird is that on the command-line, the same version of Ruby (2.1.5) does this:
$ ruby -le 'class Dog; end; Dog.new.foo'
-e:1:in `<main>': undefined method `foo' for #<Dog:0x007fb64120c6d8> (NoMethodError)
so I know it usually works.
I've tried adding a method_missing()
method to Object
, but it affected nothing, so I presume someone else, somewhere else, is monkey-patching or overriding or otherwise meta-buggering things. I even patched NoMethodError.new()
to print a stack trace to try to locate the errant code.
Further, is there a reasonably general to work out which bit of a Ruby system is doing what, when there's potentially so much voodoo and other poorly-conceived global-change nonsense going on in far flung and random gems? (In another case, 'fail' started reporting the previous rescued exception's message, instead of the string I supplied it with.)