Installation:

1.) Install merb-photos gem. sudo gem install merb-photos

2.) Navigate to your merb application. cd ~/your_merb_app/

3.) Add to your dependencies file. vim config/dependencies.rb a

dependency ‘merb-photos’

esc : wq

4.) Add options to your init file in the before_app_loads callback. vim config/init.rb a

Merb::BootLoader.before_app_loads do

Merb::Slices::config[:merb_photos][:title] = 'Photos' #Title of the index page and/or tab.
Merb::Slices::config[:merb_photos][:flickr_user_name] = 'your_user_name' #Flickr user name.

end

esc : wq

5.) Add to your router file. vim config/router.rb a

slice(:merb_photos)

esc : wq

6.) Start your merb application and browse. your_domain/photos


Advanced:

# List all available tasks: rake -T slices:merb_photos

# Put your application-level overrides in: host-app/slices/merb-photos/

# Templates are located in this order:

  1. host-app/slices/merb-photos/app/views/*

  2. gems/merb-photos/app/views/*

  3. host-app/app/views/*