Is there a way to run autospec in rubymine? What i would really like is the ability to click on the line in the autospec stack trace and be taken to the line of code with the issue.
thx..
Tried this and it almost worked but for some reason rubymine is using the wrong ruby version in this case. I have gone to preferences and ensured it is configured with the correct /usr/local/bin/ruby but for some reason, rubymine is using /usr/bin/ruby when i run the autospec script. Is this a path issue? When working from the term, I set my PATH to point to /usr/local/bin in my .bash_profile but without that my mac would point to /usr/bin.
thx.
-karl
Karl,
Tried this and it almost worked but for some reason rubymine is using the wrong ruby version in this case. I have gone to preferences and ensured it is configured with the correct /usr/local/bin/ruby but for some reason, rubymine is using /usr/bin/ruby when i run the autospec script.
Karl, please take a look at command line which RubyMine uses for executing autospec script. Does RubyMine use the same interpreter is selected in RubyMine | Settings | RubySDK and Gems
I set my PATH to point to /usr/local/bin in my .bash_profile but without that my mac would point to /usr/bin.
MacOS applies .bash_profile only for Terminal.app environment and Apple suggests to use ~/.MacOSX/environment.plist. But if ruby script doesn't invoke 'ruby' system command or invokes another ruby interpreter using current ruby interpreter path (e.g. rake gem does this) environment.plist isn't necessary for RubyMine.
It's a bit confusing but the path to the ruby executable is correct (/usr/local/bin/ruby), but the error message at the bottom is indicating that it is using the old ruby 1.8.6 while /usr/local/bin/ruby is actually version 1.8.7. Hence my missing gems.
/usr/local/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /Users/karl/NetBeansProjects/weshopnetwork/script/autospec
(Not running features. To run features in autotest, set AUTOFEATURE=true.)
loading autotest/rails_rspec
Missing these required gems:
....
You're running:
ruby 1.8.6.287 at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
rubygems 1.3.1 at /Users/karl/.gem/ruby/1.8, /Library/Ruby/Gems/1.8, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
I hope this makes sense :-). Thanks for your help!
-karl
Let's take a look at './script/autospec'
#!/usr/bin/env ruby
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
ENV['RSPEC'] = 'true' # allows autotest to discover rspec
ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux
system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) ||
$stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH")
I added the following to my environment.plist and when I execute a term I can see it works.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin</string>
</dict>
</plist>
But... i still get the same errors when i run autospec.
/usr/local/bin/ruby -e STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift) /Users/karl/NetBeansProjects/weshopnetwork/script/autospec
(Not running features. To run features in autotest, set AUTOFEATURE=true.)
loading autotest/rails_rspec
Missing these required gems:
....
You're running:
ruby 1.8.6.287 at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
rubygems 1.3.1 at /Users/karl/.gem/ruby/1.8, /Library/Ruby/Gems/1.8, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
thx
-karl
/usr/local/bin/autospec
Yes
It worked. I guess i am missing another setting? Is there a way to execute my .bash_profile before launching rubymine without running it from the terminal?
Thanks again!
-karl