On Thu, November 22, 2007 17:42, David Chelimsky wrote: model product. When I run rake >> spec:models I get the same error. > > Did you run this? > > ruby script/generate rspec > > Here's the order of things: > > rails pragdepot > cd pragdepot > ruby script/plugin install http://rspec.rubyforge.org/svn/trunk/rspec > ruby script/plugin install > http://rspec.rubyforge.org/svn/trunk/rspec_on_rails > ruby script/generate rspec > ruby script/generate rspec_model product > rake db:migrate > rake spec:models > > The db creation should happen some time before running rake db:migrate. >
I installed the rspec and rspec_on_rails plugins from this url and I now get an error in script/generate rspec_models that was not present in the version that I installed them via svn from the trunk. The error is: $ rake spec:models --trace (in /home/byrnejb/Software/Development/Projects/rspectest) ** Invoke spec:models (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke db:test:clone (first_time) ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump ** Invoke db:test:purge (first_time) ** Invoke environment ** Execute db:test:purge ** Execute db:test:clone ** Invoke db:schema:load (first_time) ** Invoke environment ** Execute db:schema:load NOTICE: CREATE TABLE will create implicit sequence "movements_id_seq" for serial column "movements.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "movements_pkey" for table "movements" NOTICE: CREATE TABLE will create implicit sequence "products_id_seq" for serial column "products.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "products_pkey" for table "products" ** Execute spec:models /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/lib/spec/version.rb:10: undefined method `[]' for nil:NilClass (NoMethodError) from /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/lib/spec.rb:1:in `require' from /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/lib/spec.rb:1 from /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/bin/spec:2:in `require' from /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/bin/spec:2 rake aborted! Command ruby -I"/home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/lib" "/home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/bin/spec" "spec/models/product_spec.rb" --options "/home/byrnejb/Software/Development/Projects/rspectest/config/../spec/spec.opts" failed /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/lib/spec/rake/spectask.rb:173:in `define' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:823:in `verbose' /home/byrnejb/Software/Development/Projects/rspectest/vendor/plugins/rspec/lib/spec/rake/spectask.rb:142:in `define' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/bin/rake:16:in `load' /usr/bin/rake:16 the code is: --> module Spec module VERSION unless defined? MAJOR MAJOR = 1 MINOR = 1 TINY = 0 RELEASE_CANDIDATE = nil # RANDOM_TOKEN: 0.885013695004692 REV = "$LastChangedRevision$".match(/LastChangedRevision: (\d+)/)[1] STRING = [MAJOR, MINOR, TINY].join('.') TAG = "REL_#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('_')}".upcase.gsub(/\.|-/, '_') FULL_VERSION = "#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')} (r#{REV})" NAME = "RSpec" URL = "http://rspec.rubyforge.org/" DESCRIPTION = "#{NAME}-#{FULL_VERSION} - BDD for Ruby\n#{URL}" end end end <--- The same error occurs on both Linux CentOS 5 and MicroSoft Windows XP pro. Rails 1.2.5/1.2.5 Ruby 1.8.5/1.8.5 PostgreSQL 8.1.9 / 8.2.5 -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:[EMAIL PROTECTED] Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users