# Cucumber with IronRuby V 1.0

**URL:** <https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611>\
**Category:** IronRuby\
**Created:** [June 23, 2010, 8:29pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611 "2010-06-23T20:29:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 8:29pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/1 "2010-06-23T20:29:15Z")

</div>

What are the steps of running Cucumber with IronRuby? Do I need to make  
a  
separate batch file called ICucumber.bat and then invoke it. Here is my  
ICucumber.bat file:

@ECHO OFF  
REM This is to tell IronRuby where to find gems.  
SET  
MONO\_PATH=C:/IronRuby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotnet/lib  
SET GEM\_PATH=c:\ruby\lib\ruby\gems\1.8  
@“C:\IronRuby\bin\ir.exe” “c:\ruby\bin\cucumber” %\*

Any ideas?

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 9:06pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/2 "2010-06-23T21:06:08Z")

</div>

There is an issue with the Gherkin parser used by Cucumber.

Downgrade to Cucumber 0.6.4, which does not use the Ragel-generated  
(native  
code) parser. It is slower, but it works.

[http://github.com/aslakhellesoy/gherkin/issues/issue/63](http://github.com/aslakhellesoy/gherkin/issues/issue/63)

–  
Will G.  
[http://hotgazpacho.org/](http://hotgazpacho.org/)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 9:35pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/3 "2010-06-23T21:35:24Z")

</div>

I downloaded and install Cucumber 0.6.4. I deleted the Cucumber 0.8.3  
folder  
but now when I run the following command.

c: cucumber

I get the following error:

no such file to load –  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.8.3/bin/cucumber

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 9:53pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/4 "2010-06-23T21:53:33Z")

</div>

Hi Mohammad –

That looks like your Ruby not IronRuby … Try running:

ir -S cucumber

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/5 "2010-06-23T22:28:06Z")

</div>

That might be the thing!!

What does that -S stands for and where is it documented? Do I still need  
to  
make the icucumber.bat I guess not?

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 24, 2010, 3:59am UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/6 "2010-06-24T03:59:23Z")

</div>

I swear I got it running at work but I got home booted my computer and  
ran  
the following:

ir -S cucumber

and I got the following:

C:\Projects\IronRubyDemo\IronRubyDemoSolution\BusinessObjects\>ir -S  
cucumber  
C:/IronRuby/lib/ruby/site\_ruby/1.8/rubygems.rb:827:in  
`report_activate_error': C ould not find RubyGem treetop (>= 1.4.2)\n (Gem::LoadError) from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems.rb:261:in`activate’  
from C:/IronRuby/lib/ruby/site\_ruby/1.8/rubygems.rb:296:in  
`activate' from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems.rb:295:in`each’  
from C:/IronRuby/lib/ruby/site\_ruby/1.8/rubygems.rb:295:in  
`activate' from C:/IronRuby/lib/ruby/site_ruby/1.8/rubygems.rb:68:in`gem’  
from c:/ruby/bin/cucumber:18

On Wed, Jun 23, 2010 at 2:30 PM, Jimmy S. \<

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 10:29pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/7 "2010-06-23T22:29:16Z")

</div>

No, actually, he is using IronRuby, but setting the GEM\_PATH to his Ruby  
implementation, which is those stack traces come from c:\ruby.

Azam, first off, Iâ€™d recommend using the IronRuby 1.0 installer and not  
changing any other settings, like GEM\_PATH; youâ€™ll just run into these  
simple configuration issues, and we all know how you donâ€™t like  
configuration. =) Also, weâ€™d prefer not to answer these configuration  
issues, so please used the installer.

So, no need for a icucumber.bat file â€¦ just do â€œigem install cucumber  
-v0.6.4â€ (from an elevated command prompt). Then just running â€œcucumberâ€  
will run against IronRuby.

~Jimmy

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Eddie Cianci  
Sent: Wednesday, June 23, 2010 12:39 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Cucumber with IronRuby V 1.0

Hi Mohammad –

That looks like your Ruby not IronRuby … Try running:

ir -S cucumber

On Wed, Jun 23, 2010 at 3:27 PM, Mohammad A.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
I downloaded and install Cucumber 0.6.4. I deleted the Cucumber 0.8.3  
folder but now when I run the following command.

c: cucumber

I get the following error:

no such file to load –  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.8.3/bin/cucumber

On Wed, Jun 23, 2010 at 2:05 PM, Will G.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
There is an issue with the Gherkin parser used by Cucumber.

Downgrade to Cucumber 0.6.4, which does not use the Ragel-generated  
(native code) parser. It is slower, but it works.

