部署现有的Rails应用到AWS弹性魔豆 [英] Deploying an existing Rails app to AWS Elastic Beanstalk

查看:170
本文介绍了部署现有的Rails应用到AWS弹性魔豆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Rails,我尝试部署现有的Rails应用到AWS弹性魔豆。 但是,所有我得到的只是热烈庆祝页 (供参考:我可以在其上运行的应用程序本地主机:3000使用轨道服务器)

我跟着指示的说明: 的http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html

任何帮助将是AP preciated。谢谢你。

下面是我所做的:

 #CD /无功/网络/的myapp
#包更新
#捆绑安装
#git的初始化
#git的补充。
#git的承诺-m初始提交
#EB INIT
 // .....组态
 // ..
#EB开始
#混帐添加的.gitignore和放大器;&安培; git的承诺-m从混帐忽略.elasticbeanstalk
#混帐aws.push
#EB状态--verbose

检索环境PB03-ENV状态。
网址:pb03-env-biyaffm422.elasticbeanstalk.com
状态:
健康:绿色
环境名称:PB03-ENV
环境ID:电子mpnrf7js5g
解决方案堆栈:亚马逊32位Linux上运行的Ruby 1.9.3
版本标签:混帐5d8712738fd03dee0d5e6a8782055089e028f22d-1364429448649
创建日期:2013年3月27日23点48分49秒
更新日期:2013年3月28日0时14分三十秒
说明:无

RDS数据库:AWSEBRDSDatabase | aazyq.c0pga7irhsn.us-east-1.rds.amazonaws.com:3306
数据库引擎:MySQL的5.5.27
分配存储:5
实例类:db.t1.micro
多AZ:假
主用户名:ebroot
创作时间:2013年3月27日23时53分41秒
数据库实例状态:可用
 

解决方案

我发现发生了什么事。这是一个混帐的问题。

有在以下交指示的类似的问题: <一href="http://stackoverflow.com/questions/8323987/deploying-to-heroku-cant-get-rid-of-the-welcome-to-rails-default-page">deploying到Heroku的 - 无法摆脱的&QUOT;欢迎轨&QUOT;默认页面除了它WASS对Heroku的。

总之,这是我做过什么来解决这个问题:

  git的RM公共/ index.html的
git的承诺-m删除公/ index.html的
混帐aws.push
 

I'm new to Rails and I'm trying to deploy an existing Rails app to 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" )

I followed the instructions indicated in: 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.

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.

Anyway, This is what I did to solve it:

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

这篇关于部署现有的Rails应用到AWS弹性魔豆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