• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Ruby Console Ruby Console

Scheduled Pinned Locked Moved Developers' Forum
19 Posts 7 Posters 2.7k Views 7 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    SchreiberBike
    last edited by 4 Mar 2008, 22:41

    Under my Windows pull down menu, the last item is "Ruby Console". Just above that is "Ruby Console".

    Does everyone have this embarrassment of riches? I don't think they've both aways been there, but I don't know when the 2nd one appeared. It's not a problem, but it's odd.

    1 Reply Last reply Reply Quote 0
    • G Offline
      Gaieus
      last edited by 4 Mar 2008, 23:07

      I used have the same. Some ruby puts it there (maybe just because when upgrading to SU5 I just copied most of my old stuff to SU6). I cannot remember the solution but some ruby scripter enlightened me, poor erthly mortal what to do and I got rid of it (not as if it had bothered me either - I was just curious, too).

      Gai...

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by 4 Mar 2008, 23:08

        If you have a sketchup.rb in /Plugins, get rid of it. It's only supposed to be in /Tools.

        Todd

        1 Reply Last reply Reply Quote 0
        • G Offline
          Gaieus
          last edited by 4 Mar 2008, 23:10

          Ah, that's it. Thanks, Todd.

          Gai...

          1 Reply Last reply Reply Quote 0
          • J Offline
            juju
            last edited by 20 Mar 2008, 15:49

            I have the same problem (2x ruby console entries below each other), however I don't have a sketchup.rb file in the plugins folder.

            Save the Earth, it's the only planet with chocolate.

            1 Reply Last reply Reply Quote 0
            • T Offline
              todd burch
              last edited by 20 Mar 2008, 15:52

              There's another script out there that is errant.

              It issues a "sendAction" to display the console, just as if you clicked on the dropdown choice. Search you plugins folder for any script that mentions "console" and you'll probably find it.

              Once you find it, show us the code and we'll tell you how to comment it out.

              Todd

              1 Reply Last reply Reply Quote 0
              • S Offline
                SchreiberBike
                last edited by 20 Mar 2008, 22:46

                I haven't been able to work it out yet. It's a small problem, so I haven't chased it too hard, but I tried your suggestions and didn't have any luck.

                There's no extra sketchup.rb in Plugins.

                I searched for "console" and found it in the comments of Examples.rb, utilitietools.rb and
                examplescripts.rb.

                The ruby sketchup.rb has the word console as part of
                @unknownuser said:

                if( not file_loaded? "sketchup.rb" )

                Add a choice to the Window menu to display the Ruby console

                add_separator_to_menu("Window")
                UI.menu("Window").add_item($suStrings.GetString("Ruby Console")) do
                Sketchup.send_action("showRubyPanel:")
                end

                and

                @unknownuser said:

                require 'langhandler.rb'
                $suStrings = LanguageHandler.new("gettingstarted.strings")
                console

                This file defines a number of useful utilities that are used by other

                Ruby scripts.

                Do you think it could be one of those?

                1 Reply Last reply Reply Quote 0
                • T Offline
                  TIG Moderator
                  last edited by 20 Mar 2008, 23:12

                  Search for "showRubyPanel" in Plugins and Tools folders...

                  It's that name that's called. I accidentally left a call in ComponentReporter.rb about three years ago but all subsequent versions were fixed... Maybe it's something like that ?

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    todd burch
                    last edited by 20 Mar 2008, 23:22

                    Thanks TIG. I was working from failing memory.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      SchreiberBike
                      last edited by 21 Mar 2008, 04:39

                      Still not seeing single 🤓 (closest I could find to an emoticon seeing double)

                      In SketchyPhysics, I found

                      @unknownuser said:

                      if( not file_loaded?("SketchyPhysics.rb") )
                      #result = Sketchup.send_action "showRubyPanel:"

                      reload()
                      end

                      but deleting that file and other references to SketchyPhysics didn't make any change.

                      I did find it in sketchup.rb in the tools directory

                      @unknownuser said:

                      Add some Ruby specific menu items

                      if( not file_loaded? "sketchup.rb" )

                      Add a choice to the Window menu to display the Ruby console

                      add_separator_to_menu("Window")
                      UI.menu("Window").add_item($suStrings.GetString("Ruby Console")) do
                      Sketchup.send_action("showRubyPanel:")
                      end

                      Commenting that out got rid of both copies, but I do want one of them.

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        todd burch
                        last edited by 21 Mar 2008, 10:15

                        AHA! Perhaps you have a script that performs a LOAD of sketchup.rb instead of requiring it. Now search for "sketchup.rb" (a case insensitive search) and see what you come up with.

                        FYI - Any line of Ruby code that starts with a hash sign ("#") is a comment.

                        Todd

                        1 Reply Last reply Reply Quote 0
                        • S Offline
                          SchreiberBike
                          last edited by 22 Mar 2008, 21:33

                          Still no luck. The only references to sketchup.rb are Require, except in the file sketchup.rb itself.

                          It's not bothering me much, but if I have time to spare, I'll uninstall SU and the rubys, then reinstall them and watch to see if and when the 2nd "ruby console" reappears.

                          1 Reply Last reply Reply Quote 0
                          • G Offline
                            Gaieus
                            last edited by 22 Mar 2008, 21:38

                            John,

                            Do you have the sketchup.rb in your plugins folder? And what's the file size?

                            Gai...

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              todd burch
                              last edited by 22 Mar 2008, 21:54

                              If you want, and you won't be breaking any licensing agreements, zip up up your /plugins folder and send it to me and I'll figure it out.

                              Todd

                              1 Reply Last reply Reply Quote 0
                              • S Offline
                                SchreiberBike
                                last edited by 22 Mar 2008, 22:21

                                Gaieus, The only sketchup.rb I've got is in the /tools folder. It's 4K.

                                Todd, I'll live with it for now, unless it's making you curious, then I'll send it to you for you to play with.

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  Jim
                                  last edited by 23 Mar 2008, 01:27

                                  It's making me curious.

                                  Hi

                                  1 Reply Last reply Reply Quote 0
                                  • R Offline
                                    ryan_allan
                                    last edited by 13 Apr 2008, 22:12

                                    Jim,

                                    I'd like to say this is a Sketchup bug. I loaded Sketchup with an empty plugins folder, punched "require 'Sketchup.rb'" into the console window, and instantly had the second Ruby Console on the menu.

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      todd burch
                                      last edited by 14 Apr 2008, 03:00

                                      Ryan, that's because you typed "Sketchup.rb" with a capital "S". sketchup.rb does not perform a case insensitive compare when comparing script names. This has worked this way since June 2004, and was reported at least 2 years ago to @Last / Google, and a workaround even given too.

                                      Todd

                                      1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        ryan_allan
                                        last edited by 17 Apr 2008, 01:55

                                        Well, sorry for replicating an already known bug... on the upside, now I fixed the same bug in my own code. Thanks Todd!

                                        1 Reply Last reply Reply Quote 0
                                        • 1 / 1
                                        • First post
                                          Last post
                                        Buy SketchPlus
                                        Buy SUbD
                                        Buy WrapR
                                        Buy eBook
                                        Buy Modelur
                                        Buy Vertex Tools
                                        Buy SketchCuisine
                                        Buy FormFonts

                                        Advertisement