Rails 2.3.5 - Cannot install plugin

I'm always get the message "Plugin not found: ["git://github.com/ aaronchi/jrails.git"]" when trying to install a rails plugin, even for SVN or GIT. After google search, some people suggest that replace "git://" with "http://" and add "/" at the end of the url. I tried and it still does not work.

I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and it show the message "#<Errno::ENOENT: No such file or directory - /dev/

". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google

search a lot and still not know how to fix. Please help!

Thanks!

I’m always get the message "Plugin not found: ["git://[github.com/

aaronchi/jrails.git](http://github.com/ aaronchi/jrails.git)“]” when trying to install a rails plugin, even for

SVN or GIT. After google search, some people suggest that replace

“git://” with “http://” and add “/” at the end of the url. I tried and

it still does not work.

I used the ruby 1.9.1-p243 and rails 2.3.5. I run in verbose mode and

it show the message "#<Errno::ENOENT: No such file or directory - /dev/

". Does it an issue of ruby 1.9.1 in rails 2.3.5? I do google

search a lot and still not know how to fix. Please help!

Thanks!

Hi, what’s the exact command you’re using to install the plugin?

-Conrad

Hi Conrad,

Here is the command I used:

ruby script/plugin install git://github.com/aaronchi/jrails.git

I’m using windows XP to develop.

Thanks!

That would explain it. /dev/null is a Unix feature. It’s possible the plugin install feature lost Windows support in 2.3.5 by hardcoding /dev/null. The vast majority of Rails developers are on Macs or Linux, so I can’t say I’m surprised. You might be able to work around it by adding an empty file at c:\dev\null, though since I don’t develop on Windows, I can’t say for sure.

Niels

Thanks Niels, I created dump folder dev/null at C drive and the problem still occur. I found a way to work around to install plugin that just copy the plugin to the vendor folder. Any plugins that have the install hook code can be call through rake task.

Thanks again!

Hoang, I would highly recommend filing a ticket against the plugin and I feel that it would be the best course of action. Thus, you can file a ticket at the following:

http://github.com/aaronchi/jrails/issues

Also, have you tried installing the Ruby gem? If not, I would give that a shot by doing the following:

gem install jrails

Good luck,

-Conrad

The most likely culprit for this is silence_stream in ActiveSupport, which redirects a given stream to "nowhere" for the duration of its block. It appears that the platform check there isn't correctly detecting that you're on Windows.

Can you post the value of RUBY_PLATFORM returned on your machine (just start up an irb or a script/console and type it in)?

--Matt Jones

Conrad, this issue appear for all the plugins not only for jrails! I can install the gem without any problems but the plugin.

Matt, here is my environment in windows:

About your application’s environment Ruby version 1.9.1 (i386-mingw32) RubyGems version 1.3.5 Rack version 1.0 Rails version 2.3.5 Active Record version 2.3.5 Active Resource version 2.3.5 Action Mailer version 2.3.5 Active Support version 2.3.5 Application root D:/Project-home/trial Environment development Database adapter mysql Database schema version 20091201083056

Thanks for the reply!

Also, here is the RUBY_PLATFORM value : i386-mingw32. I used the installer package from http://rubyinstaller.org/download.html to install the ruby 1.9.1. I notice that the old ruby 1.8.7 I used refer to i386-mswin32 and the ‘mingw32’ look like does not detect that I’m on the Windows platform.

MinGW is supposed to provide a "Unix-like" compatibility layer so that things (like there not being a file /dev/null) don't cause problems on Windows. Looks like something's not working on your setup - you may want to try the rubyinstaller mailing list.

--Matt Jones

Thanks Matt !!!

OK...Fix is easy.

Replace All occurences of /dev/null in all files in your ruby directory with C:\\NUL.

:wink:

Easy Fix:

replace all occurences of /dev/null with c:\\NUL in all .rb file in your ruby directory

:wink: