Directory structure

  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

On 1/30/06, Giedrius [email protected] 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”

  1. 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

Giedrius wrote:

  1. how to set working directory for irb?

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

  1. 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 forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs