I have the latest version of rspec and rails-rspec installed. I’m using
the debian versions of ruby and rails. On a new project after a
generate an “rspec_model” and then try to run “rake spec”, I get the
following error:
dan@dan-server:~/projects/cw/registration$ rake spec
(in /home/dan/projects/cw/registration)
/home/dan/projects/cw/registration/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/action_controller/rescue.rb:19:
undefined method `alias_method_chai\n’ for \
ActionController::Rescue:Module (NoMethodError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`require’
from
/home/dan/projects/cw/registration/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:147:in
`require\
’
from
/home/dan/projects/cw/registration/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb:6
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
`require’
from
/home/dan/projects/cw/registration/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active_support/dependencies.rb:147:in
`require\
’
from
/home/dan/projects/cw/registration/config/…/vendor/plugins/rspec_on_rails/lib/spec/rails.rb:17
... 22 levels...
from
/home/dan/projects/cw/registration/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:155:in
parse' from /home/dan/projects/cw/registration/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:88:in
create_behaviour_runner’
from
/home/dan/projects/cw/registration/vendor/plugins/rspec/lib/spec/runner/command_line.rb:14:in
`run’
from
/home/dan/projects/cw/registration/vendor/plugins/rspec/bin/spec:3rake
aborted!
Command ruby
-I"/home/dan/projects/cw/registration/vendor/plugins/rspec/lib"
“/home/dan/projects/cw/registration/vendor/plugins/rspec/bin/spec”
"spec/\
models/user_spec.rb" --options
“/home/dan/projects/cw/registration/config/…/spec/spec.opts” failed
(See full trace by running task with --trace)
Any suggestions on how to get around this?
–dan