#227 √ resolved
coryodaniel(midget_nuts|codaniel)

Merb#merge_env; Personalized, mergeable Environments[Feature][Patch]

Reported by coryodaniel(midget_nuts|codaniel) | March 26th, 2008 @ 09:23 PM | in 0.9.4

Since merbs environments are pretty abstract (i.e: Merb doesn't explode if you use an environment thats not "test", "production", "development) I have been taking the opportunity to use personalized environments. I can create a "stage" environment or a "localdev" environment that are configured differently that the standard three environments.

What this patch lets you do is call Merb.runs_like "this_environment" in one of your environment.rb files. It will apply that environment config before/after (depending on placement) the settings in the current environment *.rb file.

This allows cool things like having a personal environment locally that maybe specifies a port that you always want to run on, but besides that you always want to use the settings from "Development.rb"

You can do (my_env.rb):

Merb.runs_like "development"

Merb::Config.use {|x| x[:port] = 3004}

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »