Switch to your website link goes to 404 error page

29 views
Skip to first unread message

olla ollu

unread,
Jul 4, 2015, 3:16:45 PM7/4/15
to refine...@googlegroups.com
So in my new refinery app after signing up the first user, http://localhost:3000 returns a 404 error page and even when on the back end and I click on "Switch to your website", I still get the same 404 error page

Details
- I used rails new my_new_application -m http://refinerycms.com/t/edge -d postgresql to generate a new refinery app as always
- Went to my database.yml file and added my superuser username and password for my postgres database
- Ran a rake db:create and a rake db:migrate
- Started on http://localhost:3000/refinery and went ahead to sign up my first user
- Clicked on "Switch to your website" and I get the 404 error. 
- Checked logs and this was there:

 Started GET "/" for ::1 at 2015-07-04 20:05:43 +0100
Processing by Refinery::PagesController#home as HTML
  Parameters: {"locale"=>:en}
  Refinery::Page Load (1.0ms)  SELECT  "refinery_pages".* FROM "refinery_pages"
WHERE "refinery_pages"."link_url" = $1  ORDER BY "refinery_pages"."id" ASC LIMIT
 1  [["link_url", "/"]]
  Refinery::Page Load (0.0ms)  SELECT  "refinery_pages".* FROM "refinery_pages"
WHERE "refinery_pages"."menu_match" = $1  ORDER BY "refinery_pages"."id" ASC LIM
IT 1  [["menu_match", "^/404$"]]
  Rendered public/404.html (0.0ms)
Filter chain halted as :find_page rendered or redirected
Completed 404 Not Found in 22ms (Views: 15.0ms | ActiveRecord: 1.0ms)


Also I noticed that the default pages "Home" and "About" were missing at the page backend.

Rails version = 4.2.0

Help?

olla ollu

unread,
Jul 5, 2015, 8:13:31 AM7/5/15
to refine...@googlegroups.com
so I created another app but this time with the default sqlite database and everything was normal and worked fine both frontend and backend. Is there something I missed while using the "-d postgresql" command?

Philip Arndt

unread,
Jul 5, 2015, 6:27:57 PM7/5/15
to refine...@googlegroups.com
Hi,

This works for me, but I didn't have to edit the username and password for postgres after the fact.
I think that what you are missing is instead of running `rake db:create` and `rake db:migrate` you might be better off running `rake db:setup` as this runs: `rake db:{create,schema:load,migrate,seed}` so you get the pages you were supposed to.

Essentially, you're missing `rake db:seed`.

Phil

olla ollu

unread,
Jul 5, 2015, 11:38:35 PM7/5/15
to refine...@googlegroups.com
Works.
Thank you
Reply all
Reply to author
Forward
0 new messages