[rspec-users] Failing in TextMate but not in rake...
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 (http://hivelogic.com/articles/2008/02/ruby-rails-leopard). 'which ruby' finds '/usr/local/bin/ruby', 'which gem' finds '/usr/local/bin/ gem'. - 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:// groups.google.com/group/rspec/browse_thread/thread/ ab39c5aee198f797/15ba87d14324c14c?lnk=gstq=textmate#15ba87d14324c14c) 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. Ed ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Failing in TextMate but not in rake...
http://wiki.macromates.com/Troubleshooting/RubyVersionIssue Hope this helps. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Failing in TextMate but not in rake...
Thanks! Solved the problem completely! Here are the relevant steps: 1. Create the ~/.MacOSX directory if it doesn't already exist. 2. Using the Property List Editor (in /Developer/Applications/ Utilities), edit the ~/.MacOSX/environment.plist file (creating it if it doesn't already exist). 3. Create a child of the Root (create Root if it doesn't exist) whose name is PATH (w/o the quotes), class is String, and value is the search path you want (the same as the one set up by .bashrc in my case). 4. Log out then log in to apply the changes. 5. To verify that the search path is correct, enter the following into a new TextMate window, select it, and execute it by typing ^R (control- r): #!/bin/sh echo $PATH Ed On Sep 5, 11:43 pm, Hunt Jon [EMAIL PROTECTED] wrote: http://wiki.macromates.com/Troubleshooting/RubyVersionIssue Hope this helps. ___ rspec-users mailing list [EMAIL PROTECTED]://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Failing in TextMate but not in rake...
thanks Ed, I too can now see the nice colored output summary for rspec in textmate, however... What is weird is the following. Any ideas? [A] - MENU BEHAVE DIFFERENTLY TO THE KEYBOARD SHORTCUTS: When I: (a) Run the rspec commands via the TextMate menu using my mouse, e.g. Bundle = RSpec = RunExamples, in this case I get the nice colored output, but (b) When I do Command-R (which is the shortcut for the same command as listed in the menu), I don't get this, but rather just a dialog box with a text based output.. [B] - THE KEYBOARD SHORTCUT FOR RUN SINGLE EXAMPLE FAILS I get this using the keyboard shortcut (again running this via the menu works) - RubyMate r8136 running Ruby r1.8.6 (/opt/local/bin/ruby) transaction_spec.rb /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb:218:in `files_to_load': File or directory not found: [, (RuntimeError) from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb:210:in `each' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb:210:in `files_to_load' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb:98:in `run_examples' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec.rb:20:in `run' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner.rb:192:in `register_at_exit_hook' from /Users/greg/source/myequity/spec/models/transaction_spec.rb:3 [C] Run commands from selected directories/files == Not sure how to get this to work properly. If I click on a directory in the directory tree, then use the menus to run this, it doesn't seem to narrow the report to just this directory. Anyone know how you're supposed to select a directory in text mate prior to running this? Thanks in advance is you can help On Sun, Sep 7, 2008 at 5:50 AM, ed_ruder [EMAIL PROTECTED] wrote: Thanks! Solved the problem completely! Here are the relevant steps: 1. Create the ~/.MacOSX directory if it doesn't already exist. 2. Using the Property List Editor (in /Developer/Applications/ Utilities), edit the ~/.MacOSX/environment.plist file (creating it if it doesn't already exist). 3. Create a child of the Root (create Root if it doesn't exist) whose name is PATH (w/o the quotes), class is String, and value is the search path you want (the same as the one set up by .bashrc in my case). 4. Log out then log in to apply the changes. 5. To verify that the search path is correct, enter the following into a new TextMate window, select it, and execute it by typing ^R (control- r): #!/bin/sh echo $PATH Ed On Sep 5, 11:43 pm, Hunt Jon [EMAIL PROTECTED] wrote: http://wiki.macromates.com/Troubleshooting/RubyVersionIssue Hope this helps. ___ rspec-users mailing list [EMAIL PROTECTED]://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Failing in TextMate but not in rake...
Greg, Each of your issues run correctly for me, from both the menu and the keyboard shortcut. One question: is the language in the menu at the bottom of your spec file set to RSpec? That does affect which keyboard shortcuts are active. Ed On Sep 6, 2:45 pm, Greg Hauptmann [EMAIL PROTECTED] wrote: thanks Ed, I too can now see the nice colored output summary for rspec in textmate, however... What is weird is the following. Any ideas? [A] - MENU BEHAVE DIFFERENTLY TO THE KEYBOARD SHORTCUTS: When I: (a) Run the rspec commands via the TextMate menu using my mouse, e.g. Bundle = RSpec = RunExamples, in this case I get the nice colored output, but (b) When I do Command-R (which is the shortcut for the same command as listed in the menu), I don't get this, but rather just a dialog box with a text based output.. [B] - THE KEYBOARD SHORTCUT FOR RUN SINGLE EXAMPLE FAILS I get this using the keyboard shortcut (again running this via the menu works) - RubyMate r8136 running Ruby r1.8.6 (/opt/local/bin/ruby) transaction_spec.rb /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :218:in `files_to_load': File or directory not found: [, (RuntimeError) from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :210:in `each' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :210:in `files_to_load' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :98:in `run_examples' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec.rb:20:in `run' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner.rb:192:in `register_at_exit_hook' from /Users/greg/source/myequity/spec/models/transaction_spec.rb:3 [C] Run commands from selected directories/files == Not sure how to get this to work properly. If I click on a directory in the directory tree, then use the menus to run this, it doesn't seem to narrow the report to just this directory. Anyone know how you're supposed to select a directory in text mate prior to running this? Thanks in advance is you can help ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Failing in TextMate but not in rake...
doh! thanks Ed, you got it in one :) It was set to Ruby not Rspec. On Sun, Sep 7, 2008 at 8:35 AM, ed_ruder [EMAIL PROTECTED] wrote: Greg, Each of your issues run correctly for me, from both the menu and the keyboard shortcut. One question: is the language in the menu at the bottom of your spec file set to RSpec? That does affect which keyboard shortcuts are active. Ed On Sep 6, 2:45 pm, Greg Hauptmann [EMAIL PROTECTED] wrote: thanks Ed, I too can now see the nice colored output summary for rspec in textmate, however... What is weird is the following. Any ideas? [A] - MENU BEHAVE DIFFERENTLY TO THE KEYBOARD SHORTCUTS: When I: (a) Run the rspec commands via the TextMate menu using my mouse, e.g. Bundle = RSpec = RunExamples, in this case I get the nice colored output, but (b) When I do Command-R (which is the shortcut for the same command as listed in the menu), I don't get this, but rather just a dialog box with a text based output.. [B] - THE KEYBOARD SHORTCUT FOR RUN SINGLE EXAMPLE FAILS I get this using the keyboard shortcut (again running this via the menu works) - RubyMate r8136 running Ruby r1.8.6 (/opt/local/bin/ruby) transaction_spec.rb /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :218:in `files_to_load': File or directory not found: [, (RuntimeError) from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :210:in `each' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :210:in `files_to_load' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner/options.rb :98:in `run_examples' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec.rb:20:in `run' from /Users/greg/source/myequity/vendor/plugins/rspec/lib/spec/runner.rb:192:in `register_at_exit_hook' from /Users/greg/source/myequity/spec/models/transaction_spec.rb:3 [C] Run commands from selected directories/files == Not sure how to get this to work properly. If I click on a directory in the directory tree, then use the menus to run this, it doesn't seem to narrow the report to just this directory. Anyone know how you're supposed to select a directory in text mate prior to running this? Thanks in advance is you can help ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] Failing in TextMate but not in rake...
I'm getting the same error also trying to work this out. Any advice welcomed -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
[rspec-users] Failing in TextMate but not in rake...
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 (http://hivelogic.com/articles/2008/02/ruby-rails-leopard). 'which ruby' finds '/usr/local/bin/ruby', 'which gem' finds '/usr/local/bin/gem'. - In TextMate's Advanced | Shell Variables, TM_RUBY is defined to '/usr/local/bin/ruby' (w/o the quotes). 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. Ed ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users