`const_missing': uninitialized constant Spec::Rails

Hi!

I’m experiencing such error while running simple model rspec just to
make sure everything is working.

$ script/spec spec/models/site_user_spec.rb
/var/lib/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
const_missing': uninitialized constant Spec::Rails (NameError) from /home/dv/www/ob/config/../vendor/plugins/rspec_on_rails/lib/spec/rails/extensions/spec/example/configuration.rb:14 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
require' from /var/lib/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:inrequire’
from
/home/dv/www/ob/config/…/vendor/plugins/rspec_on_rails/lib/spec/rails/extensions.rb:5
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:inrequire’
from
/var/lib/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
require' ... 11 levels... from /home/dv/www/ob/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:13:inload_files’
from
/home/dv/www/ob/vendor/plugins/rspec/lib/spec/runner/options.rb:85:in
run_examples' from /home/dv/www/ob/vendor/plugins/rspec/lib/spec/runner/command_line.rb:19:inrun’
from script/spec:4

ruby/rails/rspec versions:
Rails 1.1.2
ruby 1.8.5 (2006-08-25) [i486-linux]
RSpec-1.1.3 (build 20080309210001)

Have anyone had similar problem? What is by experience the most
suiteable version of rspec framework for rails 1.1.2? Thanks!

Dmitry.

Dmitry Vanidovsky wrote:

Have anyone had similar problem? What is by experience the most
suiteable version of rspec framework for rails 1.1.2? Thanks!

It appeared rspec/rspec_on_rails version 1.0.8 runs without errors for
env described obove. (used svn co for dovnloading rspec/rspec_on_rails)
Hope this saves someone time.

Dmitry Vanidovsky wrote:

Dmitry Vanidovsky wrote:

Have anyone had similar problem? What is by experience the most
suiteable version of rspec framework for rails 1.1.2? Thanks!

It appeared rspec/rspec_on_rails version 1.0.8 runs without errors for
env described obove. (used svn co for dovnloading rspec/rspec_on_rails)
Hope this saves someone time.

Hello,

I was stuck at with the same problem and I could get it solved from
here

http://rubyforge.org/pipermail/rspec-devel/2007-September/004032.html
or
http://www.nabble.com/Rspec-problem-in-testing-RoR-application-td14950031.html

Take a look, It will surely help.

Nidhi Raval

Hello,

In addition, I get some other errors and couldn’t get the spec run. So
finally I found that it was a compatibility issue of RSpec_1.0.8 and I
have to use trunck for Rspec and Rspec_on_rails instead using plugin.

http://www.ruby-forum.com/topic/129741

link to it,
http://rspec.rubyforge.org/documentation/rails/install.html

Nidhi Raval
Software Engineer

sales(AT)railshouse(DOT)com