Skip to content


make binary work when cutest.rb is not in ../lib #2

wants to merge 1 commit into from

2 participants


debian installs libraries to /usr/lib/ruby/vendor_ruby as per debian policy. /usr/bin/cutest was not able to find cutest.rb file with current code. Change suggested by Lucas Nussbaum of debian-ruby team (I'm packaging cutest in debian).


Changing the load path inside a library is not a good practice, so this doesn't work in the Ruby world. Sorry about that.

@djanowski djanowski closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 22, 2011
  1. make binary work when cutest.rb is not in ../lib

    parimbra committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 bin/cutest
3 bin/cutest
@@ -1,4 +1,5 @@
-require File.expand_path("../lib/cutest", File.dirname(__FILE__))
+$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
+require 'cutest'
if ARGV.empty?
puts "usage: cutest [-r lib] [-v] file ..."
Something went wrong with that request. Please try again.