Is command line tool "curl" actually provided by Ruby on Rai

I tried using the command line tool “curl” in a Ruby console window
and got the message:-

‘curl’ is not recognized as an internal or external command, operable
program or batch file

The same thing happened in an ordinary “dos” window (calling the curl
from the ruby application’s folder).

I can’t find “curl” anywhere in any Ruby-related documentation. There
is a cURL website where I could ask about this but I thought I should
ask here first. I am following along with “Agile Web Developement with
Rails” where I have set up a REST-style interface to generate an XML
feed from the application using an rxml template. My curl looks like:-

curl http://localhost:3000/info/who_bought/1

I added my little issue with the Report Erratum and so far no-one has
responded.

Does anyone know what’s happeing here

On Sep 23, 2007, at 4:22 PM, rupertrealbear wrote:

‘curl’ is not recognized as an internal or external command, operable
program or batch file

http://curl.haxx.se/

Comes bundled with Mac OS X and some Linux distributions.

-faisal

rupertrealbear wrote:

I tried using the command line tool “curl” in a Ruby console window
and got the message:-

‘curl’ is not recognized as an internal or external command, operable
program or batch file

The same thing happened in an ordinary “dos” window (calling the curl
from the ruby application’s folder).

curl (and its friend wget) are from unix-land – they have nothing to do
with Ruby; they’re command-line tools that will get a web page. This
can be vary useful for getting behind the covers of what’s happening in
a web request. There may be a “straight” DOS/Windows version available
(see for example
http://fileforum.betanews.com/detail/cURL_for_Windows/966899018/1).

I am sure you can also get these as part of the Cygwin package. Cygwin
is a kind of unix/linux that actually runs within Windows. It may be
worth checking this out, because even though Ruby/Rails run in Windows,
its “heritage” is pretty unixy. Unix may be something worth getting a
little familiar with, and Cygwin is an impressive attempt to do unix on
Windows.

Tom

On Sun, 23 Sep 2007 16:31:58 -0400, Faisal N Jawdat wrote:

Comes bundled with Mac OS X and some Linux distributions.

Yep. If you’re going to do Rails on Windows, you may want to look into
“cygwin” - it provides many of the basic command-line tools that are
present in UNIX/Linux.

On the other hand, it can be confusing, because it’s a whole environment
unto itself. So you may end up with two versions of ruby (one in
Windows,
one in cygwin), two sets of gem libraries, etc. etc.


Jay L. |
Boston, MA | My character doesn’t like it when they
Faster: jay at jay dot fm | cry or shout or hit.
http://www.jay.fm | - Kristoffer

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs