alias rake/ruby commands in windows?

Subscribe to alias rake/ruby commands in windows? 3 posts, 2 voices

 
Avatar john h 8 posts

How can I alias or create shortcuts for rake/ruby commands in Windows?

I find myself typing ruby script/server, ruby script/console over and over again.

Any suggestions would be appreciated.

Thanks,

John

 
Avatar Jeff Cohen 89 posts

John,

Here’s one approach. Create a directory called c:\dev (or whatever) and put it into your PATH. Then create batch files in there that run your script/server, or script/console, etc.

Let’s say you named the one that starts the server s.bat. Then you can just type s and it will start up your server for you. Or, create a shortcut on your desktop to the batch file instead, if you prefer to double-click something instead of opening a command prompt first.

If you need more details on how to create the batch files, just let me know.

 
Avatar john h 8 posts

Hi Jeff,

That’s great. Straightforward and makes sense.

Best,

John