【问题标题】:Deploying an existing Rails app to AWS Elastic Beanstalk将现有 Rails 应用程序部署到 AWS Elastic Beanstalk
【发布时间】:2013-03-18 08:20:51
【问题描述】:

我是 Rails 新手,我正在尝试将现有的 Rails 应用程序部署到 AWS Elastic Beanstalk。 但我得到的只是“祝贺页面” (仅供参考:我可以使用“rails server”在“localhost:3000”上运行应用程序)

我按照以下说明进行操作: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html

任何帮助将不胜感激。谢谢。

这就是我所做的:

# cd /var/www/myapp
# bundle update
# bundle install
# git init 
# git add .
# git commit -m "Initial commit"
# eb init
 // .....configuration
 // ..
# eb start
# git add .gitignore && git commit -m "Ignore .elasticbeanstalk from Git"
# git aws.push
# eb status --verbose

Retrieving status of environment "pb03-env".
URL     : pb03-env-biyaffm422.elasticbeanstalk.com
Status  : Ready
Health  : Green
Environment Name:       pb03-env
Environment ID:         e-mpnrf7js5g
Solution Stack:         32bit Amazon Linux running Ruby 1.9.3
Version Label:          git-5d8712738fd03dee0d5e6a8782055089e028f22d-1364429448649
Date Created:           2013-03-27 23:48:49
Date Updated:           2013-03-28 00:14:30
Description:            None

RDS Database: AWSEBRDSDatabase | aazyq.c0pga7irhsn.us-east-1.rds.amazonaws.com:3306
Database Engine:        mysql 5.5.27
Allocated Storage:      5
Instance Class:         db.t1.micro
Multi AZ:               False
Master Username:        ebroot
Creation Time:          2013-03-27 23:53:41
DB Instance Status:     available

【问题讨论】:

    标签: ruby-on-rails amazon-web-services amazon-elastic-beanstalk


    【解决方案1】:

    我发现发生了什么。这是一个“git”问题。

    这是以下帖子中指出的类似问题: deploying to heroku -- can't get rid of the "welcome to rails" default page Heroku 除外。

    无论如何,这就是我为解决它所做的:

    git rm public/index.html
    git commit -m "Removed public/index.html"
    git aws.push
    

    【讨论】:

    • 很好,我正在寻找答案.. 干得好,先生。谢谢。将其标记为答案。
    猜你喜欢
    • 2013-04-03
    • 2021-03-01
    • 2021-02-11
    • 2018-12-07
    • 2022-06-11
    • 2012-09-24
    • 2018-04-21
    • 2017-04-14
    • 2017-03-04
    相关资源
    最近更新 更多