2010-12-20 15 views
2

長いタイトルに申し訳ありません:)。カピストラーノの問題がいくつかある(問題はバンドラーにあるかもしれないが)。 Linode(Ubuntu 10.04 LTS)にRails 3アプリをデプロイしようとしています。私はそれがRVMの問題かもしれないと思ったが、私はまだサーバー上でRVMを使用せずに問題を解決している。ここでCapistrano、バンドルのパス設定の問題

は、私が実行したときに、私は取得エラーです「キャップ展開を:更新」(セットアップと正常に動作チェック)

* 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

ローカルでそれを参照して編集するのではなく、私のアプリでそのDeviseコントローラをオーバーライドするだけですか?

はい、絶対に。 Deviseに付属のジェネレーターを見てください。具体的には、ビューとコントローラーについて:http://rubydoc.info/github/plataformatec/devise/master/file/README.rdoc#Configuring_views。 users_controllerを作成し、そこでdeviseの機能をオーバーライドしたいと思うでしょう。

+0

ありがとうございました。 – kmurph79

0

問題は、私が持っていたということでした私のGemfileで

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

私が考案は、ユーザーの作成後にリダイレクト場所を変更したかったので、私はちょうど宝石を編集したとして。 Gemfileでハードコードされたパスを削除すると問題は解決しましたが、うまくいかないパスが見つかりませんでした。

ローカルでそれを参照して編集するのではなく、私のアプリでそのDeviseコントローラをオーバーライドするだけですか?