#395 new
danielh

edge rails problem and fix

Reported by danielh | April 28th, 2008 @ 10:41 PM | in No-Milestone-Assigned

I was encountering errors trying to run "rake spec" in edge rails, and was able to elminate the errors by changing rspec-rails/lib/spec/rails/rails.rb so that lines 11-14 read

require 'spec/rails/matchers'

require 'spec/rails/example'

require 'spec/rails/extensions'

require 'spec/rails/version'

Comments and changes to this ticket

  • David Chelimsky

    David Chelimsky April 29th, 2008 @ 07:50 AM

    What errors? Are you still getting them?

  • David Chelimsky

    David Chelimsky April 29th, 2008 @ 07:51 AM

    • → Assigned user changed from “” to “David Chelimsky”
  • danielh

    danielh April 29th, 2008 @ 12:38 PM

    At first I was getting

    /Users/daniel/web_sites/dp2/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:376:in `new_constants_in': undefined method `empty?' for nil:NilClass (NoMethodError)
    	from /Users/daniel/web_sites/dp2/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:202:in `load_file'
    	from /Users/daniel/web_sites/dp2/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:94:in `require_or_load'
    	from /Users/daniel/web_sites/dp2/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:248:in `load_missing_constant'
    	from /Users/daniel/web_sites/dp2/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in `const_missing_not_from_s3_library'
    	from /usr/local/lib/ruby/gems/1.8/gems/aws-s3-0.4.0/lib/aws/s3/extensions.rb:173:in `const_missing'
    	from /Users/daniel/web_sites/dp2/vendor/plugins/rspec-rails/lib/spec/rails/extensions/spec/example/configuration.rb:14
    	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    	from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    	 ... 21 levels...
    	from /Users/daniel/web_sites/dp2/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:13:in `load_files'
    	from /Users/daniel/web_sites/dp2/vendor/plugins/rspec/lib/spec/runner/options.rb:86:in `run_examples'
    	from /Users/daniel/web_sites/dp2/vendor/plugins/rspec/lib/spec/runner/command_line.rb:19:in `run'
    	from /Users/daniel/web_sites/dp2/vendor/plugins/rspec/bin/spec:4
    

    If you look at rails/activesupport/lib/active_support/dependencies.rb:376 this is actually a pretty strange error (to me anyway). It's strange that the "watch_frames" variable would be nil.

    Anyway, apparently this error is happening because rspec-rails/lib/spec/rails/extensions/spec/example/configuration.rb:14 refers to ::Spec::Rails::Example::RailsExampleGroup , which hasn't been defined yet because the file where it's defined (spec/rails/example) hasn't been required yet.

    I get the same error if I try to require spec/rails/example before spec/rails/matchers

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins

People watching this ticket

Tags