[http://github.com/aslakhellesoy/gherkin/issues/issue/63](http://github.com/aslakhellesoy/gherkin/issues/issue/63)

–  
Will G.  
[http://hotgazpacho.org/](http://hotgazpacho.org/)

On Wed, Jun 23, 2010 at 2:04 PM, Mohammad A.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
What are the steps of running Cucumber with IronRuby? Do I need to make  
a separate batch file called ICucumber.bat and then invoke it. Here is  
my ICucumber.bat file:

@ECHO OFF  
REM This is to tell IronRuby where to find gems.  
SET  
MONO\_PATH=C:/IronRuby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotnet/lib  
SET GEM\_PATH=c:\ruby\lib\ruby\gems\1.8  
@“C:\IronRuby\bin\ir.exe” “c:\ruby\bin\cucumber” %\*

Any ideas?

–  
Mohammad A.  
MVP (Microsoft Valuable Professional)  
[www.highoncoding.com](http://www.highoncoding.com)[http://www.highoncoding.com](http://www.highoncoding.com)  
[www.azamsharp.com](http://www.azamsharp.com)[http://www.azamsharp.com](http://www.azamsharp.com)

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Mohammad A.  
MVP (Microsoft Valuable Professional)  
[www.highoncoding.com](http://www.highoncoding.com)[http://www.highoncoding.com](http://www.highoncoding.com)  
[www.azamsharp.com](http://www.azamsharp.com)[http://www.azamsharp.com](http://www.azamsharp.com)

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 24, 2010, 4:42am UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/8 "2010-06-24T04:42:06Z")

</div>

Weird! I download the treetop gem and it started working again. Maybe it  
has  
something to do with my BLUE screen of death on Windows 7.

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 23, 2010, 10:31pm UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/9 "2010-06-23T22:31:37Z")

</div>

Note: if you have Ruby installed, it will still be ahead of IronRuby in  
the OS Path, so youâ€™ll have to do â€œir -S cucumberâ€. To answer your  
question on the previous thread, itâ€™s documented on the ir.exe directly  
(ir.exe /?).

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Jimmy  
Schementi  
Sent: Wednesday, June 23, 2010 1:28 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Cucumber with IronRuby V 1.0

No, actually, he is using IronRuby, but setting the GEM\_PATH to his Ruby  
implementation, which is those stack traces come from c:\ruby.

Azam, first off, Iâ€™d recommend using the IronRuby 1.0 installer and not  
changing any other settings, like GEM\_PATH; youâ€™ll just run into these  
simple configuration issues, and we all know how you donâ€™t like  
configuration. =) Also, weâ€™d prefer not to answer these configuration  
issues, so please used the installer.

So, no need for a icucumber.bat file â€¦ just do â€œigem install cucumber  
-v0.6.4â€ (from an elevated command prompt). Then just running â€œcucumberâ€  
will run against IronRuby.

~Jimmy

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Eddie Cianci  
Sent: Wednesday, June 23, 2010 12:39 PM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Cucumber with IronRuby V 1.0

Hi Mohammad –

That looks like your Ruby not IronRuby … Try running:

ir -S cucumber

On Wed, Jun 23, 2010 at 3:27 PM, Mohammad A.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
I downloaded and install Cucumber 0.6.4. I deleted the Cucumber 0.8.3  
folder but now when I run the following command.

c: cucumber

I get the following error:

no such file to load –  
c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.8.3/bin/cucumber

On Wed, Jun 23, 2010 at 2:05 PM, Will G.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
There is an issue with the Gherkin parser used by Cucumber.

Downgrade to Cucumber 0.6.4, which does not use the Ragel-generated  
(native code) parser. It is slower, but it works.

[http://github.com/aslakhellesoy/gherkin/issues/issue/63](http://github.com/aslakhellesoy/gherkin/issues/issue/63)

–  
Will G.  
[http://hotgazpacho.org/](http://hotgazpacho.org/)  
On Wed, Jun 23, 2010 at 2:04 PM, Mohammad A.  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> wrote:  
What are the steps of running Cucumber with IronRuby? Do I need to make  
a separate batch file called ICucumber.bat and then invoke it. Here is  
my ICucumber.bat file:

@ECHO OFF  
REM This is to tell IronRuby where to find gems.  
SET  
MONO\_PATH=C:/IronRuby/lib/ironruby/gems/1.8/gems/gherkin-2.0.2-universal-dotnet/lib  
SET GEM\_PATH=c:\ruby\lib\ruby\gems\1.8  
@“C:\IronRuby\bin\ir.exe” “c:\ruby\bin\cucumber” %\*

Any ideas?

–  
Mohammad A.  
MVP (Microsoft Valuable Professional)  
[www.highoncoding.com](http://www.highoncoding.com)[http://www.highoncoding.com](http://www.highoncoding.com)  
[www.azamsharp.com](http://www.azamsharp.com)[http://www.azamsharp.com](http://www.azamsharp.com)

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

–  
Mohammad A.  
MVP (Microsoft Valuable Professional)  
[www.highoncoding.com](http://www.highoncoding.com)[http://www.highoncoding.com](http://www.highoncoding.com)  
[www.azamsharp.com](http://www.azamsharp.com)[http://www.azamsharp.com](http://www.azamsharp.com)

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 24, 2010, 4:42am UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/10 "2010-06-24T04:42:06Z")

</div>

I’ve noticed that my recent addition of the ironruby.rb file in  
%IronRuby%\lib\ruby\site\_ruby\1.8\rubygems\defaults for  
Gem.default\_exec\_format allows RubyGems to set the correct variables in  
the  
scripts that a gem installs, such that you no longer need to do

ir -S scriptname

and you can instead do

scriptname

and it will be properly executed by IronRuby.

Note that this only applies to gems installed after you add the  
ironruby.rb  
file.

–  
Will G.  
[http://hotgazpacho.org/](http://hotgazpacho.org/)

On Wed, Jun 23, 2010 at 4:28 PM, Jimmy S. \<

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 24, 2010, 5:42am UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/11 "2010-06-24T05:42:24Z")

</div>

Thanks Will!

I think I will go with ir -S rubygem.

Thanks,  
Azam

---

<div class="post-metadata">

**Author:** ![metanoize](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Post date:** [June 24, 2010, 5:17am UTC](https://www.ruby-forum.com/t/cucumber-with-ironruby-v-1-0/190611/12 "2010-06-24T05:17:14Z")

</div>

BTW I did use the installer.

On Wed, Jun 23, 2010 at 2:28 PM, Jimmy S. \<
