自己改个名字,如果 clone 的时候没有指定的话
**Alfred-iMac:alfred$ af logn**
##上传
**Alfred-iMac:alfred$ af push**
Would you like to deploy from the current directory? [Yn]: 默认
Application Name: alfred
Detected a Rails Application, is this correct? [Yn]: 选择3,速度更快一些
1: AWS US East - Virginia
2: AWS EU West - Ireland
3: AWS Asia SE - Singapore
4: Rackspace AZ 1 - Dallas
5: HP AZ 2 - Las Vegas
Select Infrastructure: 3
Application Deployed URL [alfred.ap01.aws.af.cm]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [256M]: 1G 只要不是128就成
How many instances? [1]:
Bind existing services to 'alfred'? [yN]: 默认
Create services to bind to 'alfred'? [yN]: 默认
Would you like to save this configuration? [yN]:
Creating Application: OK
Uploading Application:
Checking for available resources: OK
Packing application: OK
Uploading (38K): OK
Push Status: OK
Staging Application 'alfred': OK
Starting Application 'alfred': OK
AppFog automatically creates and binds a new MySQL service with the Ruby on Rails jumpstart, and the app is automatically reconfigured to connect to the service. For more information on services and how to connect to them manually, check out our docs on Services.
文档说会自动绑定对应的 services:
在 push 的时候需配置 services
Bind existing services to 'alfred'? [yN]:
yCreate services to bind to 'alfred'? [yN]: y
1: mongodb
2: mysql
3: postgresql
4: rabbitmq
5: redis
What kind of service?: n
有的时候会报这个错误
Error (JSON 503): <?xml version="1.0" encoding="u...
执行,指定 ruby 是 1.9.3 的版本就可以解决了
af push --runtime ruby193