如何在engineyard中创建rails暂存环境?

发布于 2024-09-05 17:00:18 字数 684 浏览 2 评论 0原文

我在engineyard 有一个生产实例,并且运行良好。我想创建一个新的暂存实例用于内部测试。我克隆了现有的生产实例,将框架环境更改为暂存。我可以将所有代码从 Github 部署到暂存实例。 Engineyard 报告服务器已完全配置并准备就绪。

我的 Rails 应用程序中有 subdomain-fu,因为我的应用程序中有一些子域处理。我像这样设置子域初始值设定项...

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

由于生产实例使用域 xxxxx.com,我希望我的暂存实例使用域 staging.xxxxx.com。但是当我打开这个域时出现错误。似乎该应用程序使用 xxxxx.com 作为域,但不使用 staging.xxxxx.com。

我检查了engineyard database.yml。它使用xxxxx_生产数据库,我认为它应该是xxxxx_staging。

似乎engineyard实例没有设置为临时环境,而只是从生产服务器克隆所有设置。有谁有这方面的经验并可以告诉我如何解决它?

谢谢。 :)

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. :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ㄖ落Θ余辉 2024-09-12 17:00:18

尝试

SubdomainFu.configure do |config|
 config.tld_sizes = {:development => 1,
                     :test => 0,
                     :production => 1}
end

Try

SubdomainFu.configure do |config|
 config.tld_sizes = {:development => 1,
                     :test => 0,
                     :production => 1}
end
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文