I’m trying to run autotest under Windows when using Rails 3.0.1 and
RSpec 2.0.1. It’s not working so far. This is what happens:
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>autotest
loading autotest/rails_rspec2
style: RailsRspec2
bundle exec C:\bin\pik\Ruby-187-p302\bin\ruby -S C:/bin/pik/Ruby-187-
p302/lib/ruby/gems/1.8/gems/rspec-core-2.0.1/bin/rspec --autotest ‘C:/
Users/jarmo
/Desktop/minu/projects/Ruby/sample_app/spec/controllers/
pages_controller_spec.rb’
bundler: command not found: C:\bin\pik\Ruby-187-p302\bin\ruby
Install missing gem binaries with bundle install
… and then i have to interrupt it manually.
I have installed gems autotest and autotest-rails-pure. Anything else
i have to do to get it running?
I didn’t get any replies about that problem so far but i just managed
to find out how to make it work manually.
What manual change did you make?
The problem is that the bundle exec is not working like this on
Windows:
bundle exec C:\bin\pik\Ruby-187-p302\bin\ruby
But works like this:
bundle exec C:\bin\pik\Ruby-187-p302\bin\ruby.exe
I don’t understand who makes that decision what should be executed via
bundler - is it RSpec? Rails? Bundler itself?
As of rspec-2.0, rspec prefixes the command with "bundle exec " if there
is a Gemfile, but delegates to Autotest’s definition of the ruby
executable itself.
There is already an issue open in rspec-core to have an opt-out for
"bundle exec ", but that wouldn’t change which ruby executable is used.
But works like this:
bundle exec C:\bin\pik\Ruby-187-p302\bin\ruby.exe
Sorry that i didn’t bring it out more - i replaced bin\ruby with bin
\ruby.exe and was able to run that bundle exec from the command line
manually. So if the path to Ruby is constructed by RSpec then it is
bug in RSpec’s otherwise it could be somewhere else. Maybe even in
bundler, which could just add that missing “.exe” by itself… That’s
why i’m asking.
Ok, the path is coming from autotest.rb in autotest gem.
But i think that the bug is in Bundler instead:
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>bundle exec c:
\Ruby\bin\ruby --version
bundler: command not found: c:\Ruby\bin\ruby
Install missing gem binaries with bundle install
But works like this:
bundle exec C:\bin\pik\Ruby-187-p302\bin\ruby.exe
Sorry that i didn’t bring it out more - i replaced bin\ruby with bin
\ruby.exe and was able to run that bundle exec from the command line
manually. So if the path to Ruby is constructed by RSpec then it is
bug in RSpec’s otherwise it could be somewhere else. Maybe even in
bundler, which could just add that missing “.exe” by itself… That’s
why i’m asking.
Just FYI if there’s any other Windows/RSpec2/Autotest/Bundler user
Nope. Think you’re the only one
If you strip down the Bundler part, I’m under the same environment too
While I can complain about Bundler doing weird things on Windows I
decided to stop using it and switched to Isolate and invoke commands
with “rake isolate:sh[autotest]”
As for autotest coloring issues, for the ones wondering, we
(RubyInstaller) are working on permanent ANSI coloring solutions for
those Windows users.
–
Luis L.
AREA 17
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupry
If you strip down the Bundler part, I’m under the same environment too
While I can complain about Bundler doing weird things on Windows I
decided to stop using it and switched to Isolate and invoke commands
with “rake isolate:sh[autotest]”
I’m still staying with it in hope of it getting better and trying to
give my feedback about it. Hopefully it doesn’t do weird things on
Windows at some point.
As for autotest coloring issues, for the ones wondering, we
(RubyInstaller) are working on permanent ANSI coloring solutions for
those Windows users.
Thanks! I didn’t even bother about writing about that since the
coloring issues are happening quite often here and there. At least
RSpec seems to work nowadays with that correctly.
Can you share some more (even technical) information about these
solutions? Maybe through some other channel if this might get too
offtopic in here…