Chandu80
2011-Sep-22 12:35 UTC
[rspec-users] uninitialized constant Spec::Rails (NameError) when running spec command
I get the following error when trying to run a spec command on a model test. The command is :- C:\Rspec Test\spec\models>spec bank_account_spec.rb The error is :- c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/lib/spec/rails/ matchers/ ar_be_valid.rb:2: uninitialized constant Spec::Rails (NameError) from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec- rails-1.3.0/lib/spec/ra ils/matchers/ar_be_valid.rb:31:in require'' from c:/jruby-1.5.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 31 :inrequire'' from C:/Rspec Test/vendor/rails/activesupport/lib/ active_support/depende ncies.rb:158:in require'' from c:/jruby-1.5.0/ lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/lib/spec/ra ils/matchers.rb:2 from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/lib/spec/ ra ils/matchers.rb:31:inrequire'' from c:/jruby-1.5.0/lib/ruby/ site_ruby/1.8/rubygems/custom_require.rb:31 :in require'' from C:/Rspec Test/vendor/rails/activesupport/lib/active_support/depende ncies.rb: 158:inrequire'' from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec- rails-1.3.0/lib/spec/ra ils.rb:15 ... 13 levels... from C:/jruby-1.5.0/ lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:5 from C:/jruby-1.5.0/lib/ ruby/gems/1.8/gems/rspec-1.3.0/bin/spec:22:in `l oad'' from c:/ jruby-1.5.0/bin/spec:22 I actually tried changing version to 1.3.0 in the C:\jruby-1.5.0\bin \spec file but it results in the same error. Please advice. Regards Chandrika
David Chelimsky
2011-Sep-22 22:32 UTC
[rspec-users] uninitialized constant Spec::Rails (NameError) when running spec command
On Sep 22, 2011, at 2:35 PM, Chandu80 wrote:> I get the following error when trying to run a spec command on a model > test. > > The command is :- C:\Rspec Test\spec\models>spec bank_account_spec.rbThe rspec command is designed to be run from the project root. Try: C:\Rspec Test>spec spec\models\spec bank_account_spec.rb
Chandu80
2011-Sep-23 05:41 UTC
[rspec-users] uninitialized constant Spec::Rails (NameError) when running spec command
Hi David, Tried from the root directory,gives the same error. C:/Rspec Test 1/rspec_demo/vendor/rails/activesupport/lib/ active_support/depende ncies.rb:443:in `load_missing_constant'': uninitialized constant Spec::Rails (Nam eError) from C:/Rspec Test 1/rspec_demo/vendor/rails/activesupport/lib/ active_su pport/dependencies.rb:80:in `const_missing_with_dependencies'' from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ lib/spec/ra ils/matchers/ar_be_valid.rb:2 from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ lib/spec/ra ils/matchers/ar_be_valid.rb:31:in `require'' from c:/jruby-1.5.0/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31 :in `require'' from C:/Rspec Test 1/rspec_demo/vendor/rails/activesupport/lib/ active_su pport/dependencies.rb:158:in `require'' from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ lib/spec/ra ils/matchers.rb:2 from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ lib/spec/ra ils/matchers.rb:31:in `require'' from c:/jruby-1.5.0/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:31 :in `require'' ... 15 levels... from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/ spec:5 from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/ spec:21:in `l oad'' from c:/jruby-1.5.0/bin/spec:21 Regards Chandrika On Sep 23, 3:32?am, David Chelimsky <dchelim... at gmail.com> wrote:> On Sep 22, 2011, at 2:35 PM, Chandu80 wrote: > > > I get the following error when trying to run a spec command on a model > > test. > > > The command is :- C:\Rspec Test\spec\models>spec bank_account_spec.rb > > The rspec command is designed to be run from the project root. Try: > > C:\Rspec Test>spec spec\models\spec bank_account_spec.rb > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users
Chandu80
2011-Sep-27 11:04 UTC
[rspec-users] uninitialized constant Spec::Rails (NameError) when running spec command
Hello All, Is there any way to fix the error? Regards Chandrika On Sep 23, 10:41?am, Chandu80 <chandu.she... at gmail.com> wrote:> Hi David, > Tried from the root directory,gives the same error. > > C:/Rspec Test 1/rspec_demo/vendor/rails/activesupport/lib/ > active_support/depende > ncies.rb:443:in `load_missing_constant'': uninitialized constant > Spec::Rails (Nam > eError) > ? ? ? ? from C:/Rspec Test 1/rspec_demo/vendor/rails/activesupport/lib/ > active_su > pport/dependencies.rb:80:in `const_missing_with_dependencies'' > ? ? ? ? from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ > lib/spec/ra > ils/matchers/ar_be_valid.rb:2 > ? ? ? ? from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ > lib/spec/ra > ils/matchers/ar_be_valid.rb:31:in `require'' > ? ? ? ? from c:/jruby-1.5.0/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:31 > :in `require'' > ? ? ? ? from C:/Rspec Test 1/rspec_demo/vendor/rails/activesupport/lib/ > active_su > pport/dependencies.rb:158:in `require'' > ? ? ? ? from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ > lib/spec/ra > ils/matchers.rb:2 > ? ? ? ? from c:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-rails-1.3.0/ > lib/spec/ra > ils/matchers.rb:31:in `require'' > ? ? ? ? from c:/jruby-1.5.0/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:31 > :in `require'' > ? ? ? ? ?... 15 levels... > ? ? ? ? from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/ > spec:5 > ? ? ? ? from C:/jruby-1.5.0/lib/ruby/gems/1.8/gems/rspec-1.3.0/bin/ > spec:21:in `l > oad'' > ? ? ? ? from c:/jruby-1.5.0/bin/spec:21 > > Regards > Chandrika > > On Sep 23, 3:32?am, David Chelimsky <dchelim... at gmail.com> wrote:> On Sep 22, 2011, at 2:35 PM, Chandu80 wrote: > > > > I get the following error when trying to run a spec command on a model > > > test. > > > > The command is :- C:\Rspec Test\spec\models>spec bank_account_spec.rb > > > The rspec command is designed to be run from the project root. Try: > > > C:\Rspec Test>spec spec\models\spec bank_account_spec.rb > > _______________________________________________ > > rspec-users mailing list > > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-us... at rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users