Wes Gamble
2006-Aug-03 20:03 UTC
[Rails] Is it possible to interpolating variables in YAML files?
I''m attempting to store a value that''s dependent on an environment variable in a custom .yml file, like so: job_folder: "#{RAILS_ROOT}/jobs" Doesn''t seem to like that. Is there any way for me to have access to the RAILS_ROOT environment variable from inside of my configuration file? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
Carl Fyffe
2006-Aug-03 21:55 UTC
[Rails] Is it possible to interpolating variables in YAML files?
Did you try: job_folder: <%= ENV[''RAILS_ROOT''] %>/jobs On 8/3/06, Wes Gamble <weyus@att.net> wrote:> I''m attempting to store a value that''s dependent on an environment > variable in a custom .yml file, like so: > > job_folder: "#{RAILS_ROOT}/jobs" > > Doesn''t seem to like that. Is there any way for me to have access to > the RAILS_ROOT environment variable from inside of my configuration > file? > > Thanks, > Wes > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Possibly Parallel Threads
- How to require a regular module into my controller?
- text_field doesn''t call overridden ActiveRecord getters
- Wrap error_messages_for() call when no instance var present
- How to bypass routing for a particular request?
- Best way to organize non-controller logic???