<?xml version="1.0" encoding="UTF-8"?>
<ticket>
  <assigned-user-id type="integer">1302</assigned-user-id>
  <attachments-count type="integer">0</attachments-count>
  <closed type="boolean">true</closed>
  <created-at type="datetime">2009-01-18T02:12:54+01:00</created-at>
  <creator-id type="integer">12071</creator-id>
  <milestone-due-on type="datetime" nil="true"></milestone-due-on>
  <milestone-id type="integer" nil="true"></milestone-id>
  <number type="integer">165</number>
  <permalink>error-when-not-caching-classes</permalink>
  <priority type="integer">27231</priority>
  <project-id type="integer">16211</project-id>
  <raw-data type="binary" nil="true" encoding="base64"></raw-data>
  <state>resolved</state>
  <tag>bug database innodb myisam rails rollback table transaction type world</tag>
  <title>Error when not caching classes</title>
  <updated-at type="datetime">2009-08-04T15:35:15+02:00</updated-at>
  <user-id type="integer">1379</user-id>
  <user-name>Lee Hambley</user-name>
  <creator-name>Mark Wilden</creator-name>
  <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
  <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
  <original-body>With

config.cache_classes = false

in config/environments/test.rb, running 'rake features' with a webrat 'visit' step produces

/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17143580'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `each'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
	 ... 7 levels...
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:39:in `visit_features'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:159:in `execute!'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:14:in `execute'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/cucumber:6
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]

Setting

config.cache_classes = true

does not produce this error. (Turning off class caching is necessary to use spec_server.)</original-body>
  <latest-body>With

config.cache_classes = false

in config/environments/test.rb, running 'rake features' with a webrat 'visit' step produces

/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17143580'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `each'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
	 ... 7 levels...
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:39:in `visit_features'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:159:in `execute!'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:14:in `execute'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/cucumber:6
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]

Setting

config.cache_classes = true

does not produce this error. (Turning off class caching is necessary to use spec_server.)</latest-body>
  <original-body-html>&lt;div&gt;&lt;p&gt;With&lt;/p&gt;
&lt;p&gt;config.cache_classes = false&lt;/p&gt;
&lt;p&gt;in config/environments/test.rb, running 'rake features' with a
webrat 'visit' step produces&lt;/p&gt;
&lt;p&gt;
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in
&lt;code&gt;decrement_open_transactions': You have a nil object when you
didn't expect it! (NoMethodError) You might have expected an
instance of Array. The error occurred while evaluating nil.- from
/Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/rails/world.rb:60:in&lt;/code&gt;__cucumber_17143580'&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `each'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
 ... 7 levels...
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:39:in `visit_features'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:159:in `execute!'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:14:in `execute'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/cucumber:6
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;rake aborted! Command failed with status (1):
[/System/Library/Frameworks/Ruby.framework/...]&lt;/p&gt;
&lt;p&gt;Setting&lt;/p&gt;
&lt;p&gt;config.cache_classes = true&lt;/p&gt;
&lt;p&gt;does not produce this error. (Turning off class caching is
necessary to use spec_server.)&lt;/p&gt;&lt;/div&gt;</original-body-html>
  <versions type="array">
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>With

config.cache_classes = false

in config/environments/test.rb, running 'rake features' with a webrat 'visit' step produces

/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17143580'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `each'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
	 ... 7 levels...
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:39:in `visit_features'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:159:in `execute!'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:14:in `execute'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/cucumber:6
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]

Setting

config.cache_classes = true

does not produce this error. (Turning off class caching is necessary to use spec_server.)</body>
      <body-html>&lt;div&gt;&lt;p&gt;With&lt;/p&gt;
&lt;p&gt;config.cache_classes = false&lt;/p&gt;
&lt;p&gt;in config/environments/test.rb, running 'rake features' with a
webrat 'visit' step produces&lt;/p&gt;
&lt;p&gt;
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in
&lt;code&gt;decrement_open_transactions': You have a nil object when you
didn't expect it! (NoMethodError) You might have expected an
instance of Array. The error occurred while evaluating nil.- from
/Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/rails/world.rb:60:in&lt;/code&gt;__cucumber_17143580'&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `each'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
 ... 7 levels...
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/executor.rb:39:in `visit_features'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:159:in `execute!'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/../lib/cucumber/cli.rb:14:in `execute'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.15/bin/cucumber:6
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;rake aborted! Command failed with status (1):
[/System/Library/Frameworks/Ruby.framework/...]&lt;/p&gt;
&lt;p&gt;Setting&lt;/p&gt;
&lt;p&gt;config.cache_classes = true&lt;/p&gt;
&lt;p&gt;does not produce this error. (Turning off class caching is
necessary to use spec_server.)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-18T02:12:54+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-01-18T02:12:59+01:00</updated-at>
      <user-id type="integer">12071</user-id>
      <user-name>Mark Wilden</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Very interesting. Definitely looks like the same issue I was seeing in my rspec-users post:

http://rubyforge.org/pipermail/rspec-users/2009-January/011735.html

As I noted there, the error went away for me if I commented this line out from my features/support/env.rb file:

@@@
Cucumber::Rails.use_transactional_fixtures
@@@

On seeing your ticket, I've uncommented it and changed this line in my config/environments/test.rb from:

@@@
config.cache_classes = false
@@@

To:

@@@
config.cache_classes = true
@@@

And the error goes away.

Interestingly enough, turning on class caching also fixes a problem with FixtureReplacement. With class caching turned off I couldn't use FixtureReplacement in my step definitions at all; a line like:

@@@
create_article :title =&gt; title
@@@

Would produce this error when running the features:

@@@
undefined local variable or method `validate' for #&lt;Article:0x34031cc&gt; (NameError)
vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:68:in `create_article'
@@@

Which was a completely bizarre error message to me because evidently an Article instance was being created, and it very definitely understands the &quot;validate&quot; method.

