Rspec 1.1.99.10 rails 2.3 - help needed


#1

I checked first and found no conversation that matched my problem so
here it is:

I’m trying to get rspec going on ruby 1.9.1 / rails 2.3.0 - here’s my
current gem list:

*** LOCAL GEMS ***

actionmailer (2.3.0)
actionpack (2.3.0)
activerecord (2.3.0)
activeresource (2.3.0)
activesupport (2.3.0)
columnize (0.3.0)
cucumber (0.1.16)
daemons (1.0.10)
diff-lcs (1.1.2)
eventmachine (0.12.4)
git (1.0.5)
hoe (1.9.0)
mocha (0.9.5)
mysql (2.8.1)
pg (0.7.9.2009.02.26)
polyglot (0.2.5)
rack (0.9.1)
rails (2.3.0)
rake (0.8.3)
rspec (1.1.99.10)
rspec-rails (1.1.99.10)
rubyforge (1.0.3)
rubyist-aasm (2.0.5)
sqlite3-ruby (1.2.4)
term-ansicolor (1.0.3)
thin (1.0.0)
treetop (1.2.4)

As you can see, I followed David’s instructions re rspec and rspec-
rails for rails 2.3.0. Just by way of test, I did the following:

  1. rails spec230test
  2. cd spec230test
  3. script/generate rspec
  4. script/generate rspec_model User name:string email:string
  5. rake db:migrate
  6. rake spec:models --trace

and here’s what I get for results:

rake spec:models --trace
(in /Users/rick/spec230test)
** Invoke spec:models (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Execute spec:models
/opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/test_case.rb:6: warning: already initialized constant
Mocha
/opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:440:in rescue in load_missing_constant': uninitialized constant Mocha::Standalone (NameError) from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:436:inload_missing_constant’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:80:in const_missing_with_dependencies' from /opt/local/lib/ruby/gems/1.9.1/gems/mocha-0.9.5/lib/mocha.rb: 30:inclass:TestCase
from /opt/local/lib/ruby/gems/1.9.1/gems/mocha-0.9.5/lib/mocha.rb:
29:in <class:Unit>' from /opt/local/lib/ruby/gems/1.9.1/gems/mocha-0.9.5/lib/mocha.rb: 28:inmodule:MiniTest
from /opt/local/lib/ruby/gems/1.9.1/gems/mocha-0.9.5/lib/mocha.rb:
27:in <top (required)>' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/test_case.rb:3:in<top (required)>’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /opt/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.0/lib/
action_controller/integration.rb:3:in <top (required)>' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-rails-1.1.99.10/lib/ spec/rails.rb:11:in<top (required)>’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /Users/rick/spec230test/spec/spec_helper.rb:6:in `<top (required)


from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /Users/rick/spec230test/spec/models/user_spec.rb:1:in <top (required)>' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:147:inload_without_new_constant_marking’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:147:in load_with_new_constant_marking' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/ runner/example_group_runner.rb:15:inblock in load_files’
from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/
runner/example_group_runner.rb:14:in each' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/ runner/example_group_runner.rb:14:inload_files’
from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/
runner/options.rb:87:in run_examples' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/ runner.rb:61:inrun’
from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/
runner.rb:44:in block in autorun' /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’: no such file to load
– test/unit/testcase (MissingSourceFile)
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/test_case.rb:10:in<top (required)>’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /opt/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.0/lib/
action_controller/integration.rb:3:in <top (required)>' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-rails-1.1.99.10/lib/ spec/rails.rb:11:in<top (required)>’
from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/
active_support/dependencies.rb:158:in require' from /opt/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.0/lib/ active_support/dependencies.rb:158:inrequire’
from /Users/rick/spec230test/spec/spec_helper.rb:6:in <top (required) ' from /Users/rick/spec230test/spec/models/user_spec.rb:1:inrequire’
from /Users/rick/spec230test/spec/models/user_spec.rb:1:in <top (required)>' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/ runner/example_group_runner.rb:15:inload’
from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/
runner/example_group_runner.rb:15:in block in load_files' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/ runner/example_group_runner.rb:14:ineach’
from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/
runner/example_group_runner.rb:14:in load_files' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/ runner/options.rb:87:inrun_examples’
from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/
runner/command_line.rb:9:in run' from /opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/bin/spec: 4:in
rake aborted!
Command /opt/local/bin/ruby -I"/opt/local/lib/ruby/gems/1.9.1/gems/
rspec-1.1.99.10/lib" “/opt/local/lib/ruby/gems/1.9.1/gems/
rspec-1.1.99.10/bin/spec” “spec/models/user_spec.rb” --options “/Users/
rick/spec230test/spec/spec.opts” failed
/opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/rake/
spectask.rb:174:in block (2 levels) in define' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1090:inverbose’
/opt/local/lib/ruby/gems/1.9.1/gems/rspec-1.1.99.10/lib/spec/rake/
spectask.rb:150:in block in define' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:617:incall’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:617:in
block in execute' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:612:ineach’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:612:in
execute' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:578:inblock in invoke_with_call_chain’
/opt/local/lib/ruby/1.9.1/monitor.rb:190:in mon_synchronize' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:571:ininvoke_with_call_chain’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:564:in
invoke' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:2019:ininvoke_task’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1997:in
block (2 levels) in top_level' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1997:ineach’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1997:in
block in top_level' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:2036:instandard_exception_handling’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1991:in
top_level' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1970:inblock in run’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:2036:in
standard_exception_handling' /opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/lib/rake.rb:1967:inrun’
/opt/local/lib/ruby/gems/1.9.1/gems/rake-0.8.3/bin/rake:31:in <top (required)>' /opt/local/bin/rake:19:inload’
/opt/local/bin/rake:19:in `’

Compilation exited abnormally with code 1 at Wed Mar 4 11:07:37

Just by way of sanity check, in a directory that contained both
user_spec.rb and user.rb from above, I ran “spec user_spec.rb” and got
the same result.

Any thoughts on what I should try next? BTW, the same sequence of
steps run in a Ruby1.8.7/Rails2.2.2 environment works fine of course.

thanks in advance,
Rick


#2

On Wed, Mar 4, 2009 at 3:14 PM, Rick removed_email_address@domain.invalid wrote:

I checked first and found no conversation that matched my problem so
here it is:

I’m trying to get rspec going on ruby 1.9.1 / rails 2.3.0 - here’s my
current gem list:

rspec-rails does not yet work with Ruby 1.9.1 - this is one item on a
rather long list. As of the latest code in git, there are no errors or
failures, but there is simply no feedback whatsoever.

Patches welcome!