How to create a rails staging environment in engineyard?

Posted by siulamvictor on Stack Overflow See other posts from Stack Overflow or by siulamvictor
Published on 2010-06-15T09:34:18Z Indexed on 2010/06/17 3:43 UTC
Read the original article Hit count: 470

I have a production instance in engineyard up and running well. I would like to create a new staging instance for internal testing. I cloned the existing production instance, changed Framework Environment to staging. I can deploy all the code to staging instance from Github. Engineyard reported the server is fully configured and ready.

I have subdomain-fu in my Rails app, as I have some subdomain handling in my app. I set the subdomain initializer like this....

SubdomainFu.tld_sizes = {:development => 1,
                         :test => 0,
                         :production => 1,
                         :staging => 2}

As the production instance is using the domain xxxxx.com, I would like my staging instance use the domain staging.xxxxx.com. But I got an error when open this domain. Seems the app use xxxxx.com as domain but not the staging.xxxxx.com.

I checked the engineyard database.yml. It use xxxxx_production database, I supposed it should be xxxxx_staging.

Seems the engineyard instance is not set to staging environment, but just clone all the setting from production server. Does anyone have experience with this and can show me the way on how to fix it?

Thanks. :)

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about staging