Lenny Marks
2009-Jun-05 22:10 UTC
[rspec-users] Problems upgrading to Rails-2.3.2/Rspec 1.2.6
jruby-1.3.0
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.
https://rspec.lighthouseapp.com/projects/5645/tickets/765-controller-spec-with-xhr-gives-template-missing-error
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>
/Users/Shared/eds_test/share/RubyGems/1.8/gems/actionpack-2.3.2/
lib/action_controller/mime_type.rb:206:in `method_missing''
/Users/Shared/eds_test/share/RubyGems/1.8/gems/rack-1.0.0/lib/
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'')
then
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?
Thanks,
-lenny
David Chelimsky
2009-Jun-06 03:30 UTC
[rspec-users] Problems upgrading to Rails-2.3.2/Rspec 1.2.6
On Fri, Jun 5, 2009 at 5:10 PM, Lenny Marks <lenny at aps.org> wrote:> jruby-1.3.0 > 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. > > https://rspec.lighthouseapp.com/projects/5645/tickets/765-controller-spec-with-xhr-gives-template-missing-errorI reopened the ticket.> > 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> > > ?/Users/Shared/eds_test/share/RubyGems/1.8/gems/actionpack-2.3.2/lib/action_controller/mime_type.rb:206:in > `method_missing'' > > ?/Users/Shared/eds_test/share/RubyGems/1.8/gems/rack-1.0.0/lib/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'') then > ? ? ?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? > > Thanks, > -lenny > > > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >