I don''t know why I keep getting the following exception when I try to run cucumber with Ironruby. C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber features/pr ime.feature --no-color syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' (SyntaxError) :0:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/rb_support/r b_language.rb:101:in `load_code_file'' custom_require.rb:30:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/rb_support/r b_language.rb:46:in `step_definitions_for'' polyglot.rb:69:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:118:in `load_code_file'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:110:in `load_code_files'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:109:in `load_code_files'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: 48:in `execute!'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: 23:in `execute'' :0:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/cucumber:9 c:/ruby/bin/cucumber:19 :0:in `load'' I have even updated the path in my icucumber.bat file as follows: @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 @"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe" "c:\ruby\bin\cucumber" %* Thanks, Azam -- Posted via http://www.ruby-forum.com/.
First of all upgrade to ironruby rc2. Also I thought we had a very long discussion on mixing gems installed in a different ruby. Let''s not repeat that one and keep it at don''t mix gem installs. then try this: ir -S gem install cucumber ironterm-ansicolor ir -S cucumber features/prime.feature --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Web: http://whiterabbitconsulting.eu - http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) On Mon, Mar 1, 2010 at 4:08 PM, Mohammad Azam <lists at ruby-forum.com> wrote:> I don''t know why I keep getting the following exception when I try to > run cucumber with Ironruby. > > C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber > features/pr > ime.feature --no-color > syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' > (SyntaxError) > :0:in `require'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/rb_support/r > b_language.rb:101:in `load_code_file'' > custom_require.rb:30:in `require'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/rb_support/r > b_language.rb:46:in `step_definitions_for'' > polyglot.rb:69:in `require'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. > rb:118:in `load_code_file'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. > rb:110:in `load_code_files'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. > rb:109:in `load_code_files'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: > 48:in `execute!'' > > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: > 23:in `execute'' > :0:in `each'' > c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/cucumber:9 > c:/ruby/bin/cucumber:19 > :0:in `load'' > > > I have even updated the path in my icucumber.bat file as follows: > > @ECHO OFF > REM This is to tell IronRuby where to find gems. > SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 > @"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe" "c:\ruby\bin\cucumber" > > %* > > Thanks, > Azam > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100301/3a39c83b/attachment-0001.html>
Looks like a syntax error where you have a identifier (method name or variable name) where a block is expected. Can you figure out where the error is being raised? The fact that it is in a method called "load_code_file" leads me to suspect it is one of the test files as opposed to the cucumber files. -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 7:09 AM To: ironruby-core at rubyforge.org Subject: [Ironruby-core] Cucumber with IronRuby I don''t know why I keep getting the following exception when I try to run cucumber with Ironruby. C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber features/pr ime.feature --no-color syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' (SyntaxError) :0:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/rb_support/r b_language.rb:101:in `load_code_file'' custom_require.rb:30:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/rb_support/r b_language.rb:46:in `step_definitions_for'' polyglot.rb:69:in `require'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:118:in `load_code_file'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:110:in `load_code_files'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/step_mother. rb:109:in `load_code_files'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: 48:in `execute!'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/../lib/cucumber/cli/main.rb: 23:in `execute'' :0:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/cucumber-0.3.101/bin/cucumber:9 c:/ruby/bin/cucumber:19 :0:in `load'' I have even updated the path in my icucumber.bat file as follows: @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 @"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe" "c:\ruby\bin\cucumber" %* Thanks, Azam -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Thanks for the reply! My test file called "primeservice.rb" is placed inside the step_definations folder which is inside the feature folder. Like this: features/step_definations/primeservice.rb The primeservice.rb looks something like this: require ''rubygems'' require ''spec/expectations'' require File.expand_path("bin/Debug/BusinessObjects.dll") include BusinessObjects Thanks, Azam Jim Deville wrote:> Looks like a syntax error where you have a identifier (method name or > variable name) where a block is expected. Can you figure out where the > error is being raised? The fact that it is in a method called > "load_code_file" leads me to suspect it is one of the test files as > opposed to the cucumber files.-- Posted via http://www.ruby-forum.com/.
The ir-S gem install cucumber did not work: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>ir -S gem install cuc umber ironterm-ansicolor Option `-S'' not supported>> First of all upgrade to ironruby rc2.Maybe later! I am afraid it will going to mess things up for me. Ivan Porto Carrero wrote:> First of all upgrade to ironruby rc2. > Also I thought we had a very long discussion on mixing gems installed in > a > different ruby. Let''s not repeat that one and keep it at don''t mix gem > installs. > > then try this: > > ir -S gem install cucumber ironterm-ansicolor > ir -S cucumber features/prime.feature > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Web: http://whiterabbitconsulting.eu - http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero)-- Posted via http://www.ruby-forum.com/.
I installed the icucumber again using the following command: igem install cucumber the install went fine. then i said icucumber on the command prompt and I got the following: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber *** WARNING: You must "igem install iron-term-ansicolor" to get coloured ouput i n on IronRuby syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' (SyntaxError) :0:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/rb_support/rb_language.rb:124:in `load_code_file'' custom_require.rb:30:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:84:in `load_code_file'' polyglot.rb:64:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:76:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:75:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:51:in `execute!'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:20:in `execute'' :0:in `each'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/cucum ber:8 c:/ruby/bin/cucumber:19 :0:in `load'' So, I tried installing the iron-term-ansicolor but I got the following: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>igem install iron-ter m-ansicolor ERROR: While executing gem ... (IndexError) Index was outside the bounds of the array. C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp> -- Posted via http://www.ruby-forum.com/.
Try to run icucumber with the --no-color switch. -------------------------------------------------------- Shay Friedman | .NET Technologies Expert | Author of IronRuby Unleashed | Sela Technology Center Blog: http://IronShay.com | Twitter: http://twitter.com/ironshay On Mon, Mar 1, 2010 at 5:56 PM, Mohammad Azam <lists at ruby-forum.com> wrote:> I installed the icucumber again using the following command: > > igem install cucumber > > the install went fine. then i said > > icucumber on the command prompt and I got the following: > > > C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber > *** WARNING: You must "igem install iron-term-ansicolor" to get coloured > ouput i > n on IronRuby > syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' > (SyntaxError) > :0:in `require'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li > b/cucumber/rb_support/rb_language.rb:124:in `load_code_file'' > custom_require.rb:30:in `require'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li > b/cucumber/step_mother.rb:84:in `load_code_file'' > polyglot.rb:64:in `require'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li > b/cucumber/step_mother.rb:76:in `load_code_files'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li > b/cucumber/step_mother.rb:75:in `load_code_files'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li > b/cucumber/cli/main.rb:51:in `execute!'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li > b/cucumber/cli/main.rb:20:in `execute'' > :0:in `each'' > > C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/cucum > ber:8 > c:/ruby/bin/cucumber:19 > :0:in `load'' > > So, I tried installing the iron-term-ansicolor but I got the following: > > C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>igem install > iron-ter > m-ansicolor > ERROR: While executing gem ... (IndexError) > Index was outside the bounds of the array. > > C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp> > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100301/53ec68ee/attachment.html>
That''s why rc2 was FIRST. -S is an option added in rc2. If you want to support our project, we would appreciate it if you worked with the up to date bits so that we can be certain we aren''t fighting against a resolved bug. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 7:48 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby The ir-S gem install cucumber did not work: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>ir -S gem install cuc umber ironterm-ansicolor Option `-S'' not supported>> First of all upgrade to ironruby rc2.Maybe later! I am afraid it will going to mess things up for me. Ivan Porto Carrero wrote:> First of all upgrade to ironruby rc2. > Also I thought we had a very long discussion on mixing gems installed > in a different ruby. Let''s not repeat that one and keep it at don''t > mix gem installs. > > then try this: > > ir -S gem install cucumber ironterm-ansicolor ir -S cucumber > features/prime.feature > --- > Met vriendelijke groeten - Best regards - Salutations Ivan Porto > Carrero > Web: http://whiterabbitconsulting.eu - http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero)-- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
My feature file is called prime.feature and now I added a new test file called "prime_steps" (I thought maybe the name has to be same). After running the icucumber features/prime.feature I still get the same error. The strange thing is that I don''nt have any code in the test file. It is totally blank. -- Posted via http://www.ruby-forum.com/.
What does prime.feature look like then? -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 8:11 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby My feature file is called prime.feature and now I added a new test file called "prime_steps" (I thought maybe the name has to be same). After running the icucumber features/prime.feature I still get the same error. The strange thing is that I don''nt have any code in the test file. It is totally blank. -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Here is prime.feature: Feature: Prime Number Detection I need to find if a number is prime or not Scenario Outline: Prime Number Testing Given I have a <number> When I pass the number to a IsPrime method Then I should get <result> indication prime or not Examples: | number | result | | 1 | true | | 2 | true | | 4 | false | I ran without the --no-color and still getting the same issue: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber features/pr ime.feature *** WARNING: You must "igem install iron-term-ansicolor" to get coloured ouput i n on IronRuby syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' (SyntaxError) :0:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/rb_support/rb_language.rb:124:in `load_code_file'' custom_require.rb:30:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:84:in `load_code_file'' polyglot.rb:64:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:76:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:75:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:51:in `execute!'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:20:in `execute'' :0:in `each'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/cucum ber:8 c:/ruby/bin/cucumber:19 :0:in `load'' C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp> -- Posted via http://www.ruby-forum.com/.
Can you modify icucumber to run ir -d to turn on debug mode? That should give some logs that will help. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 7:57 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby I installed the icucumber again using the following command: igem install cucumber the install went fine. then i said icucumber on the command prompt and I got the following: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber *** WARNING: You must "igem install iron-term-ansicolor" to get coloured ouput i n on IronRuby syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' (SyntaxError) :0:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/rb_support/rb_language.rb:124:in `load_code_file'' custom_require.rb:30:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:84:in `load_code_file'' polyglot.rb:64:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:76:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:75:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:51:in `execute!'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:20:in `execute'' :0:in `each'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/cucum ber:8 c:/ruby/bin/cucumber:19 :0:in `load'' So, I tried installing the iron-term-ansicolor but I got the following: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>igem install iron-ter m-ansicolor ERROR: While executing gem ... (IndexError) Index was outside the bounds of the array. C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp> -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
I can perform the update but I am afraid that it will break my previous code and I cannot take that risk right now. Is there anyway to solve the issue on RC1? Thanks, Azam Jim Deville wrote:> That''s why rc2 was FIRST. -S is an option added in rc2. If you want to > support our project, we would appreciate it if you worked with the up to > date bits so that we can be certain we aren''t fighting against a > resolved bug. > > JD-- Posted via http://www.ruby-forum.com/.
When I type ir -d on the command prompt it takes me to the ironruby interactive console? -- Posted via http://www.ruby-forum.com/.
Can you modify icucumber to run ir -d to turn on debug mode? That should give some logs that will help. This is not the same as typing ir -d on the command line. This is modifying the icucumber.bat file you showed earlier to use the -d option. Then run icucumber feature/whatever like you were before. JD JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 9:20 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby When I type ir -d on the command prompt it takes me to the ironruby interactive console? -- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Just modified the icucumber.bat to this: @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 @"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d" "c:\ruby\bin \cucumber" %* Now ran the icucumber and got the following: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber features/pr ime.feature ''"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d"'' is not recognized as an internal or external command, operable program or batch file. Thanks, Azam Jim Deville wrote:> Can you modify icucumber to run ir -d to turn on debug mode? That should > give some logs that will help. This is not the same as typing ir -d on > the command line. This is modifying the icucumber.bat file you showed > earlier to use the -d option. Then run icucumber feature/whatever like > you were before. > > JD > > JD-- Posted via http://www.ruby-forum.com/.
Get rid of the quotes. You don''t have spaces in your path, so it shouldn''t be needed. Can we also get you to join the mailing list so that the threads are preserved better? The ruby-forum isn''t good for these long conversations. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 9:36 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby Just modified the icucumber.bat to this: @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 @"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d" "c:\ruby\bin \cucumber" %* Now ran the icucumber and got the following: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber features/pr ime.feature ''"C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d"'' is not recognized as an internal or external command, operable program or batch file. Thanks, Azam Jim Deville wrote:> Can you modify icucumber to run ir -d to turn on debug mode? That > should give some logs that will help. This is not the same as typing > ir -d on the command line. This is modifying the icucumber.bat file > you showed earlier to use the -d option. Then run icucumber > feature/whatever like you were before. > > JD > > JD-- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
Here is the updated: @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d c:\ruby\bin\cucumber %* still giving the same error and took 20 seconds to execute icucumber command. Jim Deville wrote:> Get rid of the quotes. You don''t have spaces in your path, so it > shouldn''t be needed. Can we also get you to join the mailing list so > that the threads are preserved better? The ruby-forum isn''t good for > these long conversations. > > JD-- Posted via http://www.ruby-forum.com/.
Ok. We''re missing something here. Let''s take this offline. Email me personally, with a copy of your project if you can. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 9:56 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby Here is the updated: @ECHO OFF REM This is to tell IronRuby where to find gems. SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d c:\ruby\bin\cucumber %* still giving the same error and took 20 seconds to execute icucumber command. Jim Deville wrote:> Get rid of the quotes. You don''t have spaces in your path, so it > shouldn''t be needed. Can we also get you to join the mailing list so > that the threads are preserved better? The ruby-forum isn''t good for > these long conversations. > > JD-- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
to get a backtrace of what''s happening you can run icucumber -b features/prime.feature --- Met vriendelijke groeten - Best regards - Salutations Ivan Porto Carrero Web: http://whiterabbitconsulting.eu - http://flanders.co.nz Twitter: http://twitter.com/casualjim Author of IronRuby in Action (http://manning.com/carrero) Microsoft IronRuby/C# MVP On Mon, Mar 1, 2010 at 7:02 PM, Jim Deville <jdeville at microsoft.com> wrote:> Ok. We''re missing something here. Let''s take this offline. Email me > personally, with a copy of your project if you can. > > JD > > -----Original Message----- > From: ironruby-core-bounces at rubyforge.org [mailto: > ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam > Sent: Monday, March 01, 2010 9:56 AM > To: ironruby-core at rubyforge.org > Subject: Re: [Ironruby-core] Cucumber with IronRuby > > Here is the updated: > > @ECHO OFF > REM This is to tell IronRuby where to find gems. > SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8 > C:\DevTools\ironruby-1.0-rc1\bin\ir.exe -d c:\ruby\bin\cucumber %* > > still giving the same error and took 20 seconds to execute icucumber > command. > > > Jim Deville wrote: > > Get rid of the quotes. You don''t have spaces in your path, so it > > shouldn''t be needed. Can we also get you to join the mailing list so > > that the threads are preserved better? The ruby-forum isn''t good for > > these long conversations. > > > > JD > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100301/5c4fd219/attachment.html>
I got the following after running it using the -b option: C:\Projects\ILoveIronRuby\ILoveIronRuby\IronRubyConsoleApp>icucumber -b features /prime.feature *** WARNING: You must "igem install iron-term-ansicolor" to get coloured ouput i n on IronRuby syntax error, unexpected IDENTIFIER, expecting ''{'', or DO, or ''('' (SyntaxError) :0:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:3 1:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/polyglot-0.3.0/lib/polyg lot.rb:65:in `require'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/rb_support/rb_language.rb:124:in `load_code_file'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:84:in `load_code_file'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:76:in `load_code_files'' :0:in `each'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/step_mother.rb:75:in `load_code_files'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:51:in `execute!'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/../li b/cucumber/cli/main.rb:20:in `execute'' C:/DevTools/ironruby-1.0-rc1/lib/ironruby/gems/1.8/gems/cucumber-0.6.2/bin/cucum ber:8 :0:in `load'' c:/ruby/bin/cucumber:19 Ivan Porto Carrero wrote:> to get a backtrace of what''s happening you can run icucumber -b > features/prime.feature > --- > Met vriendelijke groeten - Best regards - Salutations > Ivan Porto Carrero > Web: http://whiterabbitconsulting.eu - http://flanders.co.nz > Twitter: http://twitter.com/casualjim > Author of IronRuby in Action (http://manning.com/carrero) > Microsoft IronRuby/C# MVP-- Posted via http://www.ruby-forum.com/.
Seems like the forums file attach limit is less then 1.5 MB (Are we living in the 80''s? :) Anyway, here is the url: http://www.highoncoding.com/articledownloads/IronRubyConsoleApp.zip Jim Deville wrote:> Ok. We''re missing something here. Let''s take this offline. Email me > personally, with a copy of your project if you can. > > JD-- Posted via http://www.ruby-forum.com/.
Heh, that''s why I said send it to me offline. Anyways, addition.rb is pure ruby, you can''t have the last three lines of the file as is. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 10:37 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby Seems like the forums file attach limit is less then 1.5 MB (Are we living in the 80''s? :) Anyway, here is the url: http://www.highoncoding.com/articledownloads/IronRubyConsoleApp.zip Jim Deville wrote:> Ok. We''re missing something here. Let''s take this offline. Email me > personally, with a copy of your project if you can. > > JD-- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
But I am trying to execute prime_steps.rb. Does it execute all of them by default or something?? Jim Deville wrote:> Heh, that''s why I said send it to me offline. Anyways, addition.rb is > pure ruby, you can''t have the last three lines of the file as is. > > JD-- Posted via http://www.ruby-forum.com/.
I cannot believe it that was the problem. I deleted the addition.rb file and it started working. Lesson learned!! Cucumber will execute everything inside the step_definations. Jim Deville wrote:> Heh, that''s why I said send it to me offline. Anyways, addition.rb is > pure ruby, you can''t have the last three lines of the file as is. > > JD-- Posted via http://www.ruby-forum.com/.
It loads all of them by default -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 11:09 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby But I am trying to execute prime_steps.rb. Does it execute all of them by default or something?? Jim Deville wrote:> Heh, that''s why I said send it to me offline. Anyways, addition.rb is > pure ruby, you can''t have the last three lines of the file as is. > > JD-- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core
The thing is, you might have a login.rb file that has login steps, that is then used in all of your features that require logging in. It appears you can override automatic loading via -r, but otherwise, it has to load everything to be safe. JD -----Original Message----- From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Mohammad Azam Sent: Monday, March 01, 2010 11:11 AM To: ironruby-core at rubyforge.org Subject: Re: [Ironruby-core] Cucumber with IronRuby I cannot believe it that was the problem. I deleted the addition.rb file and it started working. Lesson learned!! Cucumber will execute everything inside the step_definations. Jim Deville wrote:> Heh, that''s why I said send it to me offline. Anyways, addition.rb is > pure ruby, you can''t have the last three lines of the file as is. > > JD-- Posted via http://www.ruby-forum.com/. _______________________________________________ Ironruby-core mailing list Ironruby-core at rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core