Reputation: 33148
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.
Upvotes: 3
Views: 1396
Reputation: 1
$ rbenv rehash
Since I am using rbenv, the above command worked for me!
Upvotes: 0
Reputation: 119
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.
Upvotes: 4
Reputation: 1121
If you have installed Ruby & Capistrano for debian package then the Capfile can be now found in directory /usr/lib/ruby/vendor_ruby/capistrano/templates/Capfile. So use the command cap --rakefile /usr/lib/ruby/vendor_ruby/capistrano/templates/Capfile install indicating the right path to Capfile.
Upvotes: 1
Reputation: 51
I had the same problem, my capistrano used to work fine, but something happened. I believe i updated my ruby in some moment and the capistrano stopped to work. So when i ran cap install
the result was:
So i discovered that the Capfile changed directory, from /usr/lib/ruby/vendor_ruby/Capfile to /usr/lib/ruby/vendor_ruby/capistrano/templates/Capfile. So to work i used the command cap --rakefile /usr/lib/ruby/vendor_ruby/capistrano/templates/Capfile install
and it worked for me.
Upvotes: 1