Hi,
You can write this in environment file:
SOME_CONSTANT = ENV["SOME_CONSTANT"] || "A DEFAULT VALUE"
then start rails by
SOME_CONSTANT="42" script/server
or it will use default value.
Jan
On Thu, Jul 17, 2008 at 6:05 AM, Philip Varkey <
rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> Hello,
>
> I am looking to set a Variable from the command line during starting up
> my server that will be accessible to the whole ruby on rails
> application.
>
> One way of setting such a config variable was putting defining it into
> the environment.rb file but then I don''t know if I could override
the
> value of this variable in the environment.rb file when I start up my
> server from the command line.
>
> Thanks
> Philip
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Fly on wheels.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---