ruby-on-railsdeploymentcapistranocap

Capistrano - "cannot load such file --deploy"


Working on an existing rails project that is set up to deploy with Capistrano. Trying to determine my first step in figuring out this error. Can anyone point me in the right direction of what I need to do?

cap aborted!
cannot load such file -- deploy
/Users/lrh/Projects/Rails/febennett.com/Capfile:1:in `load'
/Users/lrh/Projects/Rails/febennett.com/Capfile:1:in `<top (required)>'
/Users/lrh/.rvm/gems/ruby-2.0.0-p247@febennett/gems/capistrano-      
3.0.1/lib/capistrano/application.rb:22:in `load_rakefile'
/Users/lrh/.rvm/gems/ruby-2.0.0-p247@febennett/gems/capistrano-
3.0.1/lib/capistrano/application.rb:12:in `run'
/Users/lrh/.rvm/gems/ruby-2.0.0-p247@febennett/gems/capistrano-3.0.1/bin/cap:3:in `<top   
(required)>'
/Users/lrh/.rvm/gems/ruby-2.0.0-p247@febennett/bin/cap:23:in `load'
/Users/lrh/.rvm/gems/ruby-2.0.0-p247@febennett/bin/cap:23:in `<main>'
(See full trace by running task with --trace)

Capfile Below

load 'deploy'
# Uncomment if you are using Rails' asset pipeline
load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks

Thanks! Hope this is sufficient information.


Solution

  • You're using Capistrano 3, but the project you're using was probably set up for Capistrano 2. Version 3 was a complete rewrite and requires a fair amount of configuration updates to work.

    Assuming you have the correct 2.x version of Capistrano in your project's Gemfile, you should be using bundle exec cap (to use your project's version) instead of just cap (which will use the globally-installed 3.x version).

    There is an upgrade guide available, though it's not terribly in depth.