Your gem should have a lib directory. During development, you will need to get that lib directory added to Ruby's load path one way or another.
You can add it in Ruby code. I wouldn't recommend doing that in your situation, but it is helpful to put something like this in your test helper or spec helper files to help your tests find the library:
$LOAD_PATH << 'lib' You can add it with a Ruby command-line option or environment variable:
RUBYOPT="-Ilib" ruby bin/chklinks.rb ruby -Ilib bin/checklinks.rb I'm assuming the commands above would be run from the root directory of your gem, so the path you need to add is simply lib. If your setup is different, you would change lib in the commands above to be some other path.