# Capistrano option "--apply-to" is invalid

**URL:** <https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068>\
**Category:** Deployment\
**Created:** [July 14, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068 "2008-07-14T22:42:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/96bed5/32.png) [@alexd](https://www.ruby-forum.com/u/alexd)\
**Post date:** [July 14, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068/1 "2008-07-14T22:42:40Z")

</div>

I’m attempting to follow the instructions in “Agile Web D. with  
Rails” for deploying a Rails application. On page 625 it tells me to  
type “cap --apply-to /local/project/path [applicationname]”

My application is called “unit\_converter” and it is in directory  
“/export/home/adecaria/public\_html/” I am typing “cap --apply-to  
/export/home/adecaria/public\_html/unit\_converter” and I am getting the  
following error:

“/usr/lib/ruby/1/8/optparse.rb:1381:in `complete’: invalid opotion:  
–apply-to (OptionParser::InvalidOption)”  
followed by several “from” lines.

Can someone tell me what is wrong?

Thanks,

Alex

---

<div class="post-metadata">

**Author:** ![alexd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/96bed5/32.png) [@alexd](https://www.ruby-forum.com/u/alexd)\
**Post date:** [July 14, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068/2 "2008-07-14T22:48:12Z")

</div>

Yeah, --apply-to was cap1.x only. Capistrano 2.x uses `capify’:

```
$ capify /export/home/adecaria/public_html/unit_converter

```

Cap 1 and cap 2 are different enough that the awdwr book won’t be much  
help for getting off the ground, I’m afraid. ☹ You might want to just  
install cap 1.4.3 for that.

- Jamis

---

<div class="post-metadata">

**Author:** ![alexd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/96bed5/32.png) [@alexd](https://www.ruby-forum.com/u/alexd)\
**Post date:** [July 14, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068/3 "2008-07-14T22:58:01Z")

</div>

Jamis B. wrote:

> Yeah, --apply-to was cap1.x only. Capistrano 2.x uses `capify’:
> 
> ```
> $ capify /export/home/adecaria/public_html/unit_converter
> 
> ```
> 
> Cap 1 and cap 2 are different enough that the awdwr book won’t be much  
> help for getting off the ground, I’m afraid. ☹ You might want to just  
> install cap 1.4.3 for that.
> 
> - Jamis

Thanks! - Alex
