Cucumber in RubyMine on Windows
Hey Guys,
I am trying to use Cucumber for a Rails project on Windows.
Unfortunately the time it takes to run a single scenario is making BDD impossible.
I understand this is largely due to the time taken by Rails to load up under windows.
Does anyone have any ideas about how I can speed things up?.
Cheers.
请先登录再写评论。
I know only solution for linux/mac: spork gem (http://github.com/timcharper/spork). Unfortunately it isn't available for windows(http://github.com/timcharper/spork/issues#issue/3).
Hello,
I'm having exactly the same problem with Cucumber and the execution speed. I finally chose to do it as follows (so take it as my $0.02):
What is still bad for me: running tests out of RM doesn't make things any faster; also creating a migration etc. pp. takes a lot of time (just for ruby to startup); here it would be excellent if RM could login via SSH to my linux server, change to the working directory and execute all the stuff there...
Using this setup I'm working now for months and I'm quite happy. The only issue I'm having right now is http://youtrack.jetbrains.net/issue/RUBY-5181
Regards,
Andreas
I am currently running development in windows and the production server is linux. I was thinking that I was running spork on the linux box and somehow pointed my windows machine to it so the cucumber tests would run faster. I just had to format my pc and can't find the setting now though. If i can find it, i'll post the info back here.
I've forked Spork to make a version that works in Windows by creating a group of slave processes that are spun up, then wait for tests to be run. They are discarded once run, then regenerated. At present, it works only from command line. I hope to get it working from within the NetBeans and RubyMine IDEs.
See http://wiki.github.com/Milhouse/spork/ for instructions.
Hello Donald,
I'm glad to hear that you've ported Spork to Windows. We will definitely take a look on it and add necessary support for your gem in RubyMine. I've filed a feature request - http://youtrack.jetbrains.net/issue/RUBY-5778
The Windows support was merged into Spork yesterday, but hasn't been released as a gem yet. I'm hoping to work on some changes next week which might support JRuby as well.
I had the same problems when developing Rails under Windows a couple of years ago and wrote an article about my experiences.
The short of it was that it was much faster to develop Rails in a Virtual Machine (now using Debian in VirtualBox) on the same machine than developing on Windows on metal.
HTH.
I'm sure you're right, but our Admins are Windows at work, and they haven't agreed to a VM. And I figure if it works on Windows, it'll work anywhere
Is part of Spork as of version 0.8.1 (http://github.com/timcharper/spork) . See Windows usage notes at: http://wiki.github.com/timcharper/spork/windowssupport
I did an initial experiment with RubyMine RC 2.0.2. Spork starts up for either Rspec or Cucumber tests. It can run tests via command line for either, but only runs within the ide for Rspec. I'll do more detailed investigation later.
Hi Guys,
I just tried Spork with Cucumber on Windows XP and it works from the command line.
When I run it from Rubymine it connects to the Spork server successfully, gets a slave but blows up with a "MissingSourceFile (DRb::DRbUnknownError)" message.
Also in Rubymine the Tools --> "Run Spork Drb Server" menu is disabled.
Has anyone out there got Spork working from Rubymine on Windows?.
Is Spork even supported from Rubymine on Windows?
Cheers
Roy.
As far as I know Spork doesn't work under Windows. Thus option is disabled in RubyMine. But there is a port of Spork gem named "milhouse-spork" (see http://wiki.github.com/Milhouse/spork/). Install it and attach in RubyMine settings and spork actions will be enabled.
Windows is supported in the latest version of Spork (0.8.3).
http://wiki.github.com/timcharper/spork/windowssupport
It only works with win32/mingw Ruby as it depends on the win32-process
gem.Roy,
Thanks. I enabled Spork action in UI. Unfortunately due to some bugs in cucumber (which a related to custom formatters feature) it doesn't work with RubyMine.