mpd
(mpd)
July 20, 2009, 10:36pm
1
hello,
The recent update to 2.3.3 is breaking my entire suite with the same
error. I guess something in the load order changed?
e.g.:
Fixture::FormatError in 'PublishedGallery Methods#thumbnail should
delegate to its lead asset'
a YAML error occurred parsing /Users/mpd/timber/spec/fixtures/
galleries.yml. Please note that YAML must be consistently indented
using spaces. Tabs are not allowed. Please have a look at
http://www.yaml.org/faq.html
The exact error was:
NoMethodError: undefined method `abstract_class?' for Object:Class
The YAML error is a red herring. Every spec failure mentions the same
error, but the fixture files are all fine. This is happening with both
rspec 1.2.7 and 1.2.8.
Switching RAILS_GEM_VERSION back to 2.3.2 in environment.rb
immediately re-greens the entire suite with no other changes (in both
above-mentioned versions of rspec,) and running in dev mode seems to
be ok, so I'm guessing it's just something with my test env setup.
However I get no stack trace output or anything for the failures,
other than a message similar to the above. I'm hitting a wall here.
Any ideas?
thanks.
mpd
(mpd)
July 20, 2009, 11:42pm
2
Captured a backtrace for this:
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:745:in `parse_yaml_string'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:697:in `read_yaml_fixture_files'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:684:in `read_fixture_files'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:545:in `initialize'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:505:in `new'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:505:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:504:in `map'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:504:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
connection_adapters/mysql_adapter.rb:264:in
`disable_referential_integrity'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:501:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
base.rb:1448:in `silence'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:500:in `create_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:961:in `load_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.3/lib/active_record/
fixtures.rb:926:in `setup_fixtures'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:178:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:178:in `evaluate_method'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:166:in `call'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:90:in `run'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:90:in `each'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:90:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:90:in `run'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/
active_support/callbacks.rb:276:in `run_callbacks'
/opt/local/lib/ruby/gems/1.8/gems/rspec-rails-1.2.7.1/lib/spec/rails/
interop/testcase.rb:7:
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:70:in `instance_eval'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:70:in `eval_each_fail_fast'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:70:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:70:in `eval_each_fail_fast'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_group_hierarchy.rb:17:in `run_before_each'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:103:in `run_before_each'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:124:in `before_each_example'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:39:in `execute'
/opt/local/lib/ruby/1.8/timeout.rb:53:in `timeout'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_methods.rb:37:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_group_methods.rb:207:in `run_examples'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_group_methods.rb:205:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_group_methods.rb:205:in `run_examples'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/example/
example_group_methods.rb:103:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:23:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:22:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:22:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/
options.rb:127:in `run_examples'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/lib/spec/runner/
command_line.rb:9:in `run'
/opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.8/bin/spec:4:
/opt/local/bin/spec:19:in `load'
/opt/local/bin/spec:19:
the trace is the same on every failure.
mpd
(mpd)
July 21, 2009, 11:56pm
3
No takers. Bummer.
Is there anywhere else I could go with this question? IRC was no help,
and there's no answer from the rspec list either.
I'd really like to solve this problem. It's holding up development.
thanks.
Con
(Con)
July 22, 2009, 12:17am
4
Hi, are you sure that all the gems and plugins that you’re using within
your Rails application supported with 2.3.3? Did you include any fixes
in 2.3.2 that were fixed by 2.3.3. Next, can you produce a minimum set
of files to reproduce the issue? If so, I would recommend posting a
bug report here:
https://rails.lighthouseapp.com/projects/8994-ruby-on-rails
Good look,
-Conrad
mpd
(mpd)
July 22, 2009, 7:31pm
5
Thank you for responding. I can't come up with minimum set of files to
reproduce
without giving out code that I don't have license to give out,
unfortunately.
I've dug further into this, and the failure seems to be from ERB:
code fragment at http://pastie.org/555427
erb_render is returning an empty string when running tests in 2.3.3,
while it returns
the expected rendered ERB text in 2.3.2.
My code base does not monkeypatch ERB in any way, nor do any of the
plugins.
None of that code changed within Rails between 2.3.2 and 2.3.3 anyway.
ERB does render correctly when tested via script/console in 2.3.3
I'm happy to file a bug report, but this is far more likely a problem
with my configuration, rather than a Rails bug.
I just don't know what it could be.
thanks again.