sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    File.copy() not working?

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 4 Posters 406 Views 4 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.
    • M Offline
      Matt666
      last edited by

      Hi Thomthom !

      File.methods.sort
      

      I don't see any move or copy method...

      Frenglish at its best !
      My scripts

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

        I'm trying to search the web for this, I find some palces which mentions that you have to do

        require 'ftools'
        

        But that doesn't work either...

        This really has gotten me stomped. Might have to sort to .bat files, but I really don't understand this...

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

        1 Reply Last reply Reply Quote 0
        • T Offline
          todd burch
          last edited by

          ftools looks like something you have to download, as in, an add-on Library to Ruby.

          1 Reply Last reply Reply Quote 0
          • M Offline
            Matt666
            last edited by

            I found this file 'ftools' below... And it seems to work well...
            Do you have also this file? There are many 'ftools' files on the web!


            ftools.rb

            Frenglish at its best !
            My scripts

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

              Don't have ftools anywhere on my system.

              So I need to include this with my plugin in order to make it work?
              Is SU's implementation of Ruby partial?

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

              1 Reply Last reply Reply Quote 0
              • T Offline
                todd burch
                last edited by

                Google does not ship a full install of Ruby with SketchUp. Therefore, if you choose a Library or external package that is not included with Google's distribution, you get to do several things:

                1. Make sure you conform to any licensing requirements for what you distribute
                2. Make sure you make users of aware if there are any platform differences
                3. Test the package you obtain with the releases of Ruby that are shipped with SketchUp (different for Mac and PC)
                4. And, the obvious, package and handle the install of your script and its resources in a manner you feel is appropriate.

                Have fun!

                1 Reply Last reply Reply Quote 0
                • Chris FullmerC Offline
                  Chris Fullmer
                  last edited by

                  Is there a reason SU doesn't ship with the full version of Ruby included? How does one know what is or is not included?

                  Chris <trying to wrap my head around this 'ruby built into SU' concept and I think I'm getting closer.....maybe)

                  Lately you've been tan, suspicious for the winter.
                  All my Plugins I've written

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

                    @unknownuser said:

                    Google does not ship a full install of Ruby with SketchUp. Therefore, if you choose a Library or external package that is not included with Google's distribution, you get to do several things:

                    1. Make sure you conform to any licensing requirements for what you distribute
                    2. Make sure you make users of aware if there are any platform differences
                    3. Test the package you obtain with the releases of Ruby that are shipped with SketchUp (different for Mac and PC)
                    4. And, the obvious, package and handle the install of your script and its resources in a manner you feel is appropriate.

                    Have fun!

                    That's interesting. Wasn't aware that SU's ruby was that different. I've used this site; http://www.ruby-doc.org/ for my Ruby references. Thanks for the head up.

                    1:
                    Regarding this ftools; from what I gather from this page: http://www.ruby-doc.org/stdlib/libdoc/ftools/rdoc/files/ftools_rb.html
                    there shouldn't be a problem for me to include ftools with my plugin?

                    2: Platform differences? as in host OS? or host application?

                    3: As for this specific plugin it's a tool to accompany V-Ray for SketchUp which is Windows only, so I can skip the Mac testing. πŸ˜„
                    But does Ruby on Mac behave differently? I've tested a couple of plugins for other here on this forum on my Mac Mini and there appear to be some oddities occasionally.

                    4: The way I do it now is have one .rb file in the plugin root, then add supporting file to a subfolder where as I put both of them into a .zip when I distribute. Is another method prefered?

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

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

                      @chris fullmer said:

                      Is there a reason SU doesn't ship with the full version of Ruby included? How does one know what is or is not included?

                      Chris <trying to wrap my head around this 'ruby built into SU' concept and I think I'm getting closer.....maybe)

                      Good question. I'm coming from a JS, VBS and PHP background, still getting used to this Ruby thing. Or at least SU-Ruby...

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

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        todd burch
                        last edited by

                        I figured it out by downloading the full ruby install, so I could learn and use Ruby outside of SU (and follow existing tutorials), and after seeing what it expanded to, it was obvious that the full install doesn't come with SketchUp.

                        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