You are here

Installing Rails Plugins in Windows

If you are using RoR (Ruby on Rails) and Windows to develop you probably ran into this problem. You want to install a Plugin and use it in your application, so you find some tutorial or links anywhere on the big WWW and when you copy/paste the links they do not work and you get an error message telling you that this is not an executable file. Much like this:

C:\repository\ruby\project>script\plugin install git://github.com/dougal/daemon_generator.git
'script\plugin' is not recognized as an internal or external command, operable program or batch file.

Well it turns out that Windows is giving you the right message. The plugin script will only work if you are in a Linux-like environment.
To make it work in Windows, you gotta run it with the ruby interpreter command line. The command below should work for you (assuming your ruby executables are mapped into your path).

C:\repository\ruby\project>ruby script\plugin install git://github.com/dougal/daemon_generator.git
Initialized empty Git repository in C:/repository/ruby/urbano/vendor/plugins/daemon_generator/.git/
remote: Counting objects: 25, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 25 (delta 2), reused 20 (delta 1)
Unpacking objects: 100% (25/25), done.
From git://github.com/dougal/daemon_generator
 * branch            HEAD       -> FETCH_HEAD
Daemon Generator
================