>
> Are you adding the autoload paths in your Engine subclass? e.g.:
>
>  class Xebec::Engine < Rails::Engine
>    paths['app/controllers'] << 'app/controllers'
>    paths['app/views']       << 'app/views'
>  end
>


First of all I should clarify that my engine is not called Xebec. I am
using the Xebec gem in my engine. Xebec is a gem to create menus in
your application. I was hoping that I could create menus (all of which
are helpers) in my engine and then have the parent apps make use of
those menus by calling  <%= top_menu %> in their templates or views.

As for the gems here is the conundrum.

My gemspec says


s.add_dependency 'acts-as-taggable-on'
s.add_dependency  'pg'
s.add_dependency  'pg_search'
s.add_dependency  'simple_uuid'
s.add_dependency   'devise'
s.add_dependency   'rails_config'
s.add_dependency  'xebec'

The gemfile in the engine says


source "http://rubygems.org";
gemspec


So somewhere in my engine I have a call to simple_uuid  but it doesn't
work because bundler did not include that gem (in the parent
application). It installed the gem but did not load it. As a result I
have to put this on top of my  lib/engine_name.rb

require 'rubygems'
require 'acts-as-taggable-on'
require 'pg_search'
require 'pg'
require 'simple_uuid'
require 'devise'
require 'rails_config'
require 'xebec'

Ideally rails would process the Gemfile in the engine(s) and then the
Gemfile in the parent app but it doesn't seem to be doing that.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" 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/rails-oceania?hl=en.

Reply via email to