2013-03-07 72 views
0

當我運行cap [deploy:cold]與橡膠部署到亞馬遜ec2時,我得到以下打印出我的控制檯上無休止的。
請幫助提出意見。我在這裏跟着railscast鏈接http://railscasts.com/episodes/347-rubber-and-amazon-ec2錯誤的運行帽部署:冷

servers: ["app01.foo.com"] 
    [app01.foo.com] executing command 
** [out :: app01.foo.com] . 
** [out :: app01.foo.com] . 
** [out :: app01.foo.com] . 
** [out :: app01.foo.com] . 
** [out :: app01.foo.com] . 
** [out :: app01.foo.com] . 
** [out :: app01.foo.com] . 

回答

0

這是一個設置問題。開箱即用橡膠不適合我們。你必須做一些修改。爲您遇到的問題主要是修復在mysql配置:配置/橡膠/ deploy_mysql.rb

@@ -40,7 +40,7 @@ 
      pass = "identified by '#{env.db_pass}'" if env.db_pass 
      rubber.sudo_script "create_master_db", <<-ENDSCRIPT 
      mysql -u root -e "create database #{env.db_name};" 
-    mysql -u root -e "delete from mysql.user where user='' and host='localhost';" 
+    mysql -u root -e "delete from mysql.user where user='';" 
      mysql -u root -e "grant all on *.* to '#{env.db_user}'@'%' #{pass};" 
      mysql -u root -e "grant select on *.* to '#{env.db_slave_user}'@'%' #{pass};" 
      mysql -u root -e "grant replication slave on *.* to '#{env.db_replicator_user}'@'%' #{pass};" 

還有被設置:資產角色:應用程序,拿着我們上了很長的時間。這發生在deploy.rb中,並根據上面的railscast。