[rspec-users] Failing in TextMate but not in rake...
ed.ruder at gmail.com
Thu Sep 4 16:40:36 EDT 2008
When I run a spec file from TextMate using the RSpec bundle's "Run
Examples" command (either using command-R or the bundle menu item with
the spec file open), I get an error dialog with the following text:
"Missing the Rails 2.0.2 gem. Please `gem install -v=2.0.2 rails`,
update your RAILS_GEM_VERSION setting in config/environment.rb for the
Rails version you do have installed, or comment out RAILS_GEM_VERSION
to use the latest version installed."
- Running 'rake spec SPEC=<same spec file relative path>' succeeds.
- This line is in config./environment.rb: 'RAILS_GEM_VERSION = '2.0.2'
unless defined? RAILS_GEM_VERSION'
- Running 'gem list rails' from the command line lists 'rails (2.0.2)'
- I'm running on OS X Leopard with a version of Ruby installed from
source into /usr/local, per Dan Benjamin's excellent instructions
ruby' finds '/usr/local/bin/ruby', 'which gem' finds '/usr/local/bin/
- In TextMate's Advanced | Shell Variables, TM_RUBY is defined to '/
usr/local/bin/ruby' (w/o the quotes).
- The thread in this group on the opposite problem (http://
doesn't apply to my problem, I think.
I'm guessing that TextMate is finding the wrong ruby or gem
environment somehow, but I can't figure out how, or how to correct it.
Any suggestions would be appreciated!
Thanks in advance.
More information about the rspec-users