Windows new user cheat sheet?

T

Tim Hunter

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.
 
M

Michal Suchanek

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
 
T

Tim Hunter

Michal said:
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.
 
P

Phillip Gawlowski

Tim said:
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.110mb.com/
http://clothred.rubyforge.org

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

T/
 
M

mully

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.

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.blogspot.com
david [dot] mullet (at) gmail {dot} com
 
M

Michal Suchanek

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
 
H

Harold Hausman

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/irbhere.bat

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

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
 
M

Michal Suchanek

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

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

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

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
 
M

Michal Suchanek

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

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

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

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
 
R

Richard Conroy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top