Fresh rspec on rails install blows up

Hi there,

I installed the rspec on rails plugin for a new project today and guess
what – it blows up!

All by other rspec on rails projects are working fine.

I updated all gems & still no joy. Any ideas how I can troubleshoot this
one ?

Here’s my setup:

  • ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0]
  • Rails 1.2.5

Installed with svn:
ruby script/plugin install
svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec

ruby script/plugin install
svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails

ruby script/generate rspec

[Created a model]

Here’s the error:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:404:in
to_constant_name': Anonymous modules have no name to be referenced by (ArgumentError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:214:inqualified_name_for’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:476:in
const_missing' from /Users/kmcd/work/banknote/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb:7:inreset’
from
/Users/kmcd/work/banknote/vendor/plugins/rspec/lib/spec/example/example_group_factory.rb:59
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:inrequire’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in
new_constants_in' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:inrequire’
… 47 levels…
from
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/behaviour_runner.rb:19:in
run' from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/command_line.rb:17:inrun’
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/bin/spec:3
from /usr/local/bin/spec:16

Regards,

Keith

On Dec 11, 2007 4:49 PM, Keith McDonnell [email protected] wrote:

Hi there,

I installed the rspec on rails plugin for a new project today and guess
what – it blows up!

Guess what - when RSpec 1.0.8 was released (August 12 2007), the
latest release of RoR was 1.2.3 (March 13 2007).

Can you try one of these:

  • Downgrade to RoR 1.2.3
  • Upgrade to RSpec trunk

Aslak

On Dec 11, 2007 9:49 AM, Keith McDonnell [email protected] wrote:

Here’s my setup:

/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:214:in
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in require' from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/behaviour_runner.rb:19:in run’
from
/usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/lib/spec/runner/command_line.rb:17:in
`run’
from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.0.8/bin/spec:3
from /usr/local/bin/spec:16

Looks like it’s using your installed gem instead of the rspec
installed in your plugins directory. Don’t know why that is (it should
check to see if the plugin is there first).

Try uninstalling the gem and see if you still have the problem.

For your info,

CURRENT means RSpec version 1.0.8.

Try one of Aslak’s solution for fixing this.

HTH,

Stefan

2007/12/11, Keith McDonnell [email protected]: