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

**URL:** <https://www.ruby-forum.com/t/is-command-line-tool-curl-actually-provided-by-ruby-on-rai/115323>\
**Category:** Rails\
**Created:** [September 23, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/is-command-line-tool-curl-actually-provided-by-ruby-on-rai/115323 "2007-09-23T22:23:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rupertrealbear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rupertrealbear](https://www.ruby-forum.com/u/rupertrealbear)\
**Post date:** [September 23, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/is-command-line-tool-curl-actually-provided-by-ruby-on-rai/115323/1 "2007-09-23T22:23:26Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![rupertrealbear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rupertrealbear](https://www.ruby-forum.com/u/rupertrealbear)\
**Post date:** [September 23, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/is-command-line-tool-curl-actually-provided-by-ruby-on-rai/115323/2 "2007-09-23T22:32:27Z")

</div>

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/](http://curl.haxx.se/)

Comes bundled with Mac OS X and some Linux distributions.

-faisal

---

<div class="post-metadata">

**Author:** ![rupertrealbear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rupertrealbear](https://www.ruby-forum.com/u/rupertrealbear)\
**Post date:** [September 23, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/is-command-line-tool-curl-actually-provided-by-ruby-on-rai/115323/3 "2007-09-23T23:58:51Z")

</div>

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  
[cURL for Windows | FileForum](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

---

<div class="post-metadata">

**Author:** ![rupertrealbear](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e8c25b/32.png) [@rupertrealbear](https://www.ruby-forum.com/u/rupertrealbear)\
**Post date:** [September 24, 2007, 12:44am UTC](https://www.ruby-forum.com/t/is-command-line-tool-curl-actually-provided-by-ruby-on-rai/115323/4 "2007-09-24T00:44:54Z")

</div>

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](http://www.jay.fm) | - Kristoffer
