0

I just started using RefineryCMS as a gem in my Rails app, I've been enjoying it a lot so far (really nice work)!

gemfile:

gem 'refinerycms', '~> 2.0.0'
# refinerycms engines
gem 'refinerycms-blog', '~> 2.0.0'
gem 'refinerycms-inquiries', '~> 2.0.0'
gem 'refinerycms-page-images', '~> 2.0.0'
gem 'refinerycms-search', '~> 2.0.0' #TODO: remove this gem, not used

I'm having a problem though while running the app in production mode. When a user visits the root page, the app will take the generated html page that is sent as a response and save it in /public as index.html. This effectively turns the root into a static page. :(

I think the issue might be stemming from my want to use the blog/posts#index view as the root page.

Here is my route.rb:

# root :to => "refinery/blog/posts#index"
  root :to => redirect { |p, req| req.flash.keep; "/blog" }
  mount Refinery::Core::Engine, :at => '/'

I originally used the commented out line before the problem started, then I switched to the second root :to after searching around and thought that redirecting might solve the problem.

I thought it was gone for a few days, but it's not unfortunately. Now the app generates a "blog.html" in /public, causing the same problem as before.

If anyone has any suggestions I'm all ears, thanks.

  • Why don't just point the `root :to` to your blog resource , like this : `root :to => 'blog#index'` ? But this way you are breaking the concept of the CMS - single point of page management . – R Milushev Feb 06 '13 at 09:24
  • I did before, note the commented out code. The Blog controller is apart of RefineryCMS, so you can't just do 'blog#index'. – kwhittington Feb 06 '13 at 19:18
  • I think the setting for the root of already existing Refinrey app is made from the admin , not from `routes.rb`. – R Milushev Feb 06 '13 at 20:22

0 Answers0