pccasto / rubyripper

Automatically exported from code.google.com/p/rubyripper
0 stars 0 forks source link

must be in install directory to successfully find rr_lib.rb #176

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cd ~/bin/
2. ln -s path_to_rubyripper_bin/rubyripper_gtk2.rb .
3. bin/rubyripper_gtk2.rb
4. backtrace appears

Alternative:
1. path_to_rubyripper_bin/rubyripper_gtk2.rb
2. see backtrace

What is the expected output? What do you see instead?
expected: rubyripper starts
getting:
~/bin/rubyripper_gtk2.rb:119:in `load_settings': undefined method
`cdrom_drive' for #<Main:0xb668c048> (NoMethodError)
    from ~/bin/rubyripper_gtk2.rb:63:in `initialize'
    from ~/bin/rubyripper_gtk2.rb:1082:in `new'
    from ~/bin/rubyripper_gtk2.rb:1082

What version of rubyripper are you using? On what operating system? Are you
using the gtk2 or the commandline interface?
r195, linux, gtk2

Please provide any additional information below.

RUBYDIR=[ENV['PWD'], "/usr/local/lib/ruby/site_ruby/1.8"]
[...]
RUBYDIR.each{|dir| if File.exists?(file = File.join(dir, '/rr_lib.rb')) :
require file; break end}

is stupid, restricts load path, and does not even raise an error if
rr_lib.rb is not found. Try this instead:
$:.push(File.dirname(__FILE__))
require 'rr_lib.rb'

(unfortunately, it only fixes situation #2)

Original issue reported on code.google.com by hha...@gmail.com on 27 Feb 2008 at 12:40

GoogleCodeExporter commented 8 years ago
File.dirname(__FILE__) is now included in RUBYDIR. Also an error message will be
shown that tells you rubyripper can't find rr_lib.rb. See commit 202.

I hope, sir, this is clever enough for thee ?

Original comment by rubyripp...@gmail.com on 5 Mar 2008 at 7:37

GoogleCodeExporter commented 8 years ago
it's more than enough verbose, plus I'm fairly certain r202 has a bug: a 
LoadError is
never raised.

Original comment by hha...@gmail.com on 5 Mar 2008 at 8:45

GoogleCodeExporter commented 8 years ago

Original comment by rubyripp...@gmail.com on 6 Mar 2008 at 6:42

GoogleCodeExporter commented 8 years ago
Commit 203 should do the trick. Thanks for your feedback.

Original comment by rubyripp...@gmail.com on 8 Mar 2008 at 10:33