# Developed in window... hosting in a linux box

**URL:** <https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150>\
**Category:** Rails\
**Created:** [January 4, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150 "2007-01-04T21:45:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfredogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Post date:** [January 4, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150/1 "2007-01-04T21:45:11Z")

</div>

Hi all,

I’ve developed mi RoR app in my windows with RadRails app, and affter  
that I’ve hosted it on my Linux server with FastCGI and i doesnt run. It  
show this message:

Rails application failed to start properly

, i’ve created a applicaction direct in my server and it runs perfectly.

any idea??

Alfredo

---

<div class="post-metadata">

**Author:** ![alfredogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Post date:** [January 4, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150/2 "2007-01-04T22:11:28Z")

</div>

Alfredo G. wrote:

> Hi all,
> 
> I’ve developed mi RoR app in my windows with RadRails app, and affter  
> that I’ve hosted it on my Linux server with FastCGI and i doesnt run. It  
> show this message:
> 
> Rails application failed to start properly
> 
> , i’ve created a applicaction direct in my server and it runs perfectly.
> 
> any idea??
> 
> Alfredo

Could be a line termination problem. Windows generally uses CR+LF,  
whereas \*nix expects just LF. Files containing CRs (carriage return)  
will confuse most programs. Check the line termination options for your  
file transfer utility.

---

<div class="post-metadata">

**Author:** ![alfredogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Post date:** [January 4, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150/3 "2007-01-04T22:39:29Z")

</div>

Im using FileZilla, it doesnt have this option that yo comment “Check  
the line termination options for your file transfer utility”

Mick S. wrote:

> Alfredo G. wrote:
> 
> > Hi all,
> > 
> > I’ve developed mi RoR app in my windows with RadRails app, and affter  
> > that I’ve hosted it on my Linux server with FastCGI and i doesnt run. It  
> > show this message:
> > 
> > Rails application failed to start properly
> > 
> > , i’ve created a applicaction direct in my server and it runs perfectly.
> > 
> > any idea??
> > 
> > Alfredo
> 
> Could be a line termination problem. Windows generally uses CR+LF,  
> whereas \*nix expects just LF. Files containing CRs (carriage return)  
> will confuse most programs. Check the line termination options for your  
> file transfer utility.

---

<div class="post-metadata">

**Author:** ![alfredogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Post date:** [January 4, 2007, 10:55pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150/4 "2007-01-04T22:55:20Z")

</div>

Try transferring text files in ASCII mode, since FileZilla may be  
transferring them in binary mode. Alternatively, add the relevant Rails  
file types to the list of ASCII file types recognised by FileZilla.

Alfredo G. wrote:

> Im using FileZilla, it doesnt have this option that yo comment “Check  
> the line termination options for your file transfer utility”
> 
> Mick S. wrote:
> 
> > Alfredo G. wrote:
> > 
> > > Hi all,
> > > 
> > > I’ve developed mi RoR app in my windows with RadRails app, and affter  
> > > that I’ve hosted it on my Linux server with FastCGI and i doesnt run. It  
> > > show this message:
> > > 
> > > Rails application failed to start properly
> > > 
> > > , i’ve created a applicaction direct in my server and it runs perfectly.
> > > 
> > > any idea??
> > > 
> > > Alfredo
> > 
> > Could be a line termination problem. Windows generally uses CR+LF,  
> > whereas \*nix expects just LF. Files containing CRs (carriage return)  
> > will confuse most programs. Check the line termination options for your  
> > file transfer utility.

---

<div class="post-metadata">

**Author:** ![alfredogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Post date:** [January 6, 2007, 7:30pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150/5 "2007-01-06T19:30:39Z")

</div>

Another less obvious one is the fact that the first line in  
public/dispatch.fcgi contains the path to the Ruby interpreter on  
Windows  
and not on Linux.

#!c:\ruby\bin\ruby.exe

Should be

#!/usr/bin/ruby

or something similar.

The easiest thing to do is to generate the Rails app on the host and  
then  
move your files over, making sure not to overwrite dispatch.fcgi. This  
often ensures the proper execute permissions are set as well.

Or, develop on Linux 🙂

---

<div class="post-metadata">

**Author:** ![alfredogz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@alfredogz](https://www.ruby-forum.com/u/alfredogz)\
**Post date:** [January 19, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/developed-in-window-hosting-in-a-linux-box/81150/6 "2007-01-19T16:29:35Z")

</div>

=) Definitely develop on linux. What has been working perfectly for me  
is using Eclipse and/or RadRails on my Windows box, but store the  
project on my linux box and access it over a samba share. The only  
drawbacks to this are some permissions issues that occasionally come up  
and are easily fixed and that you can’t run any of the commands from  
within your IDE. But how often do you use those anyway? You can just  
execute them in a shell.

Also, check permissions on dispatch.fcgi if you haven’t already.

That shebang line error has gotten me several times before I went to my  
current setup. Also, it doesn’t really tell you what is going on.
