jerry
2007-Dec-19 07:43 UTC
MacOS X 10.5: wrong ruby path in rails dispatcher -> broken deployment
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2007-Dec-19 08:00 UTC
Re: MacOS X 10.5: wrong ruby path in rails dispatcher -> broken deployment
On 19 Dec 2007, at 07:43, jerry wrote:> > 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 ;-)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> > > 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 > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---