2014-12-04 50 views
0

我有一個rails 3.2應用程序,它部署罰款與Capistrano,有一天,雖然我想回滾,我不能這樣做,因爲我有以下錯誤;Capistrano回滾損壞語法錯誤:文件結尾意外(期待「)」)

$ cap staging deploy:rollback 
    triggering load callbacks 
    * 2014-12-04 13:34:43 executing `staging' 
    triggering start callbacks for `deploy:rollback' 
    * 2014-12-04 13:34:43 executing `multistage:ensure' 
    triggering after callbacks for `multistage:ensure' 
    * 2014-12-04 13:34:43 executing `rbenv:setup_default_environment' 
    * 2014-12-04 13:34:43 executing `deploy:rollback' 
    * 2014-12-04 13:34:43 executing `deploy:rollback:revision' 
    * executing "ls -x /srv/pais/releases" 
    servers: ["staging.pais.com.au"] 
    [staging.pais.com.au] executing command 
    command finished in 38ms 
    * executing "rm /srv/pais/current; ln -s /srv/pais/releases/20141203050547 /srv/pais/current" 
    servers: ["staging.pais.com.au"] 
    [staging.pais.com.au] executing command 
    command finished in 10ms 
    triggering after callbacks for `deploy:rollback:revision' 
    * 2014-12-04 13:34:43 executing `deploy:assets:rollback' 
    * executing "ls /srv/pais/releases/20141203050547/assets_manifest.*" 
    servers: ["staging.pais.com.au"] 
    [staging.pais.com.au] executing command 
    command finished in 13ms 
    * executing "[ -e /srv/pais/releases/20141203050547/assets_manifest.yml ] && echo true || echo false" 
    servers: ["staging.pais.com.au"] 
    [staging.pais.com.au] executing command 
    command finished in 8ms 
    * executing "ls /srv/pais/shared/assets/manifest*" 
    servers: ["staging.pais.com.au"] 
    [staging.pais.com.au] executing command 
    command finished in 13ms 
    * executing "cd -- /srv/pais/releases/20141203050547 && cp -f -- /srv/pais/releases/20141203050547/assets_manifest.yml /srv/pais/shared/assets/manifest.yml && [ -z \"$(#<Capistrano::Configuration::Namespaces::Namespace:0x007fa9e9413530> -P | grep assets:precompile:nondigest)\" ] || #<Capistrano::Configuration::Namespaces::Namespace:0x007fa9e9413530> RAILS_ENV=production RAILS_GROUPS=assets assets:precompile:nondigest" 
    servers: ["staging.pais.com.au"] 
    [staging.pais.com.au] executing command 
** [out :: staging.pais.com.au] sh: 1: 
** [out :: staging.pais.com.au] Syntax error: end of file unexpected (expecting ")") 
** [out :: staging.pais.com.au] 
    command finished in 9ms 
failed: "env RBENV_ROOT=/usr/local/rbenv PATH=/usr/local/rbenv/shims:/usr/local/rbenv/bin:$PATH sh -c 'cd -- /srv/pais/releases/20141203050547 && cp -f -- /srv/pais/releases/20141203050547/assets_manifest.yml /srv/pais/shared/assets/manifest.yml && [ -z \"$(#<Capistrano::Configuration::Namespaces::Namespace:0x007fa9e9413530> -P | grep assets:precompile:nondigest)\" ] || #<Capistrano::Configuration::Namespaces::Namespace:0x007fa9e9413530> RAILS_ENV=production RAILS_GROUPS=assets assets:precompile:nondigest'" on staging.pais.com.au 

我使用Capistrano的版本2.15.5和&到Debian的7機部署。

回答

2

問題是我在我的deploy.rb以下

namespace :rake 

我改變了這

namespace :raketask 
+0

Soooo神祕!我有完全相同的問題。謝謝你:) – MAckerman 2015-06-03 22:30:20

+0

我也有同樣的問題。 – Bruce 2016-04-19 18:18:40

0

破損的部署有時很難修復,但看着最後幾行,capistrano運行資產預編譯時破了。

鑑於此行** [out :: staging.pais.com.au] Syntax error: end of file unexpected (expecting ")"),您可能在JavaScript文件中有語法錯誤(括號不正確關閉)。

希望它有幫助。

+0

當我部署,雖然它編譯好嗎?有沒有一種方法可以在登臺服務器上直接測試? – map7 2014-12-04 04:45:37

相關問題