Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

118 lines (78 sloc) 3.31 KB
Instructions for installation:
file: config/init.rb
# add the slice as a regular dependency
dependency 'merb_mart'
# if needed, configure which slices to load and in which order
Merb::Plugins.config[:merb_slices] = { :queue => ["MerbMart", ...] }
# optionally configure the plugins in a before_app_loads callback
Merb::BootLoader.before_app_loads do
Merb::Slices::config[:merb_E_mart] = { ... }
file: config/router.rb
# example: /merb_mart/:controller/:action/:id
# example: /foo/:controller/:action/:id
r.add_slice(:MerbMart, 'foo') # same as :path => 'foo'
# example: /:lang/:controller/:action/:id (with :a param set)
r.add_slice(:MerbMart, :path => ':lang', :params => { :a => 'b' })
# example: /:controller/:action/:id
Normally you should also run the following rake task:
rake slices:merb_E_mart:install
You can put your application-level overrides in:
host-app/slices/merb_mart/app - controllers, models, views ...
Templates are located in this order:
1. host-app/slices/merb_mart/app/views/*
2. gems/merb_mart/app/views/*
3. host-app/app/views/*
You can use the host application's layout by configuring the
merb_mart slice in a before_app_loads block:
Merb::Slices.config[:merb_E_mart] = { :layout => :application }
By default :merb_E_mart is used. If you need to override
stylesheets or javascripts, just specify your own files in your layout
instead/in addition to the ones supplied (if any) in
In any case don't edit those files directly as they may be clobbered any time
rake merb_E_mart:install is run.
MerbMart master branch is being built on the cutting-edge Merb framework, and
the bleeding edge DataMapper framework. As such, you'll have to get yourself
setup with those gems before you get the chance to play with MerbMart.
Dependencies for MerbMart:
* **DataMapper 0.9** - 'edge' development
* *DataObjects*
* `git clone git://`
* `cd data_objects && rake gem && sudo gem install pkg/data_objects-0.9.0.gem`
* install the relevant driver for your database
* *dm-core*
* `git clone git://`
* *dm-more*
* `git clone git://`
* *dm-aggregates*
* *dm-is-tree*
* *dm-migrations*
* *dm-timestamps*
* *dm-types*
* *dm-validations*
* *merb\_datamapper*
(NOTE: do not use the *merb\_datamapper* included in the 0.9.2 distribution of
*merb_plugins*, as it was designed for DataMapper 0.3 series)
* **Merb 0.9.3** (or above)
* *merb-core* : `sudo gem install merb-core`
* *merb-more* : `sudo gem install merb-more`
* *merb\_plugins*
* *merb\_helpers* : `sudo gem install merb_helpers`
* *merb\_stories*
(NOTE:> 0.9.3 required. Install from merb\_plugins source.
See merb-plugins issue
[106]( )
Running Specs
To run all specs:
rake spec
You can also run individual groups of specs. To see tasks available to you:
rake -T
Jump to Line
Something went wrong with that request. Please try again.