[Instantrails-users] Can I change "rails_apps" location?

William (Bill) Froelich wfroelich at dbsnow.com
Fri Aug 4 22:54:26 EDT 2006


> Question 1 - Anyone know how to change the "rails_apps" 
> location?  i.e.
> so I can have it in a user data area (which gets backed up) 
> rather than under the instantrails installation area?  
> 
> i.e. such that when one (a) goes "open ruby console window" 
> it opens here and (b) when one goes "manage rails 
> applications" it is the new directory that is scanned for rails apps.
> 
> Question 2 - How to add additional items to the path of a 
> console window that is opened via instantrails via the "open 
> ruby console window"
> 

The default location and path for the rails_apps can easily be changed
to any location you want.  I have not figured out how to get the "manage
rails applications" to look at the other location but I rarely run my
rails apps through InstantRails.  I typically use either WEBrick or
Mongrel during my development and simply start it from the command
prompt (d:\InstantRails-1.3a\rails_apps> ruby scripts\server) to start
WEBrick.

To change the default location for your rails apps (assuming
InstantRails is in c:\InstantRails):

1) Create the directory where you want the apps to live
2) Edit the use_ruby.cmd file in your InstantRails directory (notepad
C:\InstantRails\use_ruby.cmd)
3) Change the cd rails_apps line to change to your other directory
For example:
cd \mydata\rails_apps
or change it to 
d:
cd \rails_apps
if you want the rails_app to be on another drive
4) Add any additional items you want on path to the PATH statement in
this same file as well
5) Save the file and next time you open "open ruby console window" it
will have the new path items and default to the new location

Note: if you ever move the location of InstantRails when you next start
it and regenerate the config files your changes will be overwritten.
You can also make the changes to the use_ruby.cmd file in the conf_files
directory so that if they are regenerated your changes will still be
there.

Curt, I will also look at adding this to the FAQ in the next few days.
;-)

Good luck 

--Bill


More information about the Instantrails-users mailing list