1

私はcapdeploy:coldを実行しています

次のconfig/deploy.rbを使用します

1 require 'bundler/capistrano'
  2 
  3 set :application, "massiveapp"
  4 
  5 set :scm, :git
  6 
  7 set :repository, "git://github.com/deployingrails/massiveapp.git"
  8 
  9 server "localhost", :web, :app, :db, :primary => true
 10 
 11 ssh_options[:port] = 2222
 12 ssh_options[:keys] = "~/.vagrant.d/insecure_private_key"
 13 
 14 set :user, "vagrant"
 15 set :group, "vagrant"
 16 set :deploy_to, "/var/massiveapp"
 17 set :use_sudo, false
 18 
 19 set :deploy_via, :copy
 20 set :copy_strategy, :export
 21 
 22 namespace :deploy do
 23   task :start do ; end
 24   task :stop do ; end
 25   desc "Restart the application"
 26   task :restart, :roles => :app, :except => { :no_release => true } do
 27     run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
 28   end
 29   desc "Copy the database.yml file into the latest release"
 30   task :copy_in_database_yml do
 31     run "cp #{shared_path}/config/database.yml #{latest_release}/config/"
 32   end
 33 end
 34 #before "deploy:copy_in_database_yml"
 35 before "deploy:assets:precompile", "deploy:copy_in_database_yml"

それはすべてうまくいき、その時点で失敗します。

* executing "cd /var/massiveapp/releases/20120808053801 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile"
    servers: ["localhost"]
    [localhost] executing command
*** [err :: localhost] rake aborted!
*** [err :: localhost] (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 1
*** [err :: localhost] 
*** [err :: localhost] Tasks: TOP => environment
*** [err :: localhost] (See full trace by running task with --trace)
    command finished in 1196ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /var/massiveapp/releases/20120808053801; true"
    servers: ["localhost"]
    [localhost] executing command
    command finished in 39ms

私はcapistranoを学んでいるだけで、これをデバッグして解決する方法がわかりません。

どんな助けでも大歓迎です。

レール3.2.7ルビー1.9.3キャピストラーノ2.12

4

2 に答える 2

5

database.ymlファイルのタブ文字が原因で問題が発生しました。

于 2012-08-11T03:38:07.480 に答える
2

database.ymlファイルは、にあるVMにあります/var/massiveapp/shared/configs/database.yml

于 2012-11-01T17:38:06.900 に答える