So there's something very fishy going on that relates to class caching.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Very interesting. Definitely looks like the same issue I was
seeing in my rspec-users post:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://rubyforge.org/pipermail/rspec-users/2009-January/011735.html&quot;&gt;
http://rubyforge.org/pipermail/r...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As I noted there, the error went away for me if I commented this
line out from my features/support/env.rb file:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
Cucumber::Rails.use_transactional_fixtures
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On seeing your ticket, I've uncommented it and changed this line
in my config/environments/test.rb from:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
config.cache_classes = false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
config.cache_classes = true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And the error goes away.&lt;/p&gt;
&lt;p&gt;Interestingly enough, turning on class caching also fixes a
problem with FixtureReplacement. With class caching turned off I
couldn't use FixtureReplacement in my step definitions at all; a
line like:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
create_article :title =&amp;gt; title
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Would produce this error when running the features:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
undefined local variable or method `validate' for #&amp;lt;Article:0x34031cc&amp;gt; (NameError)
vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:68:in `create_article'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which was a completely bizarre error message to me because
evidently an Article instance was being created, and it very
definitely understands the &quot;validate&quot; method.&lt;/p&gt;
&lt;p&gt;So there's something very fishy going on that relates to class
caching.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-01-18T21:25:21+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag nil="true"></tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-01-18T21:25:24+01:00</updated-at>
      <user-id type="integer">12845</user-id>
      <user-name>Wincent Colaiuta</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I note you are using cucumber 0.15.x.

The latest stable gem release is version 0.16.x.

Would you mind upgrading and seeing if you still have the same problem.

Thanks</body>
      <body-html>&lt;div&gt;&lt;p&gt;I note you are using cucumber 0.15.x.&lt;/p&gt;
&lt;p&gt;The latest stable gem release is version 0.16.x.&lt;/p&gt;
&lt;p&gt;Would you mind upgrading and seeing if you still have the same
problem.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-17T21:50:17+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-02-17T21:50:22+01:00</updated-at>
      <user-id type="integer">15301</user-id>
      <user-name>Joseph Wilk</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I'm using the latest version, 0.1.16, and the problem exists.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I'm using the latest version, 0.1.16, and the problem
exists.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-17T22:12:25+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-02-17T22:12:31+01:00</updated-at>
      <user-id type="integer">12845</user-id>
      <user-name>Wincent Colaiuta</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The same error occurs with Cucumber 0.1.16, with a somewhat different backtrace:

  /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib  /active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17000320'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `each'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
	 ... 9 levels...
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in `execute'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
	from /usr/bin/cucumber:19:in `load'
	from /usr/bin/cucumber:19</body>
      <body-html>&lt;div&gt;&lt;p&gt;The same error occurs with Cucumber 0.1.16, with a somewhat
different backtrace:&lt;/p&gt;
&lt;p&gt;/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib
/active_record/connection_adapters/abstract_adapter.rb:159:in
&lt;code&gt;decrement_open_transactions': You have a nil object when you
didn't expect it! (NoMethodError) You might have expected an
instance of Array. The error occurred while evaluating nil.- from
/Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/rails/world.rb:60:in&lt;/code&gt;__cucumber_17000320'&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `each'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
 ... 9 levels...
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in `execute'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
from /usr/bin/cucumber:19:in `load'
from /usr/bin/cucumber:19
&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-17T22:13:06+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-02-17T22:13:11+01:00</updated-at>
      <user-id type="integer">12071</user-id>
      <user-name>Mark Wilden</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The same error occurs with Cucumber 0.1.16, with a somewhat different backtrace:

    /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17000320'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `each'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
	 ... 9 levels...
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in `execute'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
	from /usr/bin/cucumber:19:in `load'
	from /usr/bin/cucumber:19

