[rspec-users] TextMate bundle not using environment variable to find Ruby library

SoManyFishes somanyfishes at gmail.com
Tue Apr 8 09:06:04 EDT 2008


Something is going on in my TextMate bundle--it's calling the wrong lib 
for Ruby.  I have the environment variables set like this:
>
> TM_RSPEC_HOME /usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.3
> TM_RUBY  /usr/local/bin/ruby


When I run these queries in a TextMate window I get this:

> which ruby
> /usr/local/bin/ruby
> which rails
> /usr/local/bin/rails


But still when I try to run a spec in TextMate, I get this:

> /usr/lib/ruby/site_ruby/1.8/rubygems.rb:377:in 
> `report_activate_error': Could not find RubyGem rails (>= 0) 
> (Gem::LoadError) from
> /usr/lib/ruby/site_ruby/1.8/rubygems.rb:309:in `activate' from
> /usr/lib/ruby/site_ruby/1.8/rubygems.rb:76:in 
> `active_gem_with_options' from
> /usr/lib/ruby/site_ruby/1.8/rubygems.rb:50:in `gem' from
> /Users/lisasawin/Rails Web Applications/CHC/config/boot.rb:39 from
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
> `gem_original_require' from
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' 
> from /Users/lisasawin/Rails Web Applications
> /CHC/config/environment.rb:11 from
> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in 
> `gem_original_require' ... 15 levels... from
> /Users/lisasawin/Library/Application 
> Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:31:in 
> `chdir' from
> /Users/lisasawin/Library/Application 
> Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:31:in 
> `run' from
> /Users/lisasawin/Library/Application 
> Support/TextMate/Bundles/RSpec.tmbundle/Support/lib/spec/../spec/mate/runner.rb:14:in 
> `run_file' from /tmp/temp_textmate.zQ2Hv1:4

How can I get TextMate to use the library in usr/local/bin/ruby instead 
of looking in usr/local/bin/ruby?  Thanks so much for any help!

Lisa



More information about the rspec-users mailing list