I have an app on bitbucket. I am using a well baked capistrano recipe
which I use with github apps without problems and for some reason
bundler is not able to figure out where the gemfile is.  The error I
get is.

 /....../app_name/production/releases/config/Gemfile not found

The same deploy.rb works with github so I am thinking something is
weird with bitbucket here. Anybody have any other clues?


As you see instead of a release number it puts the word "config" in
there.

The path is set in config/depoy/production.rb

set :rails_env, :production
set :deploy_to, "/home/#{user}/#{application}/#{rails_env}"


deploy.rb looks like this.

require "bundler/capistrano"

set :bundle_dir,     "/home/user_name/shared/bundle"         # install
into "system" gems
set :bundle_flags,   "--quiet"  # no verbose output
set :bundle_without, ['development', 'test']                 # bundle
all gems (even dev & test)


require 'capistrano/ext/multistage'

set :application, "app_name"
set :user, 'user_name'
set :scm, :git
set :repository,  "g...@bitbucket.org:........"
set :git_enable_submodules, 1
set :ssh_options, { :forward_agent => true }


set :stages, %w(staging production)
set :default_stage, "production"


set :deploy_via, :remote_cache
set :use_sudo, false

set :port, xxxx

role :web, "xx.xx.xx.xx"
role :app, "xx.xx.xx.xx"
role :db,  "xx.xx.xx.xx", :primary => true

namespace :deploy do
  [:stop, :start, :restart].each do |task_name|
    task task_name, :roles => [:app] do
      run "cd #{current_path} && touch tmp/restart.txt"
    end
  end
  task :symlink_configs do
    run %( cd #{release_path} &&
      ln -nfs #{shared_path}/config/database.yml #{release_path}/
config/database.yml
    )
  end
end

after :deploy, 'deploy:cleanup'

before :"deploy:symlink" do
  run "cd #{release_path}; RAILS_ENV=#{rails_env} bundle exec rake
assets:precompile"
end

after "deploy:update_code" do
  deploy.symlink_configs
end

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to capistrano@googlegroups.com
* To unsubscribe from this group, send email to 
capistrano+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to