Forum: Ruby on Rails The Vendor Directory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ff82af3238a57fbd1212832ec1a19f28?d=identicon&s=25 Dylan Stamat (Guest)
on 2006-01-13 06:42
(Received via mailing list)
I'm working with a Development and a Production environment
In order to keep things in synch between the two environments, I thought
it
would be good to "gem unpack" all of my currently installed gems into
the vendor/ directory... so when I push things into Production...
everything
jives.

I unpacked about 20 gems into the vendor/ directory.... now everything
is
broke :)

I found this article:
http://weblog.textdrive.com/article/180/depending-...
... which had an example that scared me.  It has a require statement in
the
code like: require 'path/gem'  instead of just:  require 'gem'

I thought just unpacking gems into /vendor would work ?  Is this not the
case, and I now need to go through every "require" in my code base to
ensure
the correct path is
being referenced ?  Please say it isn't so !
38a8230ed3d5c685558b4f0aad3fc74b?d=identicon&s=25 Joe Van Dyk (Guest)
on 2006-01-13 07:02
(Received via mailing list)
On 1/12/06, Dylan Stamat <dylans@gmail.com> wrote:
> http://weblog.textdrive.com/article/180/depending-...
>  ... which had an example that scared me.  It has a require statement in the
> code like: require 'path/gem'  instead of just:  require 'gem'
>
>  I thought just unpacking gems into /vendor would work ?  Is this not the
> case, and I now need to go through every "require" in my code base to ensure
> the correct path is
>  being referenced ?  Please say it isn't so !

erm, dunno for sure.  But it would take one line in Ruby to go through
each directory in the vendor directory and add that to the load path
(the path that Ruby uses for searching for stuff... I think it's $: or
something).
Ff82af3238a57fbd1212832ec1a19f28?d=identicon&s=25 Dylan Stamat (Guest)
on 2006-01-13 18:29
(Received via mailing list)
Ahh... yes, it is $: indeed (synonymous with LOAD_PATH).  Thanks Joe !

So, anyone know if there is a best practice for Rails... like adding a
given
line to environment.rb ?
Just want to know what everybody else is doing, so I'm not reinventing
the
wheel, or implementing something crazy :)
Ff82af3238a57fbd1212832ec1a19f28?d=identicon&s=25 Dylan Stamat (Guest)
on 2006-01-13 23:34
(Received via mailing list)
Ok... here is an open explanation of the problem:
http://groups.yahoo.com/group/pragmaticstudio/message/269

I was told to run "rake freeze_gems" ... however, rake doesn't even
work.
I moved "all" gems to /vendor.

Anybody ?  Pretty please ?
This topic is locked and can not be replied to.