RefineryCMS routes for Home page doesn't work
Asked Answered
V

5

3

just started with RefineryCMS, sorry for newbie question. It runs fine locally and deployed luckily on Heroku Cedar stack. Created a page called Home. /pages/home responds fine.

routes.rb

root :to => 'pages#home'

and works on localhost:3000 but on Heroku it gives error.

The app is here:

http://refkocedar.herokuapp.com/home works http://refkocedar.herokuapp.com/ does not work

How to set Home page to root on Heroku? Thanks for help!

$ heroku logs

2012-04-03T02:19:57+00:00 heroku[router]: GET refkocedar.herokuapp.com/assets/application-ddce3db0fc667014faf95d85d24c71d4.js dyno=web.1 queue=0 wait=0ms service=4ms status=304 bytes=0
2012-04-03T02:19:58+00:00 heroku[router]: GET refkocedar.herokuapp.com/favicon.ico dyno=web.1 queue=0 wait=0ms service=4ms status=304 bytes=0
2012-04-03T02:19:58+00:00 app[web.1]: cache: [GET /favicon.ico] miss
2012-04-03T02:20:04+00:00 app[web.1]: 
2012-04-03T02:20:04+00:00 app[web.1]: 
2012-04-03T02:20:04+00:00 app[web.1]: Started GET "/" for 80.98.142.244 at 2012-04-03 02:20:04 +0000
2012-04-03T02:20:04+00:00 app[web.1]: cache: [GET /] miss
2012-04-03T02:20:04+00:00 app[web.1]: cache: [GET /] miss
2012-04-03T02:20:04+00:00 app[web.1]: cache: [GET /] miss
Voccola answered 3/4, 2012 at 2:21 Comment(2)
Can you run heroku logs to see what the error is?Pastoralist
sure, forgot it, thanks, just addedVoccola
P
8

I was trying Refinery recently on myocal workspace and had a similar issue. Not sure what is different on heroku as I didnt try anything on it. This solution worked for me.

http://groups.google.com/group/refinery-cms/browse_thread/thread/504b72ec2f1575d5

Pronate answered 3/4, 2012 at 2:49 Comment(0)
T
6

Refinery admin page you have a option as "forward this page" under advanced options. Set "/"

Here I explain step by step how to set up your home as root_path(localhost:3000).

go to http://localhost:3000/refinery/login

1.Then Login with your username and password.

2.Click to Pages

3.click edit link which page you want to see when localhost:3000 loaded.

4.Click Advanced Options

5.Set / in Forward this page to another website or page text box. Then click Save

6.Now your home page will show on localhost:3000

Tanga answered 10/7, 2013 at 7:1 Comment(0)
S
3

What Sonu linked to from google groups is correct. You need to add the following in your routes.rb:

root :to => 'pages#home'

And then change the setting on your home page (under advanced settings) that says:

Forward this page to another website or page

and have this forwarded to /

This worked for me.

Stheno answered 17/4, 2012 at 19:4 Comment(0)
S
0

Very short answer. Under "Advanced Options", set "Forward this page to another website or page" to /

It doesn't sound like it should work, but it does.

Selwin answered 15/1, 2014 at 17:10 Comment(0)
C
0

I'd say this is almost certainly an error with your routes.rb file.

I was working through the Rails Tutorial by Michael Hartl to setup my new app and ran into this error over and over again.

Check to make sure that Heroku knows the correct root path e.g. " root 'application#hello'"

Counterblast answered 9/12, 2014 at 18:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.