[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Windows new user cheat sheet?

Tim Hunter

4/29/2007 9:49:00 PM

Just throwing this out there...

Periodically I am made aware that not all Windows users are familiar
with cmd.com and the Windows command line. It seems to me that it would
be very helpful if somebody who is familiar with Windows and Ruby would
put together a little "cheat sheet" of Windows things that new Ruby
users on Windows need to know.

For example, how to start a command window and what to do with it once
it's started. What directories are and how to manipulate them with
commands. Here I'm thinking of dir, mkdir, chdir, etc. (Might even need
a "cmd.com commands for beginners" section.) What a text editor is, why
you can't use Word to write Ruby code. How to run a Ruby program that's
been saved in a file.

I'm not really Windows-knowledgeable-enough to do this myself. You Ruby
& Windows users out there know better than I do what's useful. I'm
guessing that this would make a very popular blog entry.

P.S. Maybe a different one for OS X users, too.

--
RMagick [http://rmagick.rub...]
RMagick Installation FAQ [http://rmagick.rub.../install-faq.html]


9 Answers

Michal Suchanek

4/30/2007 10:15:00 AM

0

On 29/04/07, Tim Hunter <TimHunter@nc.rr.com> wrote:
> Just throwing this out there...
>
> Periodically I am made aware that not all Windows users are familiar
> with cmd.com and the Windows command line. It seems to me that it would
> be very helpful if somebody who is familiar with Windows and Ruby would
> put together a little "cheat sheet" of Windows things that new Ruby
> users on Windows need to know.
>
> For example, how to start a command window and what to do with it once
> it's started. What directories are and how to manipulate them with
> commands. Here I'm thinking of dir, mkdir, chdir, etc. (Might even need
> a "cmd.com commands for beginners" section.) What a text editor is, why
> you can't use Word to write Ruby code. How to run a Ruby program that's
> been saved in a file.
>
> I'm not really Windows-knowledgeable-enough to do this myself. You Ruby
> & Windows users out there know better than I do what's useful. I'm
> guessing that this would make a very popular blog entry.
>

Why do you want the users to use command line on Windows? You can make
directories and move around files in both Explorer and Ruby just fine.
There are commands like ipconfig or net which only work in command
line but these are needed only in very specific situations.

Ruby scripts open their own text window so you do not have to start
them from command line for that. At least it works for me.

And if you want a real shell there is msys (the support environment
for mingw) which has a bourne shell, coreutils, diff, ...

Thanks

Michal

Tim Hunter

4/30/2007 12:21:00 PM

0

Michal Suchanek wrote:
> Why do you want the users to use command line on Windows? You can make
> directories and move around files in both Explorer and Ruby just fine.
> There are commands like ipconfig or net which only work in command
> line but these are needed only in very specific situations.
>
> Ruby scripts open their own text window so you do not have to start
> them from command line for that. At least it works for me.
>
> And if you want a real shell there is msys (the support environment
> for mingw) which has a bourne shell, coreutils, diff, ...
>
I don't want anybody to do anything in particular. I simply observe that
occasionally Ruby users on Windows *need* to use the command line, to
install gems, to set up Rails projects, etc., and those who don't know
how to do this might appreciate some help.

--
RMagick [http://rmagick.rub...]
RMagick Installation FAQ [http://rmagick.rub.../install-faq.html]


Phillip Gawlowski

4/30/2007 12:39:00 PM

0

Tim Hunter wrote:

> I don't want anybody to do anything in particular. I simply observe that
> occasionally Ruby users on Windows *need* to use the command line, to
> install gems, to set up Rails projects, etc., and those who don't know
> how to do this might appreciate some help.

And it's done quite easily. You don't have to cover much stuff.

I'll hack something up, and send it to the list.

--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan....
http://clothred.rub...

Eek! That was supposed to be My Special Law, _MY_ special law, I tell
you!

T/

David Mullet

4/30/2007 1:46:00 PM

0

On Apr 30, 8:20 am, Tim Hunter <TimHun...@nc.rr.com> wrote:
> Michal Suchanek wrote:
> > Why do you want the users to use command line on Windows? You can make
> > directories and move around files in both Explorer and Ruby just fine.
> > There are commands like ipconfig or net which only work in command
> > line but these are needed only in very specific situations.
>
> > Ruby scripts open their own text window so you do not have to start
> > them from command line for that. At least it works for me.
>
> > And if you want a real shell there is msys (the support environment
> > for mingw) which has a bourne shell, coreutils, diff, ...
>
> I don't want anybody to do anything in particular. I simply observe that
> occasionally Ruby users on Windows *need* to use the command line, to
> install gems, to set up Rails projects, etc., and those who don't know
> how to do this might appreciate some help.
>
> --
> RMagick [http://rmagick.rub...]
> RMagick Installation FAQ [http://rmagick.rub.../install-faq.html]

Tim-

I may be able help with this, as it would seem relevant to my Ruby on
Windows blog.

Feel free to contact me with specific thoughts about content.

David Mullet
http://rubyonwindows.bl...
david [dot] mullet (at) gmail {dot} com



Michal Suchanek

4/30/2007 5:43:00 PM

0

On 30/04/07, Tim Hunter <TimHunter@nc.rr.com> wrote:
> Michal Suchanek wrote:
> > Why do you want the users to use command line on Windows? You can make
> > directories and move around files in both Explorer and Ruby just fine.
> > There are commands like ipconfig or net which only work in command
> > line but these are needed only in very specific situations.
> >
> > Ruby scripts open their own text window so you do not have to start
> > them from command line for that. At least it works for me.
> >
> > And if you want a real shell there is msys (the support environment
> > for mingw) which has a bourne shell, coreutils, diff, ...
> >
> I don't want anybody to do anything in particular. I simply observe that
> occasionally Ruby users on Windows *need* to use the command line, to
> install gems, to set up Rails projects, etc., and those who don't know
> how to do this might appreciate some help.
>
I use ruby on Windows and I never really needed to use the windows
commandline in connection with ruby. The one click installer
associates scripts with ruby so all I need is to write the script in
an editor and doubleclick it. But a windows shell extension "irb here"
similar to the MS "Command Prompt Here" could be useful.

I have never tried to use Rails or install additional gems so I do not
know about that.
I think there could be something like CPAN shell for gem installation.
The CPAN shell runs in a loop and executes simple commands like
"install <something>" or "remove <something>".

Thanks

Michal

Harold Hausman

5/1/2007 1:58:00 AM

0

On 5/1/07, Michal Suchanek <hramrach@centrum.cz> wrote:
> I use ruby on Windows and I never really needed to use the windows
> commandline in connection with ruby. The one click installer
> associates scripts with ruby so all I need is to write the script in
> an editor and doubleclick it. But a windows shell extension "irb here"
> similar to the MS "Command Prompt Here" could be useful.
>

What a great idea! And so easily done. (:

First grab this and put it in C:\ruby\:
http://www.danceliquid.com/irbhere/i...

Then grab this and double click it to import it into your registry:
http://www.danceliquid.com/irbhere/i...

Then right click a folder in Explorer (or even the little folder icon
in the top left of an open Explorer window) and choose "irb here!"

Thanks for the sweet idea.

hth,
-Harold

Michal Suchanek

5/2/2007 10:02:00 AM

0

On 01/05/07, Harold Hausman <hhausman@gmail.com> wrote:
> On 5/1/07, Michal Suchanek <hramrach@centrum.cz> wrote:
> > I use ruby on Windows and I never really needed to use the windows
> > commandline in connection with ruby. The one click installer
> > associates scripts with ruby so all I need is to write the script in
> > an editor and doubleclick it. But a windows shell extension "irb here"
> > similar to the MS "Command Prompt Here" could be useful.
> >
>
> What a great idea! And so easily done. (:
>
> First grab this and put it in C:\ruby\:
> http://www.danceliquid.com/irbhere/i...
>
> Then grab this and double click it to import it into your registry:
> http://www.danceliquid.com/irbhere/i...
>
> Then right click a folder in Explorer (or even the little folder icon
> in the top left of an open Explorer window) and choose "irb here!"
>
> Thanks for the sweet idea.
>
Thanks for the swift implementation.

I will try it out next time I get to Windows.

Michal

Michal Suchanek

11/6/2007 1:21:00 PM

0

On 01/05/2007, Harold Hausman <hhausman@gmail.com> wrote:
> On 5/1/07, Michal Suchanek <hramrach@centrum.cz> wrote:
> > I use ruby on Windows and I never really needed to use the windows
> > commandline in connection with ruby. The one click installer
> > associates scripts with ruby so all I need is to write the script in
> > an editor and doubleclick it. But a windows shell extension "irb here"
> > similar to the MS "Command Prompt Here" could be useful.
> >
>
> What a great idea! And so easily done. (:
>
> First grab this and put it in C:\ruby\:
> http://www.danceliquid.com/irbhere/i...
>
> Then grab this and double click it to import it into your registry:
> http://www.danceliquid.com/irbhere/i...
>
> Then right click a folder in Explorer (or even the little folder icon
> in the top left of an open Explorer window) and choose "irb here!"
>
Nice hack

It has the same flaw as the MS Command Prompt Here, though. You can
only run the prompt in a folder that you see closed, not one that is
already open.

I guess it works well within limitations of the environment.

Thanks

Michal

Richard Conroy

11/6/2007 1:55:00 PM

0

Interesting points here. I have to admit that a Ruby & Windows CMD
shell cheat sheet is probably less useful than a Ruby & Windows CMD
shell *gotcha* list.

Certainly the windows shell environments impose some nasty limitations
on Unicode use
(the platform encoding seems to dominate). There could be more traps
too. BTW I know nothing about powershell, so my comments do not apply
there.