> Buildr depends on several Gems that install executables (rake, spec, etc). > It is a good idea to not have write permission on directories containing > executables (part of the security architecture of Unix and its > derivatives). > For the general case you need to use sudo to install Buildr and its > dependencies, it might be annoying, but it's keeping to the security > architecture. > > That should be the default behavior.
The default behavior *is* to use sudo; this doesn't change that. What it does is provide a hook so that I can run `rake setup` without having to edit the rakelib files every time. :-) I use JRuby, and I have it installed in a non-global directory (it's under ~). As such, I really need to install gems *without* using sudo, otherwise permissions get screwed up. Considering the fact that JRuby encourages installation in non-global locations, this really isn't an unusual use case. When installing Buildr using `gem`, I can just invoke gem without sudo. However, `rake setup` doesn't give me that option. That's what this commit was designed to allow. > Also, avoid using 'or' and 'and' in expression (they're fine as statement > separators). 99% of the time they work just like && and ||, but every once > in a while they're used without paying attention to operator precedence and > we end up with subtle and hard to find bugs. Noted for future reference. I knew that Rails avoids 'and' and 'or', but I had never heard a compelling reason why. Daniel