Index.html in rails-app/public

Hello All,

I have created a rails application on hosrtmonster and created
symbolic link of app’s public folder. Now default link is to
index.html of rails-app/public folder.
I want to set another page as homepage. I also set root in routes.rb
file but its not working, also remove default index.html from public
folder.

Can anyone tell me how to add link
rails-app/app/views/home/index.html.erb to index.html in
/rails-app/public folder webpage?

If i have created symbolic link to rails-app/…/…/home then its not
working. .html.erb file is not working directly in browser.


Mandeep K.

just remove the index.html in the /public folder.

On 25 August 2012 17:27, Mandeep K. [email protected] wrote:

rails-app/app/views/home/index.html.erb to index.html in
/rails-app/public folder webpage?

If i have created symbolic link to rails-app/…/…/home then its not
working. .html.erb file is not working directly in browser.

Sorry I cannot understand what you are trying to do.
What URL are you trying to use?
Are you trying to run a controller action from that url? Is so what
controller and action?

Colin

On Sat, Aug 25, 2012 at 10:05 PM, Colin L. [email protected]
wrote:

Sorry I cannot understand what you are trying to do.
What URL are you trying to use?
Are you trying to run a controller action from that url? Is so what
controller and action?

I have created a rails app on hostmonster and there to run any rails I
have to create symbolic link to rails app like
$ ln -s ~/APPNAME/public ~/public_html/APPNAME

I also created home controller using
$ rails generate controller home

Then I have removed index.html from rails-app/public (default page).
when I open that link then it gives folder files
check this Blog - Mandeep Simak

I also set the routes.rb file for home controller but still not working.
How to set route to any controller through public folder of app.

Now are you getting or still have confusion. I am not able to explain
my problem properly. Please try to understand and help me.

Thanks in advance.


Mandeep K.

Try to delete index.html in public folder it’s just a stub

, 25 2012 ., 20:27:13 UTC+4 Mandy :

On Sat, Aug 25, 2012 at 9:59 PM, [email protected] wrote:

Try to delete index.html in public folder it’s just a stub

, 25 2012 ., 20:27:13 UTC+4 Mandy :

I have deleted index.html. Now check: http://blog.simak.in/
Its not working. What to do now ?


Mandeep K.

On Aug 27, 2012, at 1:54 AM, uma mahesh varma Seeram wrote:

I hope its not pointing to your rails application folder and its pointing to
some other folder in server and there by you are getting the default page.

Thank You,
Uma Mahesh.

Also, check if Apache or Nginx is set to provide a default index in
folders that don’t contain one. mod_autoindex or similar…

Walter

I hope its not pointing to your rails application folder and its
pointing
to some other folder in server and there by you are getting the default
page.

Thank You,
Uma Mahesh.

On Aug 29, 2012, at 10:33 AM, Mandeep K. wrote:

If you’re using Apache and Passenger, try adding this line inside the
block in the relevant httpd.conf for this application:

Options -Indexes

Restart Apache and see if that fixed it for you. It really only will if
Options +Indexes is set at a higher level in your general Apache
configuration file tree. I’m just guessing here, hope it helps.

Walter

On Wed, Aug 29, 2012 at 8:14 PM, Walter Lee D. [email protected]
wrote:

On Aug 29, 2012, at 10:33 AM, Mandeep K. wrote:

> Walter Ok I'll try this. Thanks.


Mandeep K.

On Wed, Aug 29, 2012 at 7:49 PM, Walter Lee D. [email protected]
wrote:

On Aug 27, 2012, at 1:54 AM, uma mahesh varma Seeram wrote:

> > Also, check if Apache or Nginx is set to provide a default index in folders that don't contain one. mod_autoindex or similar...

I am not getting this. Means i have to remove this apache setting that
automatically create default index page?


Mandeep K.

On Wed, Aug 29, 2012 at 8:16 PM, Mandeep K. [email protected]
wrote:

On Wed, Aug 29, 2012 at 8:14 PM, Walter Lee D. [email protected] wrote:

>> If you're using Apache and Passenger, try adding this line inside the block in the relevant httpd.conf for this application: >> >> Options -Indexes >> >> Restart Apache and see if that fixed it for you. It really only will if Options +Indexes is set at a higher level in your general Apache configuration file tree. I'm just guessing here, hope it helps. >> >> Walter >

I tried this now see the result blog.simak.in.
I think ruby on rails app is not working on hostmonster.


Mandeep K.

for your first app, you should try using heroku. it it much simpler to
get
an app up and running than the current path you are taking.

Jason