(I'm trying to figure out how to quote stuff in this markup, whatever it is.)</body>
      <body-html>&lt;div&gt;&lt;p&gt;The same error occurs with Cucumber 0.1.16, with a somewhat
different backtrace:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;You might have expected an instance of Array. The error occurred
while evaluating nil.- from
/Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/rails/world.rb:60:in
&lt;code&gt;__cucumber_17000320'&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `each'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
 ... 9 levels...
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in `execute'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
from /usr/bin/cucumber:19:in `load'
from /usr/bin/cucumber:19
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;(I'm trying to figure out how to quote stuff in this markup,
whatever it is.)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-17T22:14:55+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-02-17T22:14:57+01:00</updated-at>
      <user-id type="integer">12071</user-id>
      <user-name>Mark Wilden</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Closer. :)

    /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
    You might have expected an instance of Array.
    The error occurred while evaluating nil.-	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17000320'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `each'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
	 ... 9 levels...
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in `execute'
	from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
	from /usr/bin/cucumber:19:in `load'
	from /usr/bin/cucumber:19</body>
      <body-html>&lt;div&gt;&lt;p&gt;Closer. :)&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:159:in `decrement_open_transactions': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-   from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/rails/world.rb:60:in `__cucumber_17000320'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `__send__'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/core_ext/proc.rb:48:in `call_in'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `each'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:88:in `execute_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:75:in `visit_scenario'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/executor.rb:65:in `visit_regular_scenario'
 ... 9 levels...
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/../lib/cucumber/cli.rb:13:in `execute'
from /Library/Ruby/Gems/1.8/gems/cucumber-0.1.16/bin/cucumber:6
from /usr/bin/cucumber:19:in `load'
from /usr/bin/cucumber:19
&lt;/code&gt;
&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-17T22:16:01+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-02-17T22:16:03+01:00</updated-at>
      <user-id type="integer">12071</user-id>
      <user-name>Mark Wilden</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I've been testing this on our cucumber_rails test project.

I've confirmed that this bug still exists in the latest cucumber (0.1.99.21) against rails 2.2.2.

The error we get on 'rake features' is:
@@@
/Users/joseph/Workspace/ruby/josephwilk/cucumber_rails/vendor/plugins/cucumber/bin/../lib/cucumber/core_ext/instance_exec.rb:29: cannot rollback - no transaction is active (SQLite3::SQLException)
@@@

Cuke uses http://eigenclass.org/hiki/bounded+space+instance_exec
There is a delightful comment about problems when using this with ActiveRecord - &quot;Love this, but when using with ActiveRecord I get some very weird side effects&quot;. Looking to see if this is at all relevant.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I've been testing this on our cucumber_rails test project.&lt;/p&gt;
&lt;p&gt;I've confirmed that this bug still exists in the latest cucumber
(0.1.99.21) against rails 2.2.2.&lt;/p&gt;
&lt;p&gt;The error we get on 'rake features' is:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
/Users/joseph/Workspace/ruby/josephwilk/cucumber_rails/vendor/plugins/cucumber/bin/../lib/cucumber/core_ext/instance_exec.rb:29: cannot rollback - no transaction is active (SQLite3::SQLException)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cuke uses &lt;a href=&quot;http://eigenclass.org/hiki/bounded+space+instance_exec&quot;&gt;http://eigenclass.org/hiki/bound...&lt;/a&gt;
There is a delightful comment about problems when using this with
ActiveRecord - &quot;Love this, but when using with ActiveRecord I get
some very weird side effects&quot;. Looking to see if this is at all
relevant.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-02-19T16:17:07+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-02-19T16:17:09+01:00</updated-at>
      <user-id type="integer">15301</user-id>
      <user-name>Joseph Wilk</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I also get this error, with the same sort of backtrace. I'm running the latest version.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I also get this error, with the same sort of backtrace. I'm
running the latest version.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-20T08:04:28+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-20T08:04:31+01:00</updated-at>
      <user-id type="integer">50219</user-id>
      <user-name>bolivares (at azavia)</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Can anyone confirm that this is a problem on 0.2.0 too?

If not, can you make a patch of the cucumber_rails project on Github that illustrates the bug?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Can anyone confirm that this is a problem on 0.2.0 too?&lt;/p&gt;
&lt;p&gt;If not, can you make a patch of the cucumber_rails project on
Github that illustrates the bug?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-20T14:34:35+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-20T14:34:41+01:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>It is still a problem in 0.2.0.

$ rake features
(in /home/Brandon/projects/project-name)
/usr/bin/ruby -I &quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/lib:lib&quot; &quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/cucumber&quot; --format pretty --require features/step_definitions/contact_steps.rb --require features/step_definitions/webrat_steps.rb --require features/support/env.rb --require features/support/paths.rb features/user-contacts-the-company.feature Feature ...
/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/../lib/cucumber/core_ext/instance_exec.rb:29: You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I &quot;/usr/lib/ruby/gems/1.8/g...]

(See full trace by running task with --trace)</body>
      <body-html>&lt;div&gt;&lt;p&gt;It is still a problem in 0.2.0.&lt;/p&gt;
&lt;p&gt;$ rake features (in /home/Brandon/projects/project-name)
/usr/bin/ruby -I
&quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/lib:lib&quot;
&quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/cucumber&quot;
--format pretty --require
features/step_definitions/contact_steps.rb --require
features/step_definitions/webrat_steps.rb --require
features/support/env.rb --require features/support/paths.rb
features/user-contacts-the-company.feature Feature ...
/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/../lib/cucumber/core_ext/instance_exec.rb:29:
You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array. The error occurred
while evaluating nil.- rake aborted! Command failed with status
(1): [/usr/bin/ruby -I &quot;/usr/lib/ruby/gems/1.8/g...]&lt;/p&gt;
&lt;p&gt;(See full trace by running task with --trace)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-20T16:09:39+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-20T16:09:39+01:00</updated-at>
      <user-id type="integer">50219</user-id>
      <user-name>bolivares (at azavia)</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Oops, formatted incorrectly. Let me try this again:

@@@
$ rake features
(in /home/Brandon/projects/project-name)
/usr/bin/ruby -I &quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/lib:lib&quot; &quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/cucumber&quot; --format pretty --require features/step_definitions/contact_steps.rb --require features/step_definitions/webrat_steps.rb --require features/support/env.rb --require features/support/paths.rb features/user-contacts-the-company.feature Feature ...
/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/../lib/cucumber/core_ext/instance_exec.rb:29: You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I &quot;/usr/lib/ruby/gems/1.8/g...]

(See full trace by running task with --trace)
@@@</body>
      <body-html>&lt;div&gt;&lt;p&gt;Oops, formatted incorrectly. Let me try this again:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
$ rake features
(in /home/Brandon/projects/project-name)
/usr/bin/ruby -I &amp;quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/lib:lib&amp;quot; &amp;quot;/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/cucumber&amp;quot; --format pretty --require features/step_definitions/contact_steps.rb --require features/step_definitions/webrat_steps.rb --require features/support/env.rb --require features/support/paths.rb features/user-contacts-the-company.feature Feature ...
/usr/lib/ruby/gems/1.8/gems/aslakhellesoy-cucumber-0.2.0/bin/../lib/cucumber/core_ext/instance_exec.rb:29: You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-
rake aborted!
Command failed with status (1): [/usr/bin/ruby -I &amp;quot;/usr/lib/ruby/gems/1.8/g...]

(See full trace by running task with --trace)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-20T16:15:31+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-20T16:15:32+01:00</updated-at>
      <user-id type="integer">50219</user-id>
      <user-name>bolivares (at azavia)</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I don't think there is much to do about this in Cucumber. This is all Rails weirdness. I have done a small change to World so that error messages are hopefully a little better.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I don't think there is much to do about this in Cucumber. This
is all Rails weirdness. I have done a small change to World so that
error messages are hopefully a little better.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-20T21:23:33+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>new</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-20T21:23:34+01:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>(from [0c999d29207c6eb4ee107e5230c89127eac575c6]) Better error message when config.cache_classes = true. [#165 state:open]
http://github.com/aslakhellesoy/cucumber/commit/0c999d29207c6eb4ee107e5230c89127eac575c6</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from [0c999d29207c6eb4ee107e5230c89127eac575c6]) Better error
message when config.cache_classes = true. [&lt;a href=&quot;/projects/16211/tickets/165&quot; title=&quot;Ticket #165&quot;&gt;#165&lt;/a&gt;
state:open] &lt;a href=&quot;http://github.com/aslakhellesoy/cucumber/commit/0c999d29207c6eb4ee107e5230c89127eac575c6&quot;&gt;
http://github.com/aslakhellesoy/...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-20T21:41:57+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:state: new
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-20T21:41:58+01:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I also tested against 0.2.0. With class caching on, all the features run fine. With class caching off, we fail like this:

@@@Feature: annotated changes to issue metadata
  As a user
  I want changes to issue metadata to be annotated as comments
  So that I can see how the issue has changed over time

  Scenario: I change an issue summary       # features/issues.feature:6
    Given an issue with summary &quot;foo&quot;       # features/step_definitions/issues.rb:1
    When I am logged in as an admin user    # features/step_definitions/common.rb:1
    And I edit the issue with summary &quot;foo&quot; # features/step_definitions/issues.rb:13
      edit_issue_url failed to generate from {:controller=&gt;&quot;issues&quot;, :protocol=&gt;&quot;https&quot;, :action=&gt;&quot;edit&quot;, :id=&gt;nil}, expected: {:controller=&gt;&quot;issues&quot;, :protocol=&gt;&quot;https&quot;, :action=&gt;&quot;edit&quot;}, diff: {:id=&gt;nil} (ActionController::RoutingError)
      (eval):16:in `edit_issue_path'
      ./features/step_definitions/issues.rb:14:in `/^I edit the issue with summary &quot;(.*)&quot;$/'
      features/issues.feature:9:in `And I edit the issue with summary &quot;foo&quot;'
    And I change the summary to &quot;bar&quot;       # features/step_definitions/issues.rb:17
    And I submit my changes to the issue    # features/issues.feature:11
    Then I should see &quot;Summary changed&quot;     # features/step_definitions/webrat_steps.rb:89
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.0/bin/../lib/cucumber/core_ext/instance_exec.rb:29: You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.-rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]

