must use ":lib => 'web_app_theme'" when using config.gem

19 views
Skip to first unread message

george.anderson

unread,
Jan 8, 2010, 10:47:45 PM1/8/10
to web-app-theme-generator
If you're using the "config.gem" gem dependency method:

config.gem "web-app-theme", :lib => "web_app_theme", :version =>
'0.5.0', :source => "http://gemcutter.org"

you MUST include the ":lib => 'web_app_theme'" bit. Otherwise you'll
see something like this:

no such file to load -- web-app-theme

It's a bit confusing if you've already installed the gem. But rails
is looking for lib/web-app-theme.rb in the gem source, which doesn't
exist. Using ":lib => 'web_app_theme'" tells rails to look for lib/
web_app_theme.rb, which exists.

HTH,

/g

--

George Anderson

BenevolentCode LLC

Andrea Franz

unread,
Jan 9, 2010, 9:17:49 AM1/9/10
to web-app-the...@googlegroups.com
> If you're using the "config.gem" gem dependency method:
>
> config.gem "web-app-theme", :lib => "web_app_theme", :version =>
> '0.5.0', :source => "http://gemcutter.org"
>
> you MUST include the ":lib => 'web_app_theme'" bit.  Otherwise you'll
> see something like this:
>
> no such file to load -- web-app-theme

I think we don't need to add web-app-theme as a dependency, since is
not used at runtime from rails, but only as generator during
development.
If installed as gem, generators are visible from all rails
project..what do you think?

> It's a bit confusing if you've already installed the gem.  But rails
> is looking for lib/web-app-theme.rb in the gem source, which doesn't
> exist.    Using ":lib => 'web_app_theme'" tells rails to look for lib/
> web_app_theme.rb, which exists.
>
> HTH,
>
> /g
>
> --
>
> George Anderson
>
> BenevolentCode LLC
>

--
Andrea Franz
http://gravityblast.com

George Anderson

unread,
Jan 9, 2010, 1:25:00 PM1/9/10
to web-app-the...@googlegroups.com
Yes, good point. I suppose I should have provided some context: I'm
working on a small side project that I expect to share with others. I
want them to be able to re-theme the app at will, but don't want the
overhead of vendoring the gem.

Thanks,

/g

--

George Anderson

BenevolentCode, LLC

Andrea Franz

unread,
Jan 9, 2010, 3:02:28 PM1/9/10
to web-app-the...@googlegroups.com
On Sat, Jan 9, 2010 at 7:25 PM, George Anderson
<geo...@benevolentcode.com> wrote:
> Yes, good point.  I suppose I should have provided some context:  I'm
> working on a small side project that I expect to share with others.  I
> want them to be able to re-theme the app at will, but don't want the
> overhead of vendoring the gem.

Understood, so it's better to add this in the README file, it's very
useful. Feel free to write what you want and send me a pull request on
github ;)

Reply all
Reply to author
Forward
0 new messages