2010-12-20 33 views
2

对不起,长标题:)。有一些Capistrano问题(虽然问题可能与捆绑)。尝试将Rails 3应用程序部署到Linode(Ubuntu 10.04 LTS)。我认为这可能是一个RVM问题,但我仍然遇到问题而不使用服务器上的RVM。Capistrano,Bundle Pathing问题

这是我得到的错误,当我运行“帽部署:更新”(设置程序,检查运行正常)

* executing "bundle install --gemfile /home/deploy/rails_apps/deed/releases/20101220040406/Gemfile --path /home/deploy/rails_apps/deed/shared/bundle --deployment --quiet --without development test" 
    servers: ["myserver"] 
    [myserver] executing command 
** [out :: myserver] The path `/home/deploy/Documents/Rails_Projects/deed/vendor/gems` does not exist. 
    command finished 

这里是我的deploy.rb

require 'bundler/capistrano' 

set :domain, "mydomain" 

set :application, "deed" 
set :repository, "[email protected]#{domain}:~/deed.git" 

set :scm, :git 

# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none` 
set :user, "deploy" 
set :deploy_to, "/home/deploy/rails_apps/#{application}" 
role :web, domain       # Your HTTP server, Apache/etc 
role :app, domain       # This may be the same as your `Web` server 
role :db, domain, :primary => true # This is where Rails migrations will run 

# If you are using Passenger mod_rails uncomment this: 
# if you're still using the script/reapear helper you will need 
# these http://github.com/rails/irs_process_scripts 
default_run_options[:pty] = true # Must be set for the password prompt from git to work 

set :default_environment, { 
    'PATH' => "/opt/ruby-enterprise-1.8.7-2010.02/bin:$PATH", 
    'RUBY_VERSION' => 'ruby 1.8.7', 
    'GEM_HOME' => '/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/', 
    'GEM_PATH' => '/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/', 
    'BUNDLE_PATH' => '/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/' 
} 

namespace :deploy do 
    task :start do ; end 
    task :stop do ; end 
    task :restart, :roles => :app, :except => { :no_release => true } do 
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}" 
    end 
end 

回答

0

问题是,我有

gem 'devise', :path => '~/Documents/Rails_Projects/deed/vendor/gems' 

在我的Gemfile中,因为我想改变用户创建后Devise重定向的位置,所以我只编辑了gem。删除Gemfile中的硬编码路径解决了这个问题,但我找不到一条可行的路径。

我应该在应用程序中重写该设计控制器,而不是在本地引用它然后进行编辑?