I am working on a website project that requires ruby 1.8.7 and using am currently rails 3.2. This is a research project and thus maybe a bit "unconventional".
I have a rails server, the manager, that spawns other rails servers which become peers in a P2P network.
I want to pass custom options to my spawned servers to configure them. I thought about doing something like this but it does not seem possible in rails. Does somebody have a suggestion of how to do something similar?
rails server --custom_option="CUSTOM_VALUE"
Will environment variables work?
CUSTOM_OPTION=CUSTOM_VALUE rails s
This should give you access to it:
`$CUSTOM_OPTION`
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.