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-on-your-vendor-directory ... 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 ! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060113/101f4a6b/attachment.html
On 1/12/06, Dylan Stamat <dylans@gmail.com> wrote:> 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-on-your-vendor-directory > ... 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).
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 :) On 1/12/06, Joe Van Dyk <joevandyk@gmail.com> wrote:> > On 1/12/06, Dylan Stamat <dylans@gmail.com> wrote: > > 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-on-your-vendor-directory > > ... 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). > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060113/30f84af3/attachment-0001.html
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 ? On 1/13/06, Dylan Stamat <dylans@gmail.com> wrote:> > 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 :) > > > On 1/12/06, Joe Van Dyk <joevandyk@gmail.com> wrote: > > > > On 1/12/06, Dylan Stamat <dylans@gmail.com> wrote: > > > 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-on-your-vendor-directory > > > > > ... 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). > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060113/47de5249/attachment.html