# Shared Host Problem

**URL:** <https://www.ruby-forum.com/t/shared-host-problem/193910>\
**Category:** Rails\
**Created:** [August 26, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/shared-host-problem/193910 "2010-08-26T14:20:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ainar\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Ainar\_A](https://www.ruby-forum.com/u/Ainar_A)\
**Post date:** [August 26, 2010, 2:20pm UTC](https://www.ruby-forum.com/t/shared-host-problem/193910/1 "2010-08-26T14:20:55Z")

</div>

Hi, I created my app on shared host in home folder, it’s called  
“first”. OK then I following to the tutorial I runned in putty(CMD or  
Terminal) [~]# mv public\_html public\_html\_bk  
[~]# ln -s yournewrailsapp/public public\_html

so now browser looks for my first/public folder, BUT the problem is  
that I deleted default index.html file in rails app public folder and  
created welcome controller + index.html.erb file under views-\>welcome,  
now when I go to [www.mydomain.com](http://www.mydomain.com) I can see in browser just ordered  
files and folders from my public folder, it doesn’t show up my created  
layout, why it doesn’t show and how can I fix it to able to see my  
layout

---

<div class="post-metadata">

**Author:** ![Ainar\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Ainar\_A](https://www.ruby-forum.com/u/Ainar_A)\
**Post date:** [August 26, 2010, 5:34pm UTC](https://www.ruby-forum.com/t/shared-host-problem/193910/2 "2010-08-26T17:34:45Z")

</div>

Ainar A. wrote:

> Hi, I created my app on shared host in home folder, it’s called  
> “first”. OK then I following to the tutorial I runned in putty(CMD or  
> Terminal) [~]# mv public\_html public\_html\_bk  
> [~]# ln -s yournewrailsapp/public public\_html
> 
> so now browser looks for my first/public folder, BUT the problem is  
> that I deleted default index.html file in rails app public folder and  
> created welcome controller + index.html.erb file under views-\>welcome,  
> now when I go to [www.mydomain.com](http://www.mydomain.com) I can see in browser just ordered  
> files and folders from my public folder, it doesn’t show up my created  
> layout, why it doesn’t show and how can I fix it to able to see my  
> layout

You can’t run a Rails app like that, because the Ruby interpreter won’t  
be invoked, so all you’ll see in the browser is your source files. What  
host are you using, and how do they recommend deploying your Rails  
applications?

## Best,

Marnen Laibow-koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Ainar\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Ainar\_A](https://www.ruby-forum.com/u/Ainar_A)\
**Post date:** [August 26, 2010, 4:40pm UTC](https://www.ruby-forum.com/t/shared-host-problem/193910/3 "2010-08-26T16:40:17Z")

</div>

Haven’t actually done any rails in a long time but did you point your  
route.rb file to set your welcome controller as your root?

---

<div class="post-metadata">

**Author:** ![Ainar\_A](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/f6c823/32.png) [@Ainar\_A](https://www.ruby-forum.com/u/Ainar_A)\
**Post date:** [August 27, 2010, 7:55am UTC](https://www.ruby-forum.com/t/shared-host-problem/193910/4 "2010-08-27T07:55:47Z")

</div>

create a symlink to point to the public folder and enable the shebang.  
different hosting company has different configuration.  
can you tell me which hosting company you had?

all you have to make is to read and understand .htaccess?

when you create a domain you must point to the public folder as running  
document root.

On Thu, Aug 26, 2010 at 9:04 PM, Marnen Laibow-Koser
