简体   繁体   English

将现有Rails应用程序部署到AWS Elastic Beanstalk

[英]Deploying an existing Rails app to AWS Elastic Beanstalk

I'm new to Rails and I'm trying to deploy an existing Rails app to AWS Elastic Beanstalk. 我是Rails的新手,我正在尝试将现有的Rails应用程序部署到AWS Elastic Beanstalk。 But all I'm getting is just the "Congralutions Page" (FYI: I'm able to run the app on "localhost:3000" using "rails server" ) 但我得到的只是“Congralutions页面”(仅供参考:我可以使用“rails server”在“localhost:3000”上运行应用程序)

I followed the instructions indicated in: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html 我按照以下指示说明: http//docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html

Any help would be appreciated. 任何帮助,将不胜感激。 Thanks. 谢谢。

Here's what I did: 这是我做的:

# 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

I found out what was happening. 我发现了发生了什么。 It was a "git" problem. 这是一个“git”问题。

It is a similar problem indicated in the following post: deploying to heroku -- can't get rid of the "welcome to rails" default page Except it wass for Heroku. 这是一个类似的问题,在下面的帖子中指出: 部署到heroku - 无法摆脱“欢迎使用rails”默认页面除了它为Heroku而已。

Anyway, This is what I did to solve it: 无论如何,这就是我解决它的方法:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM