directory structure

G

Giedrius

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
 
R

Robert Klemme

Giedrius said:
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
 
A

Adam Shelly

1) how to set working directory for irb?

irb(main):018:0> Dir::pwd
=3D> "c:/temp"
irb(main):019:0> Dir::chdir "c:/programs"
=3D> 0
irb(main):020:0> Dir::pwd
=3D> "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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,662
Latest member
sxarexu

Latest Threads

Top