Skip to content
This repository

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

wants to merge 1 commit into from

2 participants

Praveen Arimbrathodiyil Damian Janowski
Praveen Arimbrathodiyil

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).

Damian Janowski

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

Damian Janowski djanowski closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 22, 2011
make binary work when cutest.rb is not in ../lib 809d48d
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  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'
2 3
3 4
 if ARGV.empty?
4 5
   puts "usage: cutest [-r lib] [-v] file ..."

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.