Capistrano deployment problems

Ruby on-RailsDeploymentCapistrano

Ruby on-Rails Problem Overview


When I type

cap production deploy

I get

Capfile locked at 3.1.0, but 3.2.0 is loaded

When I uninstall capistrano 3.2.0 I get

Could not find capistrano-3.2.0 in any of the sources
Run `bundle install` to install missing gems.

Me gemfile has

gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'

And Capfile

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/bundler'
require 'capistrano/rails/assets'

What to do in that case?

Ruby on-Rails Solutions


Solution 1 - Ruby on-Rails

It occurs that config/deploy.rb has lock '3.1.0'.

It was enough to change it to '3.2.0' and now it's working.

Solution 2 - Ruby on-Rails

Shouldn't Bundler handle this for you? If you have the version specified in your Gemfile, you can remove the lock version in config/deploy.rb. Then a bundle exec cap production deploy should do the trick.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKamil LelonekView Question on Stackoverflow
Solution 1 - Ruby on-RailsKamil LelonekView Answer on Stackoverflow
Solution 2 - Ruby on-RailsspyleView Answer on Stackoverflow