Multi-line setting in Sketchup 2018 Ruby Console?

I started going through Ruby scripting examples here:
http://developer.sketchup.com/en/content/ruby-sketchup
Copying and pasting scripts from there into ruby console causes error, presumably because of multiple statements on a single line.

If I manually type each statement on a separate line, things work.
It looks like there used to be a ‘multiline’ option (as well as load and save options) in ruby console.
Those don’t seem to exist any more.
It would be nice if the ‘Getting Started’ examples actually worked via copy and paste with the current version of the Ruby Console, or there was a note somewhere explaining the issue.

it’s more likely line endings…

I believe Window’s Ruby Console wants CRLF, but mac wants unix LF…

john

Use CTRL+Enter to start a new line. Unfortunately you can only see two lines and the box to enter code is not resizable.

For this reason there have been several alternative Ruby consoles created that are available on SketchUp’s Extension Warehouse. They probably also display both typewriter (CR+LF) and software (LF) line endings correctly. If you want to do more Ruby scripting, but not yet use a full IDE, these might save you a lot of headaches.

Yes and your Ruby Console + is my favorite.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.