sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Ruby Version for Sketchup 8.0 M1 on Mac ??

    Scheduled Pinned Locked Moved Developers' Forum
    41 Posts 6 Posters 3.6k Views 6 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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      What is the Ruby Version for Sketchup 8.0 M1 on Mac ??

      RUBY_VERSION

      RUBY_RELEASE_DATE

      RUBY_PATCHLEVEL
      .

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • jeff hammondJ Offline
        jeff hammond
        last edited by

        i don't think ruby comes with sketchup as it's part of os x but...

        1.8.5
        2006-08-25

        (RUBY_PATCHLEVEL gives an error)

        dotdotdot

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @unknownuser said:

          1.8.5
          2006-08-25

          (RUBY_PATCHLEVEL gives an error)

          because Sketchup is loading 1.8.5 initial (p0)

          The RUBY_PATCHLEVEL constant was introduced in p12.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • Dan RathbunD Offline
            Dan Rathbun
            last edited by

            @unknownuser said:

            i don't think ruby comes with sketchup as it's part of os x but...

            I know OSX comes with Ruby, but what version & patchlevel ?

            Can you open a bash shell and start Ruby or IRB and enter the constants again, please?

            I'm not here much anymore.

            1 Reply Last reply Reply Quote 0
            • jeff hammondJ Offline
              jeff hammond
              last edited by

              that's pretty much chinese to me (and i speak/read zero chinese).. but if i type ruby -v in terminal i get:

              ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

              (the earlier 1.8.5 output was given to me when typing the constants in the su ruby window)

              dotdotdot

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                Thanks Jeff ... that'll do.

                It shows that Sketchup is loading it's own copy of the Ruby interpreter (which is obsolete, by the way. The entire 1.8.5 branch has been "retired" and is no longer being updated.) SU Mac still is running the initial release of a dead Ruby branch!

                There is a symbolic link in the SU app folders (somewhere,) pointing at the old Ruby in the Ruby.Frameworks/Versions/A

                I don't have a Mac.. but there must be a way for you guys to point that link at your up to date "system" Ruby.

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by

                  %(#0040FF)[...$ ruby -v
                  ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]]
                  and on OSX 10.5.8, I've got a different version to Jeff

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    @driven said:

                    %(#0040FF)[...$ ruby -v
                    ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]]
                    and on OSX 10.5.8, I've got a different version to Jeff

                    Did you do that from SketchUp's ruby console, or from OSX's command console?

                    Thomas Thomassen β€” SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      driven
                      last edited by

                      Terminal,

                      trying to work out how to point SU at that one at least...

                      what version is used on PC SU now?

                      learn from the mistakes of others, you may not live long enough to make them all yourself...

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        driven
                        last edited by

                        @dan rathbun said:

                        I don't have a Mac.. but there must be a way for you guys to point that link at your up to date "system" Ruby.

                        the path to version 8.5

                        /Applications/Google\ SketchUp\ 8/SketchUp.app/Contents/Frameworks/Ruby.framework/Versions/A/Ruby

                        but how to point it to system version??

                        learn from the mistakes of others, you may not live long enough to make them all yourself...

                        1 Reply Last reply Reply Quote 0
                        • jeff hammondJ Offline
                          jeff hammond
                          last edited by

                          @driven said:

                          %(#0040FF)[...$ ruby -v
                          ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]]
                          and on OSX 10.5.8, I've got a different version to Jeff

                          I recently updated everything to snow leopard so I guess apple has the latest ruby in there.

                          dotdotdot

                          1 Reply Last reply Reply Quote 0
                          • Dan RathbunD Offline
                            Dan Rathbun
                            last edited by

                            @unknownuser said:

                            @driven said:

                            I recently updated everything to snow leopard so I guess apple has the latest ruby in there.

                            Another question for Apple MRI Ruby .. how does a Mac owner update there Ruby ?

                            Does their "system" Ruby come with RubyGems preinstalled ?
                            Or do they need to go to an Apple website to download a Ruby update?

                            I'm not here much anymore.

                            1 Reply Last reply Reply Quote 0
                            • Dan RathbunD Offline
                              Dan Rathbun
                              last edited by

                              @driven said:

                              @dan rathbun said:

                              I don't have a Mac.. but there must be a way for you guys to point that link at your up to date "system" Ruby.

                              the path to version 1.8.5

                              /Applications/Google\ SketchUp\ 8/SketchUp.app/Contents/Frameworks/Ruby.framework/Versions/A/Ruby

                              but how to point it to system version??

                              check the Apple Help website on using, creating and editing symbolic links.

                              If you figure out how to do it.. post a "How To" here at SCF.
                              (Suggest if possible to back up the old symbolic link, before changing it.)

                              I'm not here much anymore.

                              1 Reply Last reply Reply Quote 0
                              • Dan RathbunD Offline
                                Dan Rathbun
                                last edited by

                                @driven said:

                                what version is used on PC SU now?

                                Sketchup 8.0 M0 and M1 come "out-of-the-box" with v1.8.6-p287, but it is very easy to change that on PC by replacing the DLL (as long as it's in the 1.8 trunk.)

                                I'm not here much anymore.

                                1 Reply Last reply Reply Quote 0
                                • W Offline
                                  wdbao
                                  last edited by

                                  i want to extend the build_in sketchup interpreter too.
                                  from the release note post by google here http://cfcl.com/twiki/bin/view/Projects/SketchUp/RE_Library_Use
                                  Su 8.0 on pc has a 1.8.6 and a 1.8.5 on mac
                                  the new 8.0 M1 release note says nothing about the ruby version. so i assume it is still the same.
                                  here http://cfcl.com/twiki/bin/view/Projects/SketchUp/RE_Library_Use
                                  Main.RichMorin post sth interesting. He also try to extend ruby inside su to other parts of the library, gems, etc.
                                  it semms that he hasn't work it out yet.
                                  but it's worth a try.
                                  and i hope some gurus follow this path and somebody find a way eventually
                                  note that even on pc it is 1.8.6 all right, but it has very limited access to the standard library and gems.
                                  i try to use CSV class, but it fails.

                                  1 Reply Last reply Reply Quote 0
                                  • Dan RathbunD Offline
                                    Dan Rathbun
                                    last edited by

                                    @wdbao said:

                                    i try to use CSV class, but it fails.

                                    See this post: http://forums.sketchucation.com/viewtopic.php?f=180&t=34381&p=302974#p302974

                                    I'm not here much anymore.

                                    1 Reply Last reply Reply Quote 0
                                    • W Offline
                                      wdbao
                                      last edited by

                                      @dan rathbun said:

                                      @wdbao said:

                                      i try to use CSV class, but it fails.

                                      See this post: http://forums.sketchucation.com/viewtopic.php?f=180&t=34381&p=302974#p302974

                                      Thanks again! Dan!
                                      you are a very good helper. and fast.
                                      you have showed me this load path code before. i just couldn't understand it fully then. now with more ruby reading, it all make sense to me.
                                      it feels great to be in a such nice community.
                                      i will keep read on.

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        slbaumgartner
                                        last edited by

                                        @driven said:

                                        @dan rathbun said:

                                        I don't have a Mac.. but there must be a way for you guys to point that link at your up to date "system" Ruby.

                                        the path to version 8.5

                                        /Applications/Google\ SketchUp\ 8/SketchUp.app/Contents/Frameworks/Ruby.framework/Versions/A/Ruby

                                        but how to point it to system version??

                                        Not for the faint of heart, but here's how:

                                        • quit sketchup
                                        • open a terminal window
                                        • cd /Applications/Google\ SketchUp \8/SketchUp.app/Contents/Frameworks/Ruby.framework/Versions
                                        • sudo mv A A.orig
                                        • sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/1.8 A

                                        Restart SketchUp, open a Console window, and type VERSION. If all went well, it should report the same version as when you type ruby -e "puts VERSION" in a console window.

                                        To undo this hack, in the same Versions folder:

                                        • sudo rm A
                                        • sudo mv A.orig A
                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          driven
                                          last edited by

                                          Hi Steve,
                                          I run as an admin, but not root, I need sudo for anything outside user space.
                                          'Content' folders should have User read/write permissions, I thought.
                                          I also run multiple copies of SU, the path for this one differs from norm and yours. [that may be the splat]

                                          the other thing I have now added sleep 1 and a return before the cd / to reopen SU in both methods.

                                          I may have done blanket permission change using Sketchup.app >> right click >> more info and change for all enclosed files, but I don't think so... but that should work to avoid 'sudo'.
                                          alternatively do that to your 'User' folder after installing SU there?

                                          just using the bits needed for a restart seems handy as well.

                                          learn from the mistakes of others, you may not live long enough to make them all yourself...

                                          1 Reply Last reply Reply Quote 0
                                          • Dan RathbunD Offline
                                            Dan Rathbun
                                            last edited by

                                            @John: The global constant VERSION is deprecated because every class and module should have one that specifies it's version, but if the global is defined, it will get inherited into every class and module, and it's easy to assume the inherited one is a specific module version.

                                            Example at the console:
                                            module Dan; end %(#008000)[>> nil] Dan.module_eval("VERSION") %(#008000)[>> 1.8.6]

                                            Oh look, module Dan is version 1.8.6 ?

                                            Not really:
                                            Dan::VERSION %(#008000)[>> Error: #<NameError: (eval): uninitialized constant Dan::VERSION> (eval)]

                                            Use RUBY_VERSION instead. (As well as the other constants that are prefixed RUBY_ ... please.)


                                            @Steve: Please don't quote codeblocks. Besides wasting space (and SCF bandwidth,) it just clones errors, and the original poster of the code may make corrections to the code, which will not be propagated into your quote. (I wish the quote feature would auto-strip them and insert a link back to the quoted post.)

                                            (pssst... you can edit your post and delete the quoted code.)

                                            πŸ˜„

                                            I'm not here much anymore.

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

                                            Advertisement