All you need to do is to insert the following in the Gemfile
> gem 'cream'
Then run bundle install and then the full_config generator. I have been notified of some errors in the latest version which I will fix today. I also want to make some improvements in general to make it more flexible and generic.
The next release should contain these fixes and enhancements.
Stay tuned.
Kristian
The particular problem you have is related to 'roles_active_record'. Check out the specs in that project.
$ rspec spec/roles_active_record/strategy/multi/many_roles_spec.rb
This spec uses and tests the fixture file 'many_roles_setup.rb'
class User < ActiveRecord::Base
include Roles::ActiveRecord
strategy :many_roles
valid_roles_are :admin, :guest, :user
end
To run specs with rspec, first do:
$ gem install database_cleaner rspec
I get:
27 examples, 0 failures
So the code should work!?
You should have a gem 'roles_active_record' in your rails app Gemfile after Cream has been installed (via the full_config generator). Otherwise insert it manually for now.
Kristian
https://github.com/kristianmandrup/cream/tree/refactor
Try:
$ git clone https://github.com/kristianmandrup/cream
$ cd cream
$ git checkout refactor
$ pwd
Then go into your Rails app in the Gemfile and set the path
gem 'cream', :path => 'whatever pwd returned'
then
$ bundle install
Then you will be running cream from your local clone and you can debug from there and help make it work ;)
Thanks.
Kristian
On Jan 4, 2011, at 1:49 PM, Helmut wrote:
On Jan 4, 2011, at 1:49 PM, Helmut wrote:
After a major refactoring effort all day, the latest releases of cream (0.8.6) and roles_active_record (0.4.4) now seem to work as expected and have a much more elegant, stable and flexible design to boot :)
Note: You shouldn't have to run any devise generators before running full_config.
Hope it works out now...
Kristian
On Jan 4, 2011, at 1:49 PM, Helmut wrote:
--
You received this message because you are subscribed to the Google Groups "Cream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails-cream...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
hi collin, sorry where do i place this configuration?
require 'generators/cream/full_config/full_config_generator'
class Cream::Generators::FullConfigGenerator
def self.source_root
File.join File.dirname(FILE), "..", "..", "..", ".."
end
end
so as to avoid the template part error. Please could you tell me where exactly it should reside?