[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

directory structure

Giedrius

1/30/2006 2:58:00 PM

1) how to set working directory for irb?
2) is there default or if not, could you share your own good coding
practice where to put additional source files as:
a) wsdl2ruby genereated files
b) own classes, not controllers / not models / not views
c) other source files

--
Posted via http://www.ruby-....


2 Answers

Robert Klemme

1/30/2006 3:03:00 PM

0

Giedrius wrote:
> 1) how to set working directory for irb?

http://www.ruby-doc.org/core/classes/Dir.ht...

> 2) is there default or if not, could you share your own good coding
> practice where to put additional source files as:
> a) wsdl2ruby genereated files
> b) own classes, not controllers / not models / not views

These I put into ~/lib/ruby and set env var RUBYLIB accordingly.

> c) other source files

Wherever I need them. Sometimes with the files I need to process,
sometimes in a global experimental dir (for tesing out things). HTH

Kind regards

robert

Adam Shelly

1/31/2006 6:49:00 AM

0

On 1/30/06, Giedrius <GiedriusBanaitis@gmail.com> wrote:
> 1) how to set working directory for irb?

irb(main):018:0> Dir::pwd
=> "c:/temp"
irb(main):019:0> Dir::chdir "c:/programs"
=> 0
irb(main):020:0> Dir::pwd
=> "c:/programs"


> 2) is there default or if not, could you share your own good coding
> practice where to put additional source files as:

I don't think I have good practices, I lump stuff together in a
subversion directory called ruby/repository/, and make subdirs when I
feel like it. If I write something particularly re-useful I copy it
to site_ruby.

-Adam