3 ms·
I noticed he uses the env trick for his shebang for ruby. I was first acquainted with this for Perl, and I've since more or less stopped using it since it caus
by KaeseEs 16y ago
I noticed he uses the env trick for his shebang for ruby. I was first acquainted with this for Perl, and I've since more or less stopped using it since it caused about as many problems for me as it solved (funny thing, systems with the perl binary in a silly place sometimes have env in the 'wrong' place too :/). I'm kind of surprised that it made the jump to Ruby, since to my knowledge it came into use after the Ruby community had already finished borrowing from Perl that which it was going to borrow.
- frou_dh 16y agoBut foo is more likely to jump around than env, right? I'd like someone else to make up my mind on this. Please discredit the env approach in any way possible :-)
- glenngillen 16y agoWould love some more discussion on this too, to discredit either approach. I've gone with the env approach precisely because I've found the only other ways I know to be even more brittle.
- jamesbritt 16y agoSince using RVM on multiple machines I've found I cannot assume a fixed, universal path to the ruby interpreter, so env is the choice for me. I've also never had an issue with env itself not being where I expect it, but if I ever do I think a symlink addition would solve the problem.
- xiongchiamiov 16y agoIt's not just Ruby. I regularly see (and use) it in Python scripts, too. Hell, sometimes I use env for my shell scripts, just out of habit.