Skip to content

Integration with Refinery CMS

parndt edited this page Jan 23, 2013 · 1 revision

Assuming you already have a Refinery-based application, and have created at least one admin user:

  1. Add forem to the Gemfile (see the README), after refinerycms.
  • You don't need to add kaminari or will_paginate, because Refinery already requires will_paginate.
  1. bundle install to get the latest version of the Forem gem.
  2. rails g forem:install
  • User class: Refinery::User
  • current_user helper: current_refinery_user
  1. If you get an error under Creating default forum and topic, it means #325 hasn't been fixed yet. You'll need to manually add this to config/routes.rb, before Refinery::Core::Engine:
  • mount Forem::Engine, :at => "/forums"

And you're done! Yaaay! Run rails s and visit http://localhost:3000/forums.

These instructions were tested with Refinery 2.0.8. Future people, you're on your own.

Troubleshooting

undefined method: refinery_user?

You probably put the forem gem before refinerycms in the Gemfile.

The page you requested was not found.

You probably put the Forem::Engine routes after Refinery::Core::Engine in config/routes.rb.