Topic: Change Ruby Command Line default directory

always when I start the ruby command line It's start on C:/user/currentuser
can i change that to start at, for example: C:/Ruby/Proyect?

Re: Change Ruby Command Line default directory

http://www.ghacks.net/2007/11/16/change-the-default-command-prompt-directory/ wrote:

To change the default Command Prompt directory open the Registry by pressing Windows R, typing regedit and hitting enter.

Navigate to the key HKEY_CURRENT_USER \ Software \ Microsoft \ Command Processor and search for the String Autorun in the left window. If that string is not existing yet create it. Double-click it afterwards and add the new directory path in the following way:

CD /d c:\windows\system32             [### Your directory of choice goes here, this is the example's choice]

Changes take effect immediately which means you can test right away. The default directory for the Command Prompt is changed before it is displayed which means that you already start in the new folder that you have selected.

Last edited by RailsRhino (2010-11-22 19:41:13)

- Ben

Re: Change Ruby Command Line default directory

but that will change mi command prompt general default directory, not only the Ruby one

Re: Change Ruby Command Line default directory

I don't know then, I'm not a windows user (natively). I am on UNIX (mac).

Google it!

Last edited by RailsRhino (2010-11-22 19:52:55)

- Ben

Re: Change Ruby Command Line default directory

edit the setup_environment.bat in RailsInstaller/Rubyx.x.x  add
D:
cd D:\RORSites
or any direct directory you like
make sure the direct is exist

Re: Change Ruby Command Line default directory

Ah! This worked for me.  At the end of setup_environment.bat, uncomment the last line, after:
REM NOTE that we start out in the Sites directory as the current working dir
put:
cd {your starting directory}

Last edited by ingusmat (2012-02-14 13:37:47)