sketchucation logo sketchucation
    • 登入
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update

    Ruby Version for Sketchup 8.0 M1 on Mac ??

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    41 貼文 6 Posters 4.3k 瀏覽 6 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Dan RathbunD 離線
      Dan Rathbun
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • jeff hammondJ 離線
        jeff hammond
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • Dan RathbunD 離線
          Dan Rathbun
          最後由 編輯

          @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 條回覆 最後回覆 回覆 引用 0
          • Dan RathbunD 離線
            Dan Rathbun
            最後由 編輯

            @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 條回覆 最後回覆 回覆 引用 0
            • jeff hammondJ 離線
              jeff hammond
              最後由 編輯

              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 條回覆 最後回覆 回覆 引用 0
              • Dan RathbunD 離線
                Dan Rathbun
                最後由 編輯

                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 條回覆 最後回覆 回覆 引用 0
                • D 離線
                  driven
                  最後由 編輯

                  %(#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 條回覆 最後回覆 回覆 引用 0
                  • thomthomT 離線
                    thomthom
                    最後由 編輯

                    @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 條回覆 最後回覆 回覆 引用 0
                    • D 離線
                      driven
                      最後由 編輯

                      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 條回覆 最後回覆 回覆 引用 0
                      • D 離線
                        driven
                        最後由 編輯

                        @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 條回覆 最後回覆 回覆 引用 0
                        • jeff hammondJ 離線
                          jeff hammond
                          最後由 編輯

                          @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 條回覆 最後回覆 回覆 引用 0
                          • Dan RathbunD 離線
                            Dan Rathbun
                            最後由 編輯

                            @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 條回覆 最後回覆 回覆 引用 0
                            • Dan RathbunD 離線
                              Dan Rathbun
                              最後由 編輯

                              @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 條回覆 最後回覆 回覆 引用 0
                              • Dan RathbunD 離線
                                Dan Rathbun
                                最後由 編輯

                                @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 條回覆 最後回覆 回覆 引用 0
                                • W 離線
                                  wdbao
                                  最後由 編輯

                                  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 條回覆 最後回覆 回覆 引用 0
                                  • Dan RathbunD 離線
                                    Dan Rathbun
                                    最後由 編輯

                                    @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 條回覆 最後回覆 回覆 引用 0
                                    • W 離線
                                      wdbao
                                      最後由 編輯

                                      @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 條回覆 最後回覆 回覆 引用 0
                                      • S 離線
                                        slbaumgartner
                                        最後由 編輯

                                        @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 條回覆 最後回覆 回覆 引用 0
                                        • D 離線
                                          driven
                                          最後由 編輯

                                          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 條回覆 最後回覆 回覆 引用 0
                                          • Dan RathbunD 離線
                                            Dan Rathbun
                                            最後由 編輯

                                            @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 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement