On Oct 26, 12:15 ¨Âí¬ Íéãèáì Óõãèáîåë ¼èòáíò®®®Àãåîôòõí®ãú÷òïôåº > 2009/10/14 Intransition <transf... / gmail.com>: > > > I recently came across two different programs that had this line in a > > bin/ executable: > > > LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + "/../ > > lib")) > > > This stuff makes me sad. The use of RubyGems is masking some bad > > practices here. The above code would not work with a traditional site > > installation. > > It's not for site installation. > > It's for packaged applications. > > I wrote a pure ruby application that you can just unpack and run, no > need to "install" it on your system, and it uses the exact code you > show except it does not use the "/../". > > This is ideal for situations when you do not want to require the users > to have a development environment ready to "install" the application. > Just having a ruby interpreter preinstalled from a binary package > suffices. > > Thanks Hi Michal I've seen equivalent code in quite a few projects. Maybe they all have the same reasoning, though I suspect they are just copying form one another. Which is really why I wrote that blog post --so people at least are aware. I've thought about it further and I think maybe something "larger picture" is actually taking place. I wrote a follow up post: http://proutils.github.com/2009/10/fhs-revolt.html Thanks.