[rspec-users] Problems upgrading to Rails-2.3.2/Rspec 1.2.6

Lenny Marks lenny at aps.org
Fri Jun 5 18:10:27 EDT 2009

rspec/rspec-rails 1.2.6

I just ran into the 'Missing template' thing from the ticket below as  
well. Is it really that uncommon for a controller action to redirect  
or explicitly render a different template? Is it still considered  
'invalid'? Seems silly to have to create a bunch of blank templates.


I was also running into a conflict between the version of the rack gem  
bundled with Rails 2.3.2 and the rack gem dependency from rspec-rails.  
When running my app I was getting the error below from POST requests  
that were expecting JSON back.

undefined method `split' for #<Mime::Type:0x7d429227>
lib/action_controller/mime_type.rb:206:in `method_missing'
rack/request.rb:51:in `media_type'

I'm not sure why it was picking up the rack-1.0.0 gem. I thought I  
checked out all the upgrade notes and I did re-run the rspec generator.

My solution was to remove the rack-1.0.0 gem and comment out the  
runtime dependency in the rspec-rails gemspec.

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0')  
       s.add_runtime_dependency(%q<rspec>, ["= 1.2.6"])
       #s.add_runtime_dependency(%q<rack>, [">= 0.4.0"])

Anyone have any better suggestions? Maybe I have something peculiar  
that others aren't hitting these issues?


More information about the rspec-users mailing list