Puts not working - Anyone else?


#1

but print does. SU2018 on a Mac.


#2

Maybe the info in the above link can help you figure out what is providing the puts that is being invoked


#3

when I run this…

EDIT: chalk and cheese

why are they missing???

john


#4

That post is way over my head unfortunately! :grimacing:


#5

ignore the last one as I was comparing chalk to cheese…

but, you do have these, that I don’t seem to have…

 :runNudgeStackUndo,
 :Digest,

do you have any Gems installed?

john


#6
Sketchup::Console.ancestors.map{|a| a if a.private_method_defined?(:puts)}
# => [Sketchup::Console, Object, nil, Kernel, nil]

you could see what the two above return as well…

something is hijacking puts on your mac…


#7

Have you accidentally defined a method named puts in the global namespace?


#8

not that I know of…

> Sketchup::Console.ancestors.map{|a| a if a.private_method_defined?(:puts)}
[Sketchup::Console, Object, nil, Kernel, nil]


#9

sorry, been having dinner,

did the other two yield anything?

Sketchup::Console.ancestors.map{|a| a if a.private_method_defined?(:runNudgeStackUndo)}
Sketchup::Console.ancestors.map{|a| a if a.private_method_defined?(:Digest)}

john


#10

@hank have you installed the Mojave update for SketchUp 2018 ?
(P.S. - Your forum profile does not indicate your specific SketchUp version.)


You can also check the owner of the puts() method …

method(:puts).owner
#=> Kernel

#11

Also @hank, have you installed any custom Ruby Console extension ?


Note that there have been issues in past release and are some current issues with the Ruby Console …


#12

@hank can you follow up on this, even if your happy with your workaround…

if an extension is re-defining :puts then we can notify the author and/or the dev team…

if Dan’s :owner doesn’t bear fruit, then check $" may show an extension hiding in HD/Lib path…

john


#13

@john_drivenupthewall is right that modifying normally global methods (and variables) is bad coding that needs to be tracked down and corrected. Please don’t drop this before the culprit is identified!


#14

Sorry All… been on a whirlwind of other business in preparation for the holiday break!

Here is what that yielded:

> Sketchup::Console.ancestors.map{|a| a if a.private_method_defined?(:runNudgeStackUndo)}
Sketchup::Console.ancestors.map{|a| a if a.private_method_defined?(:Digest)}
[Sketchup::Console, Object, nil, nil, nil]

#15

I don’t think I have.

I just updated to include

yields…

> method(:puts).owner
Object

#16

nope!


#17

Here is the return for John’s test…

> $".grep(/digest/i)
["digest.so", "/Applications/SketchUp 2018/SketchUp.app/Contents/Frameworks/Ruby.framework/Versions/2.2/lib/ruby/2.2.0/digest.rb", "digest/md5.so"]

#18

I renamed my Plugins folder to Plugins!! per John’s suggestion to unload all plugins, restarted and puts still not working.

p works though


#19

did you rename ‘both’ of your ‘Plugins’ folders?

some may be in the /Library/Application Support/SketchUp 2018/SketchUp/Plugins folder…

john


#20

That is the one I re-named.

It actually only has the stock plugins in it plus one custom plugin loader script that tells SU to also look in my local folder. This is a work around to the idea that you can’t tell SU where you want your plugin folder located and I want to share the same scripts at home/work which are synced via dropbox.

Long story short, I should only have to re-name that one I believe… unless you know otherwise?