How Create New Parameter set at Start Time?

I would like to be able to set a paramter during start up like:

ruby script\server -nodename testNode_1

… and would like to have access to this setting from models and/or
controllers.

Can someone point me in the right direction to get this working?

Regards

Thanks for the reply - but how do I grab the value if its passed from
the command line?

Homer,

—[ environment.rb ]—
module MyProjectName
MY_VAR = ‘rockin’
end

— [ in models or controlllers ]—
MyProjectName::MY_VAR

Note: You must restart ./script/server if you change variables in
environment.rb. They do not auto-reload like most other railities.

Hope this helps,
Zack

Anyone else have any ideas on this one?

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