# MacOS X 10.5: wrong ruby path in rails dispatcher -\> broken deployment

**URL:** <https://www.ruby-forum.com/t/macos-x-10-5-wrong-ruby-path-in-rails-dispatcher-broken-deployment/123622>\
**Category:** Rails\
**Created:** [December 19, 2007, 8:44am UTC](https://www.ruby-forum.com/t/macos-x-10-5-wrong-ruby-path-in-rails-dispatcher-broken-deployment/123622 "2007-12-19T08:44:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jerry](https://www.ruby-forum.com/u/jerry)\
**Post date:** [December 19, 2007, 8:44am UTC](https://www.ruby-forum.com/t/macos-x-10-5-wrong-ruby-path-in-rails-dispatcher-broken-deployment/123622/1 "2007-12-19T08:44:29Z")

</div>

On MacOS X 10.5 the path for ruby in the three dispatcher-files inside  
of a rails project is wrong:

#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

It should be:

#!/usr/bin/ruby

Deployment of a rails application to an other unix or linux box is  
broken caulse of the wrong path 😉

Test:

#!/bin/bash  
cd ~/Desktop  
rails broken\_rails\_dispatcher  
cd broken\_rails\_dispatcher/public  
cat dispatch.cgi | head -n 1  
cat dispatch.fcgi | head -n 1  
cat dispatch.rb | head -n 1

The workaround is to exchange the paths every time after creating a  
rails project…

regards  
jerry

---

<div class="post-metadata">

**Author:** ![jerry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@jerry](https://www.ruby-forum.com/u/jerry)\
**Post date:** [December 19, 2007, 9:00am UTC](https://www.ruby-forum.com/t/macos-x-10-5-wrong-ruby-path-in-rails-dispatcher-broken-deployment/123622/2 "2007-12-19T09:00:54Z")

</div>

On 19 Dec 2007, at 07:43, jerry wrote:

> Deployment of a rails application to an other unix or linux box is  
> broken caulse of the wrong path 😉

Apple have obviously fiddled things since that’s where rails is on  
there boxes is fair enough. It’s not like #!/usr/bin/ruby is a  
catchall either, that’s not where ruby is on our servers. This is why  
#!/usr/bin/env ruby  
exists

Fred