(See full trace by running task with --trace)
@@@

So these are not exactly the same problems I saw in past versions of Cucumber, but there are some problems nonetheless. Namely, spurious routing errors getting raised, and the &quot;nil object when you didn't expect it&quot; thing.

Unfortunately it's a little bit difficult to know where this all started. When I first started using Cucumber it worked, then at some point it stopped working and I don't know whether the breakage was due to a change in Rails or a change in Cucumber...

In any case, in the meantime, running with class caching on fixes everything.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I also tested against 0.2.0. With class caching on, all the
features run fine. With class caching off, we fail like this:&lt;/p&gt;
&lt;p&gt;@@@Feature: annotated changes to issue metadata As a user I want
changes to issue metadata to be annotated as comments So that I can
see how the issue has changed over time&lt;/p&gt;
&lt;p&gt;Scenario: I change an issue summary #
features/issues.feature:6&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;Given an issue with summary &quot;foo&quot;       # features/step_definitions/issues.rb:1
When I am logged in as an admin user    # features/step_definitions/common.rb:1
And I edit the issue with summary &quot;foo&quot; # features/step_definitions/issues.rb:13
  edit_issue_url failed to generate from {:controller=&amp;gt;&quot;issues&quot;, :protocol=&amp;gt;&quot;https&quot;, :action=&amp;gt;&quot;edit&quot;, :id=&amp;gt;nil}, expected: {:controller=&amp;gt;&quot;issues&quot;, :protocol=&amp;gt;&quot;https&quot;, :action=&amp;gt;&quot;edit&quot;}, diff: {:id=&amp;gt;nil} (ActionController::RoutingError)
  (eval):16:in `edit_issue_path'
  ./features/step_definitions/issues.rb:14:in `/^I edit the issue with summary &quot;(.*)&quot;$/'
  features/issues.feature:9:in `And I edit the issue with summary &quot;foo&quot;'
And I change the summary to &quot;bar&quot;       # features/step_definitions/issues.rb:17
And I submit my changes to the issue    # features/issues.feature:11
Then I should see &quot;Summary changed&quot;     # features/step_definitions/webrat_steps.rb:89
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;
/Library/Ruby/Gems/1.8/gems/cucumber-0.2.0/bin/../lib/cucumber/core_ext/instance_exec.rb:29:
You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array. The error occurred
while evaluating nil.-rake aborted! Command failed with status (1):
[/System/Library/Frameworks/Ruby.framework/...]&lt;/p&gt;
&lt;p&gt;(See full trace by running task with --trace)&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;

So these are not exactly the same problems I saw in past versions of Cucumber, but there are some problems nonetheless. Namely, spurious routing errors getting raised, and the &amp;quot;nil object when you didn't expect it&amp;quot; thing.

Unfortunately it's a little bit difficult to know where this all started. When I first started using Cucumber it worked, then at some point it stopped working and I don't know whether the breakage was due to a change in Rails or a change in Cucumber...

In any case, in the meantime, running with class caching on fixes everything.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-03-21T15:53:51+01:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-03-21T15:53:55+01:00</updated-at>
      <user-id type="integer">12845</user-id>
      <user-name>Wincent Colaiuta</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>This issue makes Cucumber incompatible with spec_server. spec_server requires config.cache_classes == false. Cucumber features can fail when config.cache_classes == true.

Anyone who has gotten used to running a spec in under a second with spec_server will recognize the importance of this problem. So far, my best idea is to set config.cache_classes based on an environment variable that's set based on whether specs or features are being run.</body>
      <body-html>&lt;div&gt;&lt;p&gt;This issue makes Cucumber incompatible with spec_server.
spec_server requires config.cache_classes == false. Cucumber
features can fail when config.cache_classes == true.&lt;/p&gt;
&lt;p&gt;Anyone who has gotten used to running a spec in under a second
with spec_server will recognize the importance of this problem. So
far, my best idea is to set config.cache_classes based on an
environment variable that's set based on whether specs or features
are being run.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-02T19:17:23+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-02T19:17:26+02:00</updated-at>
      <user-id type="integer">12071</user-id>
      <user-name>Mark Wilden</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>What if the Cucumber generator created a new cucumber environment and ran with that as default?</body>
      <body-html>&lt;div&gt;&lt;p&gt;What if the Cucumber generator created a new cucumber
environment and ran with that as default?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-02T19:36:14+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-02T19:36:18+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Since the value of `config.cache_classes` only matters to spec_server when it's loaded (not when specs are run), I am setting `RUNNING_SPEC_SERVER=1` before running `script/spec_server -d`, then unsetting it afterwards.

test.rb has `config.cache_classes = ENV['RUNNING_SPEC_SERVER'] != '1'`</body>
      <body-html>&lt;div&gt;&lt;p&gt;Since the value of &lt;code&gt;config.cache_classes&lt;/code&gt; only
matters to spec_server when it's loaded (not when specs are run), I
am setting &lt;code&gt;RUNNING_SPEC_SERVER=1&lt;/code&gt; before running
&lt;code&gt;script/spec_server -d&lt;/code&gt;, then unsetting it
afterwards.&lt;/p&gt;
&lt;p&gt;test.rb has &lt;code&gt;config.cache_classes =
ENV['RUNNING_SPEC_SERVER'] != '1'&lt;/code&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-02T20:12:58+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-02T20:13:03+02:00</updated-at>
      <user-id type="integer">12071</user-id>
      <user-name>Mark Wilden</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I'm putting this ticket on hold. This means it will only be reopened and prioritized if someone comments on it. Please read this first: http://www.nabble.com/-Cucumber--Spring-cleaning-td22928488.html</body>
      <body-html>&lt;div&gt;&lt;p&gt;I'm putting this ticket on hold. This means it will only be
reopened and prioritized if someone comments on it. Please read
this first: &lt;a href=&quot;http://www.nabble.com/-Cucumber--Spring-cleaning-td22928488.html&quot;&gt;http://www.nabble.com/-Cucumber-...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-04-07T16:00:07+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: bug
:state: open
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>hold</state>
      <tag nil="true"></tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-07T16:00:10+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Seems to be related to #284. Reopening.

My question again: Would a separate config/environments/cucumber.rb be an acceptable fix for this?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Seems to be related to &lt;a href=&quot;/projects/16211/tickets/284&quot; title=&quot;Ticket #284&quot;&gt;#284&lt;/a&gt;. Reopening.&lt;/p&gt;
&lt;p&gt;My question again: Would a separate
config/environments/cucumber.rb be an acceptable fix for this?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-19T22:51:51+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: 
:state: hold
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-19T22:51:54+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Here is a patch that will warn people about the bug when they try to use cache_classes=false with Cucumber's use_transactional_fixtures:

http://github.com/bmabey/cucumber/commit/e9ba91b94f91956d8c010deb45e334659d47e097</body>
      <body-html>&lt;div&gt;&lt;p&gt;Here is a patch that will warn people about the bug when they
try to use cache_classes=false with Cucumber's
use_transactional_fixtures:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/bmabey/cucumber/commit/e9ba91b94f91956d8c010deb45e334659d47e097&quot;&gt;
http://github.com/bmabey/cucumbe...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-20T03:24:48+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-20T03:24:53+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>The thought just occurred to me.. the reason why Cucumber blows up with classes reloading and RSpec doesn't is because RSpec relies on ActiveSupport::TestCase to do it's transactional fixtures.  My guess is that when Cucumber fires the After hooks the classes have already been reloaded.  Whereas with ActiveSupport::TestCase I'm sure the reloading of classes is timed well with the cleanup of fixtures.  So to fix this problem we will need to see if we can run the After hooks before the reloading of the classes.  Well.. assuming that my hypothesis is correct and that it is the root of the problem. :)  Anyways, I just wanted to make a note of it before I forgot. :)  I'll investigate it when I get some time, but if someone has some deeper insights into Rails' class reloading please share.</body>
      <body-html>&lt;div&gt;&lt;p&gt;The thought just occurred to me.. the reason why Cucumber blows
up with classes reloading and RSpec doesn't is because RSpec relies
on ActiveSupport::TestCase to do it's transactional fixtures. My
guess is that when Cucumber fires the After hooks the classes have
already been reloaded. Whereas with ActiveSupport::TestCase I'm
sure the reloading of classes is timed well with the cleanup of
fixtures. So to fix this problem we will need to see if we can run
the After hooks before the reloading of the classes. Well..
assuming that my hypothesis is correct and that it is the root of
the problem. :) Anyways, I just wanted to make a note of it before
I forgot. :) I'll investigate it when I get some time, but if
someone has some deeper insights into Rails' class reloading please
share.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-20T06:58:31+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-20T06:58:35+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I'm assigning this to you Ben - since you have started digging into the dark corners of Rails.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I'm assigning this to you Ben - since you have started digging
into the dark corners of Rails.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-04-26T19:12:20+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 1302
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-04-26T19:12:23+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I don't think there is a clean and easy way of getting rail's cache_classes to work well with Cucumber.

At Railsconf David and I added an IntegrationExampleGroup to RSpec and we found that rspec had similar issues with class reloading when using the integration session.  The issue seems to be with rails and it's integration session.. which according to wycats will be deprecated in favor of rack test sometime anyways.

There are a couple of workarounds we could do.  One of them is have the generator create a new environment file for features as Aslak suggested.  I think this is the best option and I vote we go with it.

Does anyone else have any other suggestions before I implement it?  Shall I call the new environment 'features' or 'cucumber'?  I was thinking 'features' but don't have a strong opinion either way.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I don't think there is a clean and easy way of getting rail's
cache_classes to work well with Cucumber.&lt;/p&gt;
&lt;p&gt;At Railsconf David and I added an IntegrationExampleGroup to
RSpec and we found that rspec had similar issues with class
reloading when using the integration session. The issue seems to be
with rails and it's integration session.. which according to wycats
will be deprecated in favor of rack test sometime anyways.&lt;/p&gt;
&lt;p&gt;There are a couple of workarounds we could do. One of them is
have the generator create a new environment file for features as
Aslak suggested. I think this is the best option and I vote we go
with it.&lt;/p&gt;
&lt;p&gt;Does anyone else have any other suggestions before I implement
it? Shall I call the new environment 'features' or 'cucumber'? I
was thinking 'features' but don't have a strong opinion either
way.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-20T00:59:11+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-20T00:59:15+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I think &quot;cucumber&quot; is better than &quot;features&quot;

(I'll add a ticket for renaming the rake tasks from &quot;features&quot; to
&quot;cucumber&quot; too...)</body>
      <body-html>&lt;div&gt;&lt;p&gt;I think &quot;cucumber&quot; is better than &quot;features&quot;&lt;/p&gt;
&lt;p&gt;(I'll add a ticket for renaming the rake tasks from &quot;features&quot;
to &quot;cucumber&quot; too...)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-20T01:01:03+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-20T01:01:04+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I started adding a cucumber environment file in the cucumber's rails generator.  However, I don't know how we should handle the database connection.  Rails will try to use the 'cucumber' database connection. I've tried setting the connection :test within the cucumber.rb file but wiht no luck.  I don't believe generators can modify arbitrary files (i.e. database.yml), or at least they shouldn't.

ATM, my best idea is to print instructions when the generator is ran telling the user they need to add a cucumber entry in database.yml.  Does that sound reasonable?</body>
      <body-html>&lt;div&gt;&lt;p&gt;I started adding a cucumber environment file in the cucumber's
rails generator. However, I don't know how we should handle the
database connection. Rails will try to use the 'cucumber' database
connection. I've tried setting the connection :test within the
cucumber.rb file but wiht no luck. I don't believe generators can
modify arbitrary files (i.e. database.yml), or at least they
shouldn't.&lt;/p&gt;
&lt;p&gt;ATM, my best idea is to print instructions when the generator is
ran telling the user they need to add a cucumber entry in
database.yml. Does that sound reasonable?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-20T06:28:57+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-20T06:28:58+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Actually, you can modify files with some m.gsub_file in rails
generators. For example, routes.rb is modified by a Rails generator.
We also modify paths.rb in the feature generator.

I think adding a cucumber sqlite3 entry is absolutely in order :-)</body>
      <body-html>&lt;div&gt;&lt;p&gt;Actually, you can modify files with some m.gsub_file in
rails&lt;br&gt;
generators. For example, routes.rb is modified by a Rails
generator.&lt;br&gt;
We also modify paths.rb in the feature generator.&lt;/p&gt;
&lt;p&gt;I think adding a cucumber sqlite3 entry is absolutely in order
:-)&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-20T08:50:57+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-20T08:50:58+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Thanks for the tip!

Patch:

http://github.com/bmabey/cucumber/commit/2220bd857349bbb4166106e017cdd25f4bede9bc

You will need to regenerate the manifest and gemspec file to include the new file.  When I tried I ran into this error:

&lt;pre&gt;
bmabey@BenzII:~/p/ruby/cucumber (master)$ rake manifest:refresh
(in /Users/bmabey/Programming/ruby/cucumber)
rm -r coverage
rm -r pkg
rm -r doc
rm -r doc
rm -r pkg
rm -r coverage
exclude entry missing from .hoerc. Aborting.
patch: **** Only garbage was found in the patch input.
&lt;/pre&gt;</body>
      <body-html>&lt;div&gt;&lt;p&gt;Thanks for the tip!&lt;/p&gt;
&lt;p&gt;Patch:&lt;/p&gt;
&lt;p&gt;&lt;a href=
&quot;http://github.com/bmabey/cucumber/commit/2220bd857349bbb4166106e017cdd25f4bede9bc&quot;&gt;
http://github.com/bmabey/cucumber/commit/2220bd857349bbb4166106e017...&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You will need to regenerate the manifest and gemspec file to
include the new file. When I tried I ran into this error:&lt;/p&gt;
&lt;pre&gt;
bmabey@BenzII:~/p/ruby/cucumber (master)$ rake manifest:refresh
(in /Users/bmabey/Programming/ruby/cucumber)
rm -r coverage
rm -r pkg
rm -r doc
rm -r doc
rm -r pkg
rm -r coverage
exclude entry missing from .hoerc. Aborting.
patch: **** Only garbage was found in the patch input.
&lt;/pre&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-21T06:23:27+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-21T06:23:32+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Oh, and to test this in cucumber_rails you will need this commit:

http://github.com/bmabey/cucumber_rails/commit/684ca8b9aa9122f172e49813c0b47c46b9339e6d</body>
      <body-html>&lt;div&gt;&lt;p&gt;Oh, and to test this in cucumber_rails you will need this
commit:&lt;/p&gt;
&lt;p&gt;&lt;a href=
&quot;http://github.com/bmabey/cucumber_rails/commit/684ca8b9aa9122f172e49813c0b47c46b9339e6d&quot;&gt;
http://github.com/bmabey/cucumber_rails/commit/684ca8b9aa9122f172e4...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-21T06:41:13+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-21T06:41:17+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Regarding the Hoe error: no idea.

I can see one problem with introducing a new environment:

@@@
# cucumber.rake
task :features =&gt; 'db:test:prepare'
@@@

This is there so that the test database is always set up before cucumber runs. With a new cucumber environment, preparing the test database has no effect. It would be nice if we could just change this to:

@@@
# cucumber.rake
task :features =&gt; 'db:cucumber:prepare'
@@@

But unfortunately that's not possible - Rails hardcodes :test in their tasks :-/

So until there is a way around that (patching rails?) people have to remember to explicitly migrate their cucumber database before running features with rake.

Don't you think a lot of people are going to forget this and run down the ML with questions?</body>
      <body-html>&lt;div&gt;&lt;p&gt;Regarding the Hoe error: no idea.&lt;/p&gt;
&lt;p&gt;I can see one problem with introducing a new environment:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;# cucumber.rake
task :features =&amp;gt; 'db:test:prepare'&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This is there so that the test database is always set up before
cucumber runs. With a new cucumber environment, preparing the test
database has no effect. It would be nice if we could just change
this to:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;# cucumber.rake
task :features =&amp;gt; 'db:cucumber:prepare'&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;But unfortunately that's not possible - Rails hardcodes :test in
their tasks :-/&lt;/p&gt;
&lt;p&gt;So until there is a way around that (patching rails?) people
have to remember to explicitly migrate their cucumber database
before running features with rake.&lt;/p&gt;
&lt;p&gt;Don't you think a lot of people are going to forget this and run
down the ML with questions?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-22T11:49:55+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-22T11:49:58+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I do see a barrage of complaints on the ML... here are some ideas...

We could add our own db:cucumber:prepapre task.  

Or, we could use the test database in the cucumber environment.  That would ensure the DB is cleaned. When people want to switch to a new DB they would have to work out how they want to handle the DB prepare tasks.  To get the Cucumber env to use the test env DB I would just alias the test database yml block and use it in cucumber (i.e. test: &amp;TEST).


I vote for just using the test DB until a better solution (i.e. Rails doesn't hardcode test) is presented.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I do see a barrage of complaints on the ML... here are some
ideas...&lt;/p&gt;
&lt;p&gt;We could add our own db:cucumber:prepapre task.&lt;br&gt;&lt;/p&gt;
&lt;p&gt;Or, we could use the test database in the cucumber environment.
That would ensure the DB is cleaned. When people want to switch to
a new DB they would have to work out how they want to handle the DB
prepare tasks. To get the Cucumber env to use the test env DB I
would just alias the test database yml block and use it in cucumber
(i.e. test: &amp;amp;TEST).&lt;/p&gt;
&lt;p&gt;I vote for just using the test DB until a better solution (i.e.
Rails doesn't hardcode test) is presented.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-22T16:38:24+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-22T16:38:29+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>Per convo in IRC we went with using the test DB idea.  Pull when you get a chance.</body>
      <body-html>&lt;div&gt;&lt;p&gt;Per convo in IRC we went with using the test DB idea. Pull when
you get a chance.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">false</closed>
      <created-at type="datetime">2009-05-22T17:00:57+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>open</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-22T17:01:03+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>(from [2220bd857349bbb4166106e017cdd25f4bede9bc]) rails generator now generates a cucumber env to avoid potential
cache_classes conflicts in test.rb [#165 state:resolved]
http://github.com/aslakhellesoy/cucumber/commit/2220bd857349bbb4166106e017cdd25f4bede9bc</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/16211/changesets/2220bd857349bbb4166106e017cdd25f4bede9bc&quot;
title=
&quot;Changeset [2220bd857349bbb4166106e017cdd25f4bede9bc]&quot;&gt;[2220bd857349bbb4166106e017cdd25f4bede9bc]&lt;/a&gt;)
rails generator now generates a cucumber env to avoid potential
cache_classes conflicts in test.rb [&lt;a href=
&quot;/projects/16211/tickets/165&quot; title=&quot;Ticket #165&quot;&gt;#165&lt;/a&gt;
state:resolved]&lt;br&gt;
&lt;a href=
&quot;http://github.com/aslakhellesoy/cucumber/commit/2220bd857349bbb4166106e017cdd25f4bede9bc&quot;&gt;
http://github.com/aslakhellesoy/cucumber/commit/2220bd857349bbb4166...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-22T20:19:39+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:state: open
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>resolved</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-22T20:19:40+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">9748</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>(from [01d163dad1042cfb8370146c3408c9e3b9cfbdfb]) Rails generator creates a cucumber environment file to avoid potential cache_classes conflicts in test.rb [#165 state:resolved]
http://github.com/aslakhellesoy/cucumber/commit/01d163dad1042cfb8370146c3408c9e3b9cfbdfb</body>
      <body-html>&lt;div&gt;&lt;p&gt;(from &lt;a href=
&quot;/projects/16211/changesets/01d163dad1042cfb8370146c3408c9e3b9cfbdfb&quot;
title=
&quot;Changeset [01d163dad1042cfb8370146c3408c9e3b9cfbdfb]&quot;&gt;[01d163dad1042cfb8370146c3408c9e3b9cfbdfb]&lt;/a&gt;)
Rails generator creates a cucumber environment file to avoid
potential cache_classes conflicts in test.rb [&lt;a href=
&quot;/projects/16211/tickets/165&quot; title=&quot;Ticket #165&quot;&gt;#165&lt;/a&gt;
state:resolved] &lt;a href=
&quot;http://github.com/aslakhellesoy/cucumber/commit/01d163dad1042cfb8370146c3408c9e3b9cfbdfb&quot;&gt;
http://github.com/aslakhellesoy/cucumber/commit/01d163dad1042cfb837...&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-05-22T20:19:40+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>resolved</state>
      <tag>bug rails rollback transaction world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-05-22T20:19:41+02:00</updated-at>
      <user-id type="integer">1302</user-id>
      <user-name>Aslak Helles&#248;y</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Ben Mabey</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer" nil="true"></assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I had the same problem, so I read through all of this only to finally realize that my database table did not support transactions :-( Some of my tables were of type MyISAM (which don't support transactions) while others were InnoDB. All I had to to was change the table type from MyISAM to InnoDB and now it all works!

I wanted to mention this, since undoubtedly others will find themselves in the same jam.</body>
      <body-html>&lt;div&gt;&lt;p&gt;I had the same problem, so I read through all of this only to
finally realize that my database table did not support transactions
:-( Some of my tables were of type MyISAM (which don't support
transactions) while others were InnoDB. All I had to to was change
the table type from MyISAM to InnoDB and now it all works!&lt;/p&gt;
&lt;p&gt;I wanted to mention this, since undoubtedly others will find
themselves in the same jam.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-09T07:38:32+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:tag: bug rails rollback transaction world
:assigned_user: 9748
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>resolved</state>
      <tag>bug database innodb myisam rails rollback table transaction type world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-07-09T07:38:37+02:00</updated-at>
      <user-id type="integer">62273</user-id>
      <user-name>Eivind Hagen</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name nil="true"></assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>I've read through all the comments here and would like to know if that now resolves the message I got when I started up spork for cucumber:

@@@
$ spork cuc
Using Cucumber
Preloading Rails environment
Loading Spork.prefork block...
WARNING: You have set Rails' config.cache_classes to false (most likely in config/environments/test.rb).  This setting is known to break Cucumber's use_transactional_fixtures method. Set config.cache_classes to true if you want to use transactional fixtures.  For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165.
Spork is ready and listening on 8990!
@@@

Is this message now not relevant?  (And shouldn't it be removed?)  Also, I had cache_classes set to false because it was causing issues with spec_server, will things work correctly if I set it to true and am using spork?</body>
      <body-html>&lt;div&gt;&lt;p&gt;I've read through all the comments here and would like to know
if that now resolves the message I got when I started up spork for
cucumber:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;$ spork cuc
Using Cucumber
Preloading Rails environment
Loading Spork.prefork block...
WARNING: You have set Rails' config.cache_classes to false (most likely in config/environments/test.rb).  This setting is known to break Cucumber's use_transactional_fixtures method. Set config.cache_classes to true if you want to use transactional fixtures.  For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165.
Spork is ready and listening on 8990!&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Is this message now not relevant? (And shouldn't it be removed?)
Also, I had cache_classes set to false because it was causing
issues with spec_server, will things work correctly if I set it to
true and am using spork?&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-23T07:01:34+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- 
:assigned_user: 
</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>resolved</state>
      <tag>bug database innodb myisam rails rollback table transaction type world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-07-23T07:01:37+02:00</updated-at>
      <user-id type="integer">63715</user-id>
      <user-name>nbenes</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>spec_server needed config.cache_classes to be false.  However it messes up Cucumber's ability to rollback transactions.  I don't think that spork alleviates this problem, and it certainly would still be a problem when running Cucumber without spork so the message is still relevant IMO.  The cucumber rails generator now sets up another rails environment file for this reason in case you want to not cache your classes with your other tests.</body>
      <body-html>&lt;div&gt;&lt;p&gt;spec_server needed config.cache_classes to be false. However it
messes up Cucumber's ability to rollback transactions. I don't
think that spork alleviates this problem, and it certainly would
still be a problem when running Cucumber without spork so the
message is still relevant IMO. The cucumber rails generator now
sets up another rails environment file for this reason in case you
want to not cache your classes with your other tests.&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-07-23T07:13:40+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>resolved</state>
      <tag>bug database innodb myisam rails rollback table transaction type world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-07-23T07:13:46+02:00</updated-at>
      <user-id type="integer">9748</user-id>
      <user-name>Ben Mabey</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
    <version type="Ticket::Version">
      <assigned-user-id type="integer">1302</assigned-user-id>
      <attachments-count type="integer">0</attachments-count>
      <body>To throw fuel on the fire, yaml-linking the configurations for `test` and `cucumber` in the database config file breaks the standard rake tasks `rake db:create:all` and `rake db:drop:all` - with the error &quot;Database example_test doesn't exist&quot; this exists in such a way that chained rake tasks fail, and you can't continue.

@@@
 $ rake db:drop:all db:create:all db:migrate db:test:clone features spec
  Database example_test doesn't exist
@@@

At that point execution stops. :(</body>
      <body-html>&lt;div&gt;&lt;p&gt;To throw fuel on the fire, yaml-linking the configurations for
&lt;code&gt;test&lt;/code&gt; and &lt;code&gt;cucumber&lt;/code&gt; in the database config
file breaks the standard rake tasks &lt;code&gt;rake db:create:all&lt;/code&gt;
and &lt;code&gt;rake db:drop:all&lt;/code&gt; - with the error &quot;Database
example_test doesn't exist&quot; this exists in such a way that chained
rake tasks fail, and you can't continue.&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt; $ rake db:drop:all db:create:all db:migrate db:test:clone features spec
  Database example_test doesn't exist&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;At that point execution stops. :(&lt;/p&gt;&lt;/div&gt;</body-html>
      <closed type="boolean">true</closed>
      <created-at type="datetime">2009-08-04T15:35:08+02:00</created-at>
      <creator-id type="integer">12071</creator-id>
      <diffable-attributes type="yaml">--- {}

</diffable-attributes>
      <milestone-id type="integer" nil="true"></milestone-id>
      <number type="integer">165</number>
      <permalink>error-when-not-caching-classes</permalink>
      <priority type="integer">0</priority>
      <project-id type="integer">16211</project-id>
      <state>resolved</state>
      <tag>bug database innodb myisam rails rollback table transaction type world</tag>
      <title>Error when not caching classes</title>
      <updated-at type="datetime">2009-08-04T15:35:15+02:00</updated-at>
      <user-id type="integer">1379</user-id>
      <user-name>Lee Hambley</user-name>
      <creator-name>Mark Wilden</creator-name>
      <assigned-user-name>Aslak Helles&#248;y</assigned-user-name>
      <url>http://rspec.lighthouseapp.com/projects/16211/tickets/165</url>
    </version>
  </versions>
</ticket>
