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.

ActiveSupport only recognizes Visual Studio

#3921

When I tried to use "script/plugin install ..." with Rails 2.3.5 I stumbled upon a rather interesting problem, because I always got the error "Plugin not found [...]".
After digging deeper into the rails source, I found that in /vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb on line 38 the platform is being checked for Visual Studio, however not for mingw:

stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')

This results in rails trying to write to /dev/null on Windows which is obviously not possible.
I am using the Ruby version from http://rubyinstaller.org/ which compiles with mingw.
Checking the platform that ruby runs on by looking if mswin is contained in RUBY_PLATFORM is not sufficient.
Thus I suggest this as a temporary fix:

stream.reopen(RUBY_PLATFORM =~ /(mswin|mingw)/ ? 'NUL:' : '/dev/null')

Reported by Patrick Daryll Glandien · February 10th, 2010 @ 01:01 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Fredrik Henne
    Fredrik Henne
    • Tag changed from activesupport, mingw, windows to rails 2.3.5, rails 3.0 beta, activesupport, mingw, windows

    Reproducable
    Rails 3.0.0Beta
    Ruby 1.8.7 MinGW from Rubyinstaller

    Had the same problem last night when trying to use plugins from Github with the new "rails plugin install"-command.

    February 10th, 2010 @ 01:44 PM

  2. cuzic4n
    cuzic4n

    had same problem on vista no matter the plugin... Using MINGW32 for running commands.. or rubymine which leverages mingw as well
    ~/gitrepo/test $ script/plugin install git://github.com//.git Plugin not found: ["git://github.com//.git"]

    run script/plugin -v install... and you'll get..
    "#<Errno::ENOENT: No such file or directory - /dev/null>"

    $ ruby -v ruby 1.8.7 (2010-01-10 patchlevel 249) [i386-mingw32]

    $ rails -v Rails 2.3.5

    added the (mswin|mingw) and script/plugin install worked

    another work around is git clone the plugin.. then if the plugin has install hooks.. run rake install task if there is one
    or $script/runner vendor/plugins//install.rb

    March 6th, 2010 @ 12:14 AM

  3. Yehuda Katz (wycats)
    Yehuda Katz (wycats)
    • State changed from new to resolved

    March 27th, 2010 @ 11:34 AM