2 Replies Latest reply on Mar 18, 2015 1:59 AM by Brandt Wijbenga

    Listing available drives for windows

    Brandt Wijbenga



      We're trying to add some minor file browsing capabilities to our app. This works nicely using the native ruby File/Dir operations.

      As an extra, for a windows desktop build we want to add another layer that lists all available drives. This should be possible by using the 'win32ole' library:


      Example snippet:

      require 'win32ole'
      def get_drives_listing
        result = []
        WIN32OLE.new( "Scripting.FileSystemObject" ).Drives.each do |drive|
          result << { :fullpath => drive.Path } if drive.IsReady


      However, this library is not included when deploying the app, so attempting to run it after adding "require 'win32ole'" doesn't work.

      Is there any way to include this properly? Or might there be a default Rho layer/directive to achieve this? (We're currently running Rho version 4.1.27)


      Any help would be appreciated.