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 !
on 2006-01-13 06:42
on 2006-01-13 07:02
On 1/12/06, Dylan Stamat <firstname.lastname@example.org> 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).
on 2006-01-13 18:29
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 2006-01-13 23:34
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 ?