Forum: Radiant CMS Problems with Radiant and vendor/gems load order

Posted by Wes Gamble (weyus)
on 2010-10-14 00:40
(Received via mailing list)
All,

Rails 2.3.8
Radiant 0.9.1 (vendored)
Bundler 1.0.2

Yet another "this was just working, what the hell happened?"

My custom Radiant extension is dependent on a gem that I have in
RAILS_ROOT/vendor/gem.  I can see that my extension is loading before
the gem does and so that dependency is failing.

I am not sure how my load order got screwed up.

Do I just need to require my gem as usual in config/environment.rb or is
there some Radiant specific way to make the gems be loaded first?

Thanks,
Wes
Posted by Jim Gay (Guest)
on 2010-10-14 02:27
(Received via mailing list)
On Wed, Oct 13, 2010 at 6:39 PM, Wes Gamble <weyus@att.net> wrote:
> gem does and so that dependency is failing.
>
> I am not sure how my load order got screwed up.
>
> Do I just need to require my gem as usual in config/environment.rb or is
> there some Radiant specific way to make the gems be loaded first?
>
> Thanks,
> Wes
>

Wes,
Radiant bundles rails, so your version of rails should be irrelevant.
What would be helpful is some sample code.
Have you tried requiring the gem from within your extension?
Posted by Stan Rawrysz (Guest)
on 2010-10-14 23:08
(Received via mailing list)
I have a similar problem.
Jim, how do you require the gem from within the extension?
Posted by Wes Gamble (weyus)
on 2010-10-14 23:17
(Received via mailing list)
require 'whatever' at the top of the extension file.

W
Posted by Wes Gamble (weyus)
on 2010-10-14 23:22
(Received via mailing list)
On 10/13/10 7:26 PM, Jim Gay wrote:
>> RAILS_ROOT/vendor/gem.  I can see that my extension is loading before the
> Wes,
> Radiant bundles rails, so your version of rails should be irrelevant.
> What would be helpful is some sample code.
> Have you tried requiring the gem from within your extension?
This was a problem that I had with Devise and assumptions that it makes
when defining helper methods for inclusion into controllers.

I'll provide more detail later.

W
Posted by Stan Rawrysz (Guest)
on 2010-10-14 23:43
(Received via mailing list)
i actually had a different problem (my gem folder was empty!) sorry
for the unnecessary email
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.