Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

[Patch] Can't install plug in on Windows

#4320

When trying to install a plug in on Windows I've got this error:

c:\projecx\> ruby script/plugin --verbose install http://github.com/rails/rails_xss.git/
Plugin not found: ["http://github.com/rails/rails_xss.git/"]
#<Errno::EACCES: Permission denied - /dev/null>

This really happens because /dev/null doesn't exist on Windows. I fixed it by creating c:\dev\null :) I think it would be great if you don't generate commands that pipe to /dev/null. Maybe not getting the output to the terminal can be solved on Ruby code, or at any rate, in Windows, I'd rather not have the output redirected to /dev/null than have the install fail.

I forgot which line was this in, but it shouldn't be so hard to find: grep -R "> /dev/null"

Reported by pupeno@pupeno.com · April 3rd, 2010 @ 05:52 PM

State: resolved
Milestone: none
Assigned to: José Valim José Valim
Importance: Medium

Activity

  1. Anil Wadghule
    Anil Wadghule

    Attached the patch for the issue. Basically fixed regex to determine Windows environment and made consistent with other uses. This patch is against 2-3-stable branch. Can somebody change milestone of this ticket to 2.3.6?

    April 8th, 2010 @ 05:10 PM

  2. Anil Wadghule
  3. Anil Wadghule
    Anil Wadghule
    • Title changed from Can't install plug in on Windows to [Patch] Can't install plug in on Windows

    April 8th, 2010 @ 05:43 PM

  4. José Valim
    José Valim
    • State changed from new to open
    • Assigned user set to José Valim

    Could you please check if this is also broken in Rails 3.0?

    April 10th, 2010 @ 12:33 PM

  5. Anil Wadghule
    Anil Wadghule

    The above issue does not exist for Rails 3 on Windows machine. See this pastie http://pastie.org/912838.

    This patch is created against 2-3-stable repository of Rails.

    I have created separate ticket with patch for Rails 3 (for consistent usage of RUBY_PLATFORM regex for Windows). #4345 [Patch] Make RUBY_PLATFORM windows regex consistent. But that patch is not related to the current issue.

    April 10th, 2010 @ 04:03 PM

  6. Anil Wadghule
    Anil Wadghule
    • Tag changed from git, install, plugin, script, windows to git, install, patch, plugin, script, windows

    April 11th, 2010 @ 07:20 PM

  7. Repository
    Repository
    • State changed from open to resolved

    April 12th, 2010 @ 10:13 AM

  8. José Valim
    José Valim

    Thanks Anil, I just applied both patches!
    I'm sure the Rails community using Windows appreciate your efforts!

    April 12th, 2010 @ 10:14 AM