Loading, CGI and some aother questions

G

Gambler Gluck

Hello.=0A=0AI'm learning Ruby right now, and I have couple of questions abo=
ut it.=0A=0A1. What is the best way to store configs for ruby programs? Is =
there a way to include an rb file with data structure so that it is assigne=
d to some variable in the including code? If there is such a way, would it =
be worse than using YAML serialization or better?=0A=0A2. What is the most =
"universal" way to work with web environments? Will CGI work well if used u=
nder mod_ruby or in other non-cgi environments?=0A =0A=0A=0A=0A =0A________=
___________________________________________________________________________=
_=0ADo you Yahoo!?=0AEveryone is raving about the all-new Yahoo! Mail beta.=
=0Ahttp://new.mail.yahoo.com
 
D

David Vallner

--------------enigCAF18AC76924FE82294A9AC6
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Gambler said:
Hello.
=20
I'm learning Ruby right now, and I have couple of questions about it.
=20
1. What is the best way to store configs for ruby programs? Is there a =
way to include an rb file with data structure so that it is assigned to s=
ome variable in the including code? If there is such a way, would it be w=
orse than using YAML serialization or better?

The sourcing a .rb file is more flexible, however you risk code
injection that way. Usual considerations apply.

David Vallner


--------------enigCAF18AC76924FE82294A9AC6
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFVeZny6MhrS8astoRAgFYAJ9uatkkgXJVweBa+j2VSMqwp4KJigCfaj3t
WGgwqPnHut7ScRXCjQIE17g=
=DDeq
-----END PGP SIGNATURE-----

--------------enigCAF18AC76924FE82294A9AC6--
 
J

James Edward Gray II

1. What is the best way to store configs for ruby programs? Is
there a way to include an rb file with data structure so that it is
assigned to some variable in the including code? If there is such a
way, would it be worse than using YAML serialization or better?

I really believe YAML was made for configuration files. It's my
first choice, for sure.

James Edward Gray II
 

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
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top