2013-04-22 49 views
-1

我想要的應用程序部署我軌的Linode VPS但是我完成所有步驟,當我做 [email protected]:~/myrailsapp$ cap deploy:cold麻煩部署我的Rails應用的Linode VPS

我得到了以下錯誤:

failed: "env PATH=$HOME/.rvm/shims:$HOME/.rvm/bin:$PATH sh -c 'cd /home/deployer/apps/myrailsapp/releases/20130422101521 && bundle install --gemfile /home/deployer/apps/myrailsapp/releases/20130422101521/Gemfile --path /home/deployer/apps/myrailsapp/shared/bundle --deployment --quiet --without development test'" on xxx.xxx.xxx.xxx 

全日誌低於:

[email protected]:~/myrailsapp$ cap deploy:cold 
    * 2013-04-22 15:44:59 executing `deploy:cold' 
    * 2013-04-22 15:44:59 executing `deploy:update' 
** transaction: start 
    * 2013-04-22 15:44:59 executing `deploy:update_code' 
    updating the cached checkout on all servers 
    executing locally: "git ls-remote [email protected]:myrailsapp/myrailsapp.git master" 
    command finished in 5385ms 
    * executing "if [ -d /home/deployer/apps/myrailsapp/shared/cached-copy ]; then cd /home/deployer/apps/myrailsapp/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard 88641306c92790d13f95beb7a2826a072ab72df4 && git clean -q -d -x -f; else git clone -q [email protected]:myrailsapp/myrailsapp.git maste /home/deployer/apps/myrailsapp/shared/cached-copy && cd /home/deployer/apps/myrailsapp/shared/cached-copy && git checkout -q -b deploy 88641306c92790d13f95beb7a2826a072ab72df4; fi" 
    servers: ["xxx.xxx.xxx.xxx"] 
Password: 
    [xxx.xxx.xxx.xxx] executing command 
    command finished in 5786ms 
    copying the cached version to /home/deployer/apps/myrailsapp/releases/20130422101521 
    * executing "cp -RPp /home/deployer/apps/myrailsapp/shared/cached-copy /home/deployer/apps/myrailsapp/releases/20130422101521 && (echo 88641306c92790d13f95beb7a2826a072ab72df4 > /home/deployer/apps/myrailsapp/releases/20130422101521/REVISION)" 
    servers: ["xxx.xxx.xxx.xxx"] 
    [xxx.xxx.xxx.xxx] executing command 
    command finished in 951ms 
    * 2013-04-22 15:45:22 executing `deploy:finalize_update' 
    triggering before callbacks for `deploy:finalize_update' 
    * 2013-04-22 15:45:22 executing `deploy:assets:symlink' 
    * executing "rm -rf /home/deployer/apps/myrailsapp/releases/20130422101521/public/assets && mkdir -p /home/deployer/apps/myrailsapp/releases/20130422101521/public && mkdir -p /home/deployer/apps/myrailsapp/shared/assets && ln -s /home/deployer/apps/myrailsapp/shared/assets /home/deployer/apps/myrailsapp/releases/20130422101521/public/assets" 
    servers: ["xxx.xxx.xxx.xxx"] 
    [xxx.xxx.xxx.xxx] executing command 
    command finished in 993ms 
    * 2013-04-22 15:45:23 executing `bundle:install' 
    * executing "cd /home/deployer/apps/myrailsapp/releases/20130422101521 && bundle install --gemfile /home/deployer/apps/myrailsapp/releases/20130422101521/Gemfile --path /home/deployer/apps/myrailsapp/shared/bundle --deployment --quiet --without development test" 
    servers: ["xxx.xxx.xxx.xxx"] 
    [xxx.xxx.xxx.xxx] executing command 
** [out :: xxx.xxx.xxx.xxx] ERROR: Gem bundler is not installed, run `gem install bundler` first. 
    command finished in 974ms 
*** [deploy:update_code] rolling back 
    * executing "rm -rf /home/deployer/apps/myrailsapp/releases/20130422101521; true" 
    servers: ["xxx.xxx.xxx.xxx"] 
    [xxx.xxx.xxx.xxx] executing command 
    command finished in 971ms 
failed: "env PATH=$HOME/.rvm/shims:$HOME/.rvm/bin:$PATH sh -c 'cd /home/deployer/apps/myrailsapp/releases/20130422101521 && bundle install --gemfile /home/deployer/apps/myrailsapp/releases/20130422101521/Gemfile --path /home/deployer/apps/myrailsapp/shared/bundle --deployment --quiet --without development test'" on xxx.xxx.xxx.xxx 

回答

0

你所得到的錯誤:

Bundler is not installed 

在你的Linode服務器之前,您必須安裝帶有捆綁:

gem install bundler 

此外,還必須在上面添加到您的deploy.rb

require "bundler/capistrano" 

而且,你的問題是RVM還沒有被添加到路徑:

你可以看看這個問題:

Ruby on Rails RVM $PATH issue

問候!

+0

我已經做寶石安裝捆綁在我的項目文件夾,並添加我在我的deploy.rb文件要求「捆綁/ Capistrano的」,但問題coudn't解決有人建議我做以下操作:設置:default_environment,{ 「 PATH'=>「$ HOME/.rvm/shims:$ HOME/.rvm/bin:$ PATH」 }這是正確的代碼,我有rvm安裝在我的電腦以及Linode VPS上? – PradeepGupta 2013-04-22 10:48:38

+0

我編輯了我的回覆。謝謝! – hyperrjas 2013-04-22 10:58:41

+0

沒有rvm已經安裝在.bashrc中的正確路徑,實際上有人建議我將rvm路徑添加到deploy.rb文件,所以冷安裝程序會發現捆綁器,但仍然是我的問題未解決,你能檢查它嗎? – PradeepGupta 2013-04-22 11:54:44