我在 AWS 上设置了一个 t1.micro 实例。我能够成功运行:
RAILS_ENV=staging rubber:create_staging
创建服务器、部署代码并运行应用程序。我对代码进行了一些更改,并希望部署到我的登台服务器,但是当我运行此命令时:
RAILS_ENV=staging cap deploy
我收到以下错误:
* executing "cd -- /mnt/domain-staging/releases/20130321005928 && bundle exec rake RAILS_ENV=staging RAILS_GROUPS=assets assets:precompile && cp -- /mnt/domain-staging/shared/assets/manifest.yml /mnt/domain-staging/releases/20130321005928/assets_manifest.yml"
servers: ["staging.domain.com"]
[staging.domain.com] executing command
* [out :: staging.domain.com] /usr/local/rubies/1.9.3-p385/bin/ruby /mnt/domain-staging/shared/bundle/ruby/1.9.1/bin/rake assets:precompile:nondigest RAILS_ENV=staging RAILS_GROUPS=assets
* [out :: staging.domain.com]
* [out :: staging.domain.com] rake aborted!
* [out :: staging.domain.com] Command failed with status (): [/usr/local/rubies/1.9.3-p385/bin/ruby /mnt...]
* [out :: staging.domain.com] /mnt/domain-staging/shared/bundle/ruby/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:9:in `ruby_rake_task'
* [out :: staging.domain.com] /mnt/domain-staging/shared/bundle/ruby/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:62:in `block (3 levels) in <top (required)>'
* [out :: staging.domain.com] /mnt/domain-staging/shared/bundle/ruby/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:19:in `invoke_or_reboot_rake_task'
* [out :: staging.domain.com] /mnt/domain-staging/shared/bundle/ruby/1.9.1/gems/actionpack-3.1.3/lib/sprockets/assets.rake:25:in `block (2 levels) in <top (required)>'
* [out :: staging.domain.com] Tasks: TOP => assets:precompile:all
* [out :: staging.domain.com] (See full trace by running task with --trace)
command finished in 223523ms
failed: "/bin/bash -l -c 'cd -- /mnt/domain-staging/releases/20130321005928 && bundle exec rake RAILS_ENV=staging RAILS_GROUPS=assets assets:precompile && cp -- /mnt/domain-staging/shared/assets/manifest.yml /mnt/domain-staging/releases/20130321005928/assets_manifest.yml'" on staging.domain.com
我没有更改任何默认的 capistrano 配方,并且代码已成功部署 1 次。我已经能够为我的生产站点而不是暂存站点运行“cap deploy”。我无法在 Google 组中找到任何内容,我们将不胜感激。