Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'No Rakefile found' error from the 'cap install' command

I'm trying to convert an old project from cap2 to cap3. After deleting the old Capfile, running cap install gives me:

$ cap install
(Backtrace restricted to imported tasks)
cap aborted!
No Rakefile found (looking for: capfile, Capfile, capfile.rb, Capfile.rb, /usr/lib/ruby/vendor_ruby/Capfile)
/usr/bin/cap:3:in `<main>'
(See full trace by running task with --trace)

isn't the install command meant to create the Capfile?

I get the same error if I run the cap install command on a new project (= empty folder).

I'm using version 3.4.0.

like image 585
Tim Fountain Avatar asked Apr 10 '26 23:04

Tim Fountain


1 Answers

I setup a test environment and re-produced the error:

$ cap install
(Backtrace restricted to imported tasks)
cap aborted!
No Rakefile found (looking for: capfile, Capfile, capfile.rb,  Capfile.rb, /usr/lib/ruby/vendor_ruby/Capfile)
/usr/bin/cap:3:in `<main>'
(See full trace by running task with --trace)

$ cap --trace install
cap aborted!
No Rakefile found (looking for: capfile, Capfile, capfile.rb,  Capfile.rb, /usr/lib/ruby/vendor_ruby/Capfile)
/usr/lib/ruby/vendor_ruby/rake/application.rb:684:in `raw_load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:94:in `block in load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:176:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:93:in `load_rakefile'
/usr/lib/ruby/vendor_ruby/rake/application.rb:77:in `block in run'
/usr/lib/ruby/vendor_ruby/rake/application.rb:176:in `standard_exception_handling'
/usr/lib/ruby/vendor_ruby/rake/application.rb:75:in `run'
/usr/lib/ruby/vendor_ruby/capistrano/application.rb:15:in `run'
/usr/bin/cap:3:in `<main>'

Located Capfile and ran the command

$ cap --rakefile /usr/lib/ruby/vendor_ruby/capistrano/templates/Capfile install
mkdir -p config/deploy
create config/deploy.rb
create config/deploy/staging.rb
create config/deploy/production.rb
mkdir -p lib/capistrano/tasks
create Capfile
Capified

It works.

like image 65
Raju Avatar answered Apr 15 '26 23:04

Raju



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!