public
Description: This repo is no longer active, please refer to http://github.com/FreerangeFuture/gluttonberg/
Home | Edit | New

Using Gluttonberg inside a new App

1. Create a standard merb app

merb-gen app myapp

2. Create a ‘db’ folder for the sqlite3 database and set up config/database.yml.

3. Add the following to the bottom of the prepare block in config/router.rb

add_slice(:gluttonberg, :path_prefix => "admin")
gluttonberg_public_routes

At this point you need have the gem installed or stick Gluttonberg in the slices directory

4. Update config/init.rb to use haml instead of erb

use_template_engine :haml

5. Add Gluttonberg as a dependency to config/dependencies.rb (Please confirm the version number berfore adding dependency)

dependency "gluttonberg", "0.0.4"

6. Run the rake task to copy all the gluttonberg assets into the app’s public directory

rake slices:gluttonberg:copy_assets

7. Start up a console to migrate the db and set up the default user

merb -i
DataMapper.auto_upgrade!
Gluttonberg::User.create({:name => 'admin', :email => 'admin@localhost.whatever', 
                                          :password => 'password', :password_confirmation => 'password'})

8. Start up a server and away you go!

Last edited by abdulrauf, Thu Mar 26 19:00:53 -0700 2009
Home | Edit | New
Versions: