3

I am having Rails 3.2.3 and it works perfectly fine. Tests pass. Today I made an upgrade from Rails 3.2.3 to Rails 3.2.6.

I did that by changing the Gemfile:

I remove

gem 'rails', '3.2.3'

and add

gem 'rails', '3.2.6'

I run bundle update. To see if that works, I run all my spec tests. I have a couple of models in there and apparently all the controller#show fail. Just the controller#show. Here is the error message:

Failure/Error: get 'show', :id => product.to_param
     ActionController::RoutingError:
       No route matches {:id=>"76", :controller=>"products", :action=>"show"}

Here is the code of the test:

let!(:product) { create(:product) }
describe "GET show" do
    it "should assign the requested product as @product" do
      get 'show', :id => product.to_param
      assigns[:product].should == product
    end
  end

I went to the real link on the web and surprisingly, it's fine. Can anyone help me on this ?

gabrielhilal
  • 10,660
  • 6
  • 54
  • 81
u19964
  • 3,255
  • 4
  • 21
  • 28
  • Show the syntax for the parts its breaking on .. the route its looking for is including the id .. where is this route ? {:id=>"76", :controller=>"products", :action=>"show"} – Sully Jun 22 '12 at 21:56
  • Exactly the same problem here, upgrading from 3.2.5 to 3.2.6. – recurser Jul 03 '12 at 22:45
  • 6
    Answer in this SO-post: http://stackoverflow.com/questions/11466917/routing-error-when-updating-to-rails-3-2-6-or-rspec-2-11-0 – Johan Lundström Jul 16 '12 at 08:36

1 Answers1

0

This is an issue with the latest journey gem, (1.0.4) -

To fix this, just lock the version of journey gem to 1.0.3(which is stable)

gem "journey", "1.0.3"
sandeep
  • 521
  • 2
  • 7