Tom Ha wrote:
> Hi there,
> 
> as far as I know, gems can be stored in 2 folders:
> 
> 1. /usr/lib/ruby/gems/1.8/gems

These are the gems that are available to the system as a whole.

> 2. app/vendor/gems

These are the gems available to your application.

> 
> When I install a gem, it automatically goes into the 1st folder.

Right.  The gem command installs gems for the whole system.

> 
> My questions are:
> - What are the reasons one should store the gems in the 2nd folder
> (app/...)?
> - Does it have anything to do with deployment/"portability"? If yes,
> how?

If you store gems in app/vendor, they go with your app.  This can be 
useful when you're deploying in a place where you can't or don't want to 
install system-wide gems.

> - How should gems be put in there? Any special command or is copy/paste
> OK?

There's a rake task for it -- rake gems:unpack or something like that. 
rake -T will tell you what you need to know.

> - Do apps automatically find the correct location of the gems? Any
> config to do?

Rails will look in both the system gem path and vendor for gems.

> - How are gems in app/vendor/gems updated? Using the normal gem update
> command?

No, because the gem command doesn't even know about them.
> 
> Background info:
> - I'm pretty much a n00b
> - I plan to deploy my app to slicehost.com (unless you guys know better
> solutions)

Slicehost is great!

> - At slicehost, I will have access to the entire OS (Ubuntu)

Then you can use either approach.

> 
> Thanks for any help with this!
> Tom

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to