I'm trying to follow the Slice tutorial on the merb wiki site and
quite a few things don't work as mentioned on that site. Some of these
actually seem to be bugs in the generated slice code (or my
understanding of the slices).

Here are my steps. I'm on merb 1.0.9

merb-gen slice myslice
cd myslice
vi config/init.rb and add  use_orm :datamapper and dependencies for dm-
core etc (0.9.10)
vi lib/myslice.rb and add scope.resources :entities inside
setup_router
vi app/controller/entities.rb and add 'Myslice::' prefix to the class
merb-gen resource entity
add a database.yml file
slice
http://localhost:4000/entities/index <-- Fails saying can't find /app/
views/myslice/entities/index.html.erb file!!
I then copied created an app/views/myslice/ folder and did a  cp -r
app/views/entities app/views/myslice to
get rid of the error.
sudo rake install <--This installs myslice-1.0.9 instead of 0.0.1
mentioned in lib/myslice.rb file !!

cd ..
merb-gen app test-app
cd test-app
vi config/dependencies and add 'dependency "myslice", "1.0.9"
rake -T slices <---  dies with 'uninitialized constant Spec' error!!
I then removed spectasks from lib/myslice.rb and reinstalled myslice
gem.
rake  slices:myslice:install
This creates bunch of folders all over the place.
vi config/router.rb and added slice(:myslice, :path => 'myslice')
merb
http://localhost:4000/myslice/entities/index <-- fails saying 'app/
views/myslice/entities/index.html.erb' not found

Now I don't have myslice folder inside views! Shouldn't the rake
slice:myslice:install create that folder? How do I the slice's views
and controllers inside the host app?

Why there are so many issues for a concept that *seems* nicely
architected? Am I not using it right? Any pointers would be great
before I go reading the source.

thanks





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to