This project is archived and is in readonly mode.

#3921 ✓resolved
Patrick Daryll Glandien

ActiveSupport only recognizes Visual Studio

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

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')

Comments and changes to this ticket

  • Fredrik Henne

    Fredrik Henne February 10th, 2010 @ 01:44 PM

    • 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.

  • cuzic4n

    cuzic4n March 6th, 2010 @ 12:14 AM

    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

  • Yehuda Katz (wycats)

    Yehuda Katz (wycats) March 27th, 2010 @ 11:34 AM

    • State changed from “new” to “resolved”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages