Bundler: You are trying to install in deployment mode after changing your Gemfile

The error message you’re getting regarding Gemfile.lock may be because your Gemfile and Gemfile.lock don’t agree with each other. It sounds like you’ve changed something in your Gemfile since you last ran bundle install (or update). When you bundle install, it updates your Gemfile.lock with any changes you’ve made to Gemfile. Make sure you run … Read more

How do I run a rake task from Capistrano?

A little bit more explicit, in your \config\deploy.rb, add outside any task or namespace: namespace :rake do desc “Run a task on a remote server.” # run like: cap staging rake:invoke task=a_certain_task task :invoke do run(“cd #{deploy_to}/current; /usr/bin/env rake #{ENV[‘task’]} RAILS_ENV=#{rails_env}”) end end Then, from /rails_root/, you can run: cap staging rake:invoke task=rebuild_table_abc

Using capistrano to deploy from different git branches

This works with Capistrano >= 3.1: add this line to config/deploy.rb: set :branch, ENV[‘BRANCH’] if ENV[‘BRANCH’] and then call capistrano with: cap production deploy BRANCH=master This solution works with Capistrano < 3.1: # call with cap -s env=”<env>” branch=”<branchname>” deploy set :branch, fetch(:branch, “master”) set :env, fetch(:env, “production”)

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)