# Installing rails app on shared hosting

**URL:** <https://www.ruby-forum.com/t/installing-rails-app-on-shared-hosting/83129>\
**Category:** Rails\
**Created:** [January 23, 2007, 8:38pm UTC](https://www.ruby-forum.com/t/installing-rails-app-on-shared-hosting/83129 "2007-01-23T20:38:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@martin](https://www.ruby-forum.com/u/martin)\
**Post date:** [January 23, 2007, 8:38pm UTC](https://www.ruby-forum.com/t/installing-rails-app-on-shared-hosting/83129/1 "2007-01-23T20:38:57Z")

</div>

Hi,

I’m trying to install my rails app on a shared hosting webserver. I’ve  
compiled my own ruby, then installed gem and the mysql, fcgi and rails  
gems. The website is being served by apache and fcgi. When I try to  
load my web page, I’ve got the following error :

Application error  
Rails application failed to start properly

How do I know what’s wrong ? Where are the logs ? (the .log files in  
myapp/logs are empty).

Thanks for your help,  
Martin.

---

<div class="post-metadata">

**Author:** ![martin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@martin](https://www.ruby-forum.com/u/martin)\
**Post date:** [January 24, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/installing-rails-app-on-shared-hosting/83129/2 "2007-01-24T14:24:46Z")

</div>

Hello Martin,

Perhaps the Apache logs can shed some light on the problem.

What does you .htaccess file look like? Do dispatch.rb and  
dispatch.fcgi have the correct path to ruby on the first line? Are the  
permissions correct for your RAILS\_ROOT/log directory? Your log  
directories are empty and this could indicate that the user that you’re  
running apache under does not have write access to your apps log  
directory.

Jason

On Tue, 23 Jan 2007 02:41:59 -0000

---

<div class="post-metadata">

**Author:** ![martin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@martin](https://www.ruby-forum.com/u/martin)\
**Post date:** [January 25, 2007, 12:38pm UTC](https://www.ruby-forum.com/t/installing-rails-app-on-shared-hosting/83129/3 "2007-01-25T12:38:31Z")

</div>

checkout stuff on [http://www.hostingrails.com/forums](http://www.hostingrails.com/forums) covers pretty much  
everything about ror+apache + fcgi  
I think it most likely has to do with folder permissions and or shebang  
lines in files as dispatch\*  
look for those topics in the link above.

cheers,  
spyros

---

<div class="post-metadata">

**Author:** ![martin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/73ab20/32.png) [@martin](https://www.ruby-forum.com/u/martin)\
**Post date:** [January 26, 2007, 3:57pm UTC](https://www.ruby-forum.com/t/installing-rails-app-on-shared-hosting/83129/4 "2007-01-26T15:57:40Z")

</div>

I’ve found that if your app takes a while to crash/come back with an  
error  
and you can’t see anything in the Rails’ logs, the problem is [nearly  
without fail] in environment.rb or boot.rb in the config directory. If  
you’ve edited the files in Windows, do your self a favor and run  
dos2unix on  
the files. Seriously, just give it a try. If that doesn’t solve things  
you  
can sometimes get a more detailed view of what’s wrong by loading the  
console [script/console] or booting up an instance of webrick  
[script/server]. Those will crash to STDERR/STDOUT and you’ll be able to  
see  
better what’s going on.

If it’s crashing almost immediately, then the problem should be in the  
logs.  
Also, don’t forget to restart the dispatchers when you change your code.  
That can cause some unnecessary heartache as well.

Good luck,

RSL

On 1/25/07, removed\_email\_address@domain.invalid \<
