[rspec-users] Ruby 1.9 - autospec loadpath problem
lasitha.ranatunga at gmail.com
Thu Feb 19 09:52:58 EST 2009
On Mon, Dec 01, 2008 at 03:51pm, David Chelimsky <dchelimsky at gmail.com>
>On Sun, Nov 30, 2008 at 4:24 PM, Mikel Lindsaar <raasdnil at gmail.com> wrote:
>> mikel at baci.local ~/ruby_programs/mail
>> $ autospec
>> /usr/local/bin/autotest:19:in `load': Is a directory -
>> from /usr/local/bin/autotest:19:in `<main>'
>> So load is trying to load autotest the directory instead of autotest the
>> Any ideas on how to get it to load the right thing?
>I'm not sure how to fix that problem, but before you go much further
>you should know that RSpec does not yet run under 1.9. [...]
I just ran across this (rspec 184.108.40.206, zentest 3.11.1, ruby 1.9.1-p0) and
thought i'd follow up.
It appears this is related to rubygems being loaded automatically in ruby
1.9... Cucumber (and rspec for that matter) contains an 'autotest' directory
under /lib and it appears earlier in the load path than the ZenTest
As evidence, running the following gets past the error:
$ ruby --disable-gems `which autotest`
Of course that would then necessitate activating needed gems manually, which
seems to be counter-productive if 1.9 is encouraging the opposite approach.
It's not clear to me that this is a rspec or zentest bug - it might just as
easily be a rubygems or ruby deficiency (couldn't 'load' just ignore
Unfortunately i'm not experienced enough with any of these libraries to know
where to take this next.
If anyone would point me in a direction, i'd be happy to keep digging.
In the meantime, here's a hack to $RUBY_HOME/bin/autotest (the one generated
@@ -19 +19,2 @@
+zentest_gem_dir = Gem.source_index.find_name('ZenTest',
+load File.join(zentest_gem_dir, 'bin', 'autotest')
That is very likely the _wrong_ way to calculate zentest_gem_dir... I
googled and poked around but couldn't find any definitive API. Any
enlightenment on that would also be appreciated.
View this message in context: http://www.nabble.com/Ruby-1.9---autospec-loadpath-problem-tp20763177p22102148.html
Sent from the rspec-users mailing list archive at Nabble.com.
More information about the rspec-users