

Fix your Ruby environment problems - youngian
http://technotes.iangreenleaf.com/posts/if-youre-having-ruby-environment-problems-i-feel-bad-for-you-son.html

======
mnarayan01

      export PATH=./bin:$PATH
    

Am I the only one who thinks adding this to your login scripts is a terrible
idea?

~~~
jbrechtel
No, you're not alone.

To be explicit about why, for others, this means your shell will search for
executables in a 'bin' sub directory of whatever directory you happen to be in
BEFORE it searches your normal path.

This allows for common commands like 'ls' to be executed from ./bin, if
they're present, instead of /bin (from your system).

Once you've done this you've opened yourself up to an attack where you
download a zip from the internet, extract it, cd into the directory and type
'ls' and you may have potentially executed something from that zip which you
didn't intend to do.

tldr - relative paths in your $PATH is a bad idea.

~~~
youngian
Yeah, I wondered if I should add a caveat in there about this. I forewent it
because I thought it would confuse people more than anything, and because I've
never found this particular concern all that worrisome for the average
developer. But maybe it's worth mentioning, in a footnote if nothing else.

