DEV Community

Discussion on: My simple Ruby mishaps

Collapse
rhymes profile image
rhymes

Hi Dan, glad you decided to post!

ld is the name of one of the oldest Unix based tools. It's the linker, basically the tool which creates executables after compilation.

As your bin is probably at the top in the list of items in PATH (as it should be), the building of Ruby was picking up your script instead of the Unix tool.

If you type which ld you'll find out where the default ld resides. Don't forget to use which for future scripts when you decide their names so you don't risk clashing with the operating system in the future ☺️

Collapse
otherdcn profile image
Dan C. Author

Hi @rhymes . It makes sense now, so noob of me.

Thanks for suggesting which. While troubleshooting, I tried locate ld which returned thousands upon thousands of results that contained ld in the name.

Now I know. Thanks for the tip.