# Manage radiant gems

**URL:** <https://www.ruby-forum.com/t/manage-radiant-gems/146230>\
**Category:** Radiant CMS\
**Created:** [August 19, 2008, 9:59am UTC](https://www.ruby-forum.com/t/manage-radiant-gems/146230 "2008-08-19T09:59:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vpredoehl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/67e7ee/32.png) [@vpredoehl](https://www.ruby-forum.com/u/vpredoehl)\
**Post date:** [August 19, 2008, 9:59am UTC](https://www.ruby-forum.com/t/manage-radiant-gems/146230/1 "2008-08-19T09:59:14Z")

</div>

Hello,

I would like to package my radiant app before deployment.  
I created a gems/ folder under vendor/, and copy the gems which are in  
the radiant vendor/ folder and others for my project.  
Then, I added the following lines to environment.rb to load my new path  
:

config.load\_paths += Dir["#{RAILS\_ROOT}/vendor/gems/\*\*"].map do |dir|  
File.directory?(lib = “#{dir}/lib”) ? lib : dir  
end

But it doesn’t work, the radiant gems like ‘rubypants’ can’t be  
loading… what is the best way to do that? Can you explain me?

Thank you !  
Vincent

---

<div class="post-metadata">

**Author:** ![vpredoehl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/67e7ee/32.png) [@vpredoehl](https://www.ruby-forum.com/u/vpredoehl)\
**Post date:** [August 19, 2008, 10:19am UTC](https://www.ruby-forum.com/t/manage-radiant-gems/146230/2 "2008-08-19T10:19:49Z")

</div>

Vincent PÃ©rÃ¨s wrote:

> end
> 
> But it doesn’t work, the radiant gems like ‘rubypants’ can’t be  
> loading… what is the best way to do that? Can you explain me?

I’m not sure about this, but I think you’re supposed to freeze the  
Radiant gem. It will take care of everything and put it under the  
correct paths (I think vendor/radiant)

rake radiant:freeze:gems

Also, you can see if this helps:

Step 5 of: [http://kb.mediatemple.net/questions/152/Installing+Radiant](http://kb.mediatemple.net/questions/152/Installing+Radiant)

Copy the radiant gem into your application, which will effectively  
freeze the version of radiant you are using.  
| cp -a ~/data/rubygems/gems/gems/radiant-0.6.6 vendor/radiant|

Cheers,  
Mohit.  
8/19/2008 | 4:18 PM.

---

<div class="post-metadata">

**Author:** ![vpredoehl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/67e7ee/32.png) [@vpredoehl](https://www.ruby-forum.com/u/vpredoehl)\
**Post date:** [August 19, 2008, 10:28am UTC](https://www.ruby-forum.com/t/manage-radiant-gems/146230/3 "2008-08-19T10:28:58Z")

</div>

Mohit S. wrote:

> Vincent PÃ©rÃ¨s wrote:
> 
> > end
> > 
> > But it doesn’t work, the radiant gems like ‘rubypants’ can’t be  
> > loading… what is the best way to do that? Can you explain me?
> 
> I’m not sure about this, but I think you’re supposed to freeze the  
> Radiant gem. It will take care of everything and put it under the  
> correct paths (I think vendor/radiant)
> 
> rake radiant:freeze:gems
> 
> Also, you can see if this helps:
> 
> Step 5 of: [http://kb.mediatemple.net/questions/152/Installing+Radiant](http://kb.mediatemple.net/questions/152/Installing+Radiant)
> 
> Copy the radiant gem into your application, which will effectively  
> freeze the version of radiant you are using.  
> | cp -a ~/data/rubygems/gems/gems/radiant-0.6.6 vendor/radiant|
> 
> Cheers,  
> Mohit.  
> 8/19/2008 | 4:18 PM.

Hello,

Thanks for your quick answer, but I’m ‘unpacking’ the radiant gem to use  
it as a project.  
‘rake radiant:freeze:gems’ don’t do anything in my project.  
In fact I would like to move the radiant gems dependencies in vendor/ to  
vendor/gems/ and add my own gems.  
Is there a way to do that or is it impossible?

Thanks a lot !  
Vincent

---

<div class="post-metadata">

**Author:** ![vpredoehl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/67e7ee/32.png) [@vpredoehl](https://www.ruby-forum.com/u/vpredoehl)\
**Post date:** [August 19, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/manage-radiant-gems/146230/4 "2008-08-19T15:06:19Z")

</div>

You can follow Radiant’s lead and just expand them directly into vendor,  
rather than vendor/gems. Radiant automatically adds those to the load  
path.

Sean
