Forum: Ruby directory structure

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ab457a1472a803502ebbabb9a811d2d9?d=identicon&s=25 Giedrius (Guest)
on 2006-01-30 15:57
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
Ddbfebb47432f6599da361df6a135c7c?d=identicon&s=25 Adam Shelly (Guest)
on 2006-01-31 07:50
(Received via mailing list)
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
5befe95e6648daec3dd5728cd36602d0?d=identicon&s=25 Robert Klemme (Guest)
on 2006-02-01 23:06
(Received via mailing list)
Giedrius wrote:
> 1) how to set working directory for irb?

http://www.ruby-doc.org/core/classes/Dir.html#M000827

> 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
This topic is locked and can not be replied to.