# Capistrano from windows to linux

**URL:** <https://www.ruby-forum.com/t/capistrano-from-windows-to-linux/58159>\
**Category:** Rails\
**Created:** [April 19, 2006, 1:49am UTC](https://www.ruby-forum.com/t/capistrano-from-windows-to-linux/58159 "2006-04-19T01:49:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim\_U](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Post date:** [April 19, 2006, 1:49am UTC](https://www.ruby-forum.com/t/capistrano-from-windows-to-linux/58159/1 "2006-04-19T01:49:59Z")

</div>

There seems to be a bug when deploying a rails application developed  
in windows to a linux box. The rake deploy command attempts to run the  
command “/install/path/current/script/process/reaper” but the files do  
not have the execute bit set.

What can I do to make sure either the execute bit is run or prepend  
the command with sh or ruby?

Thanks.

---

<div class="post-metadata">

**Author:** ![Tim\_U](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Post date:** [April 19, 2006, 2:06am UTC](https://www.ruby-forum.com/t/capistrano-from-windows-to-linux/58159/2 "2006-04-19T02:06:18Z")

</div>

There’s probably an easier way to do it, but I added a task to  
deploy.rb:

# Makes reaper and dispatch.fcgi executable

task :after\_update\_code, :roles =\> [:web, :db, :app] do  
run “chmod 744 #{release\_path}/script/process/reaper”  
run “chmod 744 #{release\_path}/script/\*”  
run “chmod 744 #{release\_path}/public/dispatch.fcgi”  
end

– Will

Tim U. wrote:

> There seems to be a bug when deploying a rails application developed  
> in windows to a linux box. The rake deploy command attempts to run the  
> command “/install/path/current/script/process/reaper” but the files do  
> not have the execute bit set.
> 
> What can I do to make sure either the execute bit is run or prepend  
> the command with sh or ruby?
> 
> Thanks.

---

<div class="post-metadata">

**Author:** ![Tim\_U](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Post date:** [April 19, 2006, 2:20am UTC](https://www.ruby-forum.com/t/capistrano-from-windows-to-linux/58159/3 "2006-04-19T02:20:39Z")

</div>

The problem is that the file is originally checked in on windows and  
windows  
has no execute bit for files.

In SVN you can set the property of the file so that when checked-out on  
a  
system that supports an execute bit it will be set.

Setting the executable bit is actually one of the examples given in the  
propset documentation:

[http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.propset.html](http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.propset.html)

Once you do that the reaper will have the execute bit set. Then you may  
discover other challenges…

Good luck,

-Kelly

---

<div class="post-metadata">

**Author:** ![Tim\_U](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/90db22/32.png) [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Post date:** [April 19, 2006, 3:09am UTC](https://www.ruby-forum.com/t/capistrano-from-windows-to-linux/58159/4 "2006-04-19T03:09:18Z")

</div>

Thanks that worked like a charm.
