質問

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.

役に立ちましたか?

解決

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.

他のヒント

You need to move/delete your older cap files as exactly your project was before using cap 2 instead of cap 3. Now if you want to upgrade your cap to 3 do following before this.

Delete the following mentioned files or you can simply move same files somewhere else as below:

mkdir old_cap
mv Capfile old_cap
mv config/deploy.rb old_cap
mv config/deploy/ old_cap # --> only for multistage setups 

Now you can proceed with same command. All the best :)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top