sketchucation logo sketchucation
    • Login
    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!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    File.dirname(__FILE__) returns nil?

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 3 Posters 901 Views 3 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.
    • W Offline
      Whaat
      last edited by

      Thread title says the problem. I received a support email and it seems as though this code is returning nil on his system. Has anyone experienced this and figured out why?

      Thanks.

      SketchUp Plugins for Professionals

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Is it inside a compiled rbs file or a rb file.
        If it's used inside a rbs it might refer to the wrong 'variable', as its not then specific to that loading file.
        What is the exact context ?

        TIG

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

          @tig said:

          Is it inside a compiled rbs file or a rb file.
          If it's used inside a rbs it might refer to the wrong 'variable', as its not then specific to that loading file.
          What is the exact context ?

          It's in an RB file (I believe you have it πŸ˜„ ) that is located in the plugins/sketchuv folder:

          The code inside the file is:

          Sketchup.load(File.join(File.dirname(__FILE__),"sketchuv.rbs"))
          

          and the user is getting this error when SketchUp loads:

          Error Loading File sketchuv_load.rb
          (eval):3076:in `join': can't convert nil into String

          I have since found out that the user is using SU8.1 and OSX 10 (not too helpful info)

          SketchUp Plugins for Professionals

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

            I don't think that is the line with the error.

            Check in "sketchuv.rbs", around line 3075 (give or take a few lines,) for a join statement.

            You need to note the line number, in the file that loads "sketchuv_load.rb" add 1 (for the 1 line in "sketchuv_load.rb",) then subtract that number of lines from the 3076 reported in the Sketchup.load error. That will give you a better idea of the number of lines into the rbs file, where the error should be.

            I'm not here much anymore.

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

              Weird, now the user says the problem is not occurring anymore without any explanation. Lovely! πŸ˜’

              Sorry for wasting your time Dan,TiG. Thanks for the help!

              SketchUp Plugins for Professionals

              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