Aptana Studio
  1. Aptana Studio
  2. APSTUD-3718

PATH values incorrect if cygwin shell is used

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: Aptana Studio 3.0.4
    • Component/s: validation
    • Labels:
      None
    • Environment:

      Windows XP current service packs and patches
      Ruby 1.9.2 installed to c:\ruby192\bin

      Description

      After creating a project and loading a source file, attempting a RUN gives the "Unable to find a Ruby executable" message.

      It is not clear where the appropriate setting is (clarification should be included in the pop-up message).

        Issue Links

          Activity

          Hide
          Chris Williams added a comment -

          Looks like this is a general case problem where we search PATH for executables/binaries on Windows. Our code assumes a very simple path conversion, which works OK for some MinGW paths, but doesn't work for "/cygrive/c/" type Cygwin paths.

          The true fix here would be to sniff MinGW versus cygwin and for cygwin use cygpath to convert. For MinGW we may need to generate some binary that gets the PATh sent to it since MinGW doesn't offer an equivalent of cygpath, but is supposed to convert and send Windows paths to windows binaries.

          Show
          Chris Williams added a comment - Looks like this is a general case problem where we search PATH for executables/binaries on Windows. Our code assumes a very simple path conversion, which works OK for some MinGW paths, but doesn't work for "/cygrive/c/" type Cygwin paths. The true fix here would be to sniff MinGW versus cygwin and for cygwin use cygpath to convert. For MinGW we may need to generate some binary that gets the PATh sent to it since MinGW doesn't offer an equivalent of cygpath, but is supposed to convert and send Windows paths to windows binaries.
          Hide
          Chris Williams added a comment -

          Pushed bugfix and a unit test to 'development' and 'release' branches.

          Show
          Chris Williams added a comment - Pushed bugfix and a unit test to 'development' and 'release' branches.
          Hide
          Ingo Muschenetz added a comment -

          The issue here was that we had a PATH value in windows format and we're assuming it came from the shell environment and needed to be converted from POSIX to windows. The fix is to sniff to see if the path contains ';' and if so assume it's already in windows format and just return it as-is. The prior fix was to handle cygwin style POSIX path conversions, since we only handled mingw style POSIX paths.

          The three important scenarios to test are (on Windows):

          • Having cygwin installed and its bin dir on the PATH, with git installed
          • Having RailsInstaller installed and the packaged git's bin dir on the PATH
          • Using the pre-packaged msysgit we offer up (when we can't find git).

          The issue should be exclusive to windows, so no need to test this scenario specifically on OS X or Linux (but confirm git still works as part of general acceptance tests)

          Show
          Ingo Muschenetz added a comment - The issue here was that we had a PATH value in windows format and we're assuming it came from the shell environment and needed to be converted from POSIX to windows. The fix is to sniff to see if the path contains ';' and if so assume it's already in windows format and just return it as-is. The prior fix was to handle cygwin style POSIX path conversions, since we only handled mingw style POSIX paths. The three important scenarios to test are (on Windows): Having cygwin installed and its bin dir on the PATH, with git installed Having RailsInstaller installed and the packaged git's bin dir on the PATH Using the pre-packaged msysgit we offer up (when we can't find git). The issue should be exclusive to windows, so no need to test this scenario specifically on OS X or Linux (but confirm git still works as part of general acceptance tests)
          Hide
          Chris Williams added a comment -

          The fix for Ingo's comment is on both development and release, waiting to build right now.

          Show
          Chris Williams added a comment - The fix for Ingo's comment is on both development and release, waiting to build right now.
          Hide
          Clayton Headley (Inactive) added a comment -

          Verified fixed using build: 2.0.0.201203211914. Closing ticket.

          Show
          Clayton Headley (Inactive) added a comment - Verified fixed using build: 2.0.0.201203211914. Closing ticket.

            People

            • Assignee:
              Chris Williams
              Reporter:
              ittay dror
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: