2012-07-13 26 views
0

我對部署有問題。 我有一個Ubuntu 11.10服務器,我已經安裝紅寶石1.9.2和軌道3.2.6與RVM。 我還沒有拉我的混帳,它位於/ home/** /idepro.git 我跑了「capify」。命令,我修改了deploy.rb文件。 當我運行「cap deploy:setup」和「cap deploy:check」命令時,我沒有任何問題,但是當我運行「cap deploy」時,我遇到了環境路徑問題。錯誤是:ror deployment with capistrano - > cap:deploy

** [out :: 176.58.****] /usr/bin/env: ruby 
** [out :: 176.58.****] : No such file or directory 

這些都是ROR的路徑:

******@******:~$ which ruby 
/home/******/.rvm/rubies/ruby-1.9.2-p320/bin/ruby 

,這是$ PATH的值:

******@******:~$ echo $PATH 
/home/******/.rvm/gems/ruby-1.9.2-p320/bin:/home/******/.rvm/gems/[email protected]/bin:/home/******/.rvm/rubies/ruby-1.9.2-p320/bin:/home/******/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/******/.rvm/gems/ruby-1.9.2-p320/bin 

這是我deploy.rb文件:

# RVM bootstrap 
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) 
#require 'rvm/capistrano' 
set :rvm_ruby_string, 'ruby1.9.2-p290' 

# bundler bootstrap 
require 'bundler/capistrano' 

# main details 
set :application, "176.58.******" 
role :web, "176.58.******" 
role :app, "176.58.******" 
role :db, "176.58.******", :primary => true 

ssh_options[:port] = ****** 
set :user, "******" 
set :password, "******" 

# server details 
default_run_options[:pty] = true 
ssh_options[:forward_agent] = true 
set :deploy_to, "/var/www/idealarm2" 
set :deploy_via, :remote_cache 
set :user, "passenger" 
set :use_sudo, false 

# repo details 
set :scm, :git 
set :scm_username, "passenger" 
set :repository, "/home/******/idepro.git" 
set :branch, "master" 
set :git_enable_submodules, 1 

# tasks 
namespace :deploy do 
    task :start, :roles => :app do 
     run "touch #{current_path}/tmp/restart.txt" 
    end 

    task :stop, :roles => :app do 
     # Do nothing. 
    end 

    desc "Restart Application" 
    task :restart, :roles => :app do 
     run "touch #{current_path}/tmp/restart.txt" 
    end 
end 

#default_environment['PATH']='/home/******/.rvm/gems/ruby-1.9.2-p320/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin/:/usr/bin:/bin' 
#default_environment['GEM_PATH']='/home/******/.rvm/gems/ruby-1.9.2-p320:/home/******/.rvm/gems/[email protected]:/usr/lib/ruby/gems/1.$ 

任何人都可以幫助我的PATH配置uration?

回答

相關問題