質問

Following is the debug log,

 [a4e2341c] Running /usr/bin/env [ ! -d ~/.rbenv/versions/2.1.0 ] on xxx.xxx.xxx
 [a4e2341c] Command: [ ! -d ~/.rbenv/versions/2.1.0 ]
 [a4e2341c] Finished in 6.761 seconds with exit status 1 (failed).

what does this failure means? the directory doesn't exist? but it do exist.

also another one,

Running ~/.rbenv/bin/rbenv exec bundle exec rake tmp:cache:clear on www.neonan.com
Command: cd /home/ben/staging/releases/20140305160352 && ( RBENV_ROOT=~/.rbenv RBENV_VERSION=2.1.0 ~/.rbenv/bin/rbenv exec bundle exec rake tmp:cache:clear )

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

what does this mean? help!

役に立ちましたか?

解決

I had a similar issue. It looks like one of the gem you are using requires a git command to be run. With capistrano version 3, ".git" folder is no longer kept in releases folder. Instead it uses a folder called "repo".

You should probably fix the gem as a long term solution so that it is not needed.

I worked around the problem by basically adding in a task that copied "repo" folder as ".git" folder under the releases folder.

  namespace :deploy do

  desc 'Copies .git folder'
  task :copy_git do
    on roles(:app) do
        puts release_path
        within release_path do
              execute :cp, '-r', repo_path, '.git'
        end
    end
  end

  before 'bundler:install', 'deploy:copy_git'
end

他のヒント

@akshah123 thanks for the info. I had this issue deploying via Capistrano 3 to a test area where my solution wasn't ready to be delivered as a packaged gem. The .gemspec file had the following idiom

spec.files         = `git ls-files`.split($/)

replaced it with

spec.files         = `if [ -d '.git' ]; then git ls-files; fi`.split($/)
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top