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.

13 comments
Comment actions Permalink

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).

0
Comment actions Permalink

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):

  • have my ruby project runing on a linux machine
  • all the cucumber/test runs are running on the linux machine (wonderful fast)
  • I run ruby script/server on the linux machine as well
  • I use samba to share the the directory where my ruby project is hosted
  • I mount this directory on windows and run RubyMine locally on my windows machine pointing it to the mounted directory
  • having installed the windows port of GIT makes VCS available via RubyMine too


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

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

0

Please sign in to leave a comment.