[英]Upgrade to Rails 3.2.6 and Routing Error
I am having Rails 3.2.3 and it works perfectly fine. 我有Rails 3.2.3,它工作得非常好。 Tests pass.
测试通过。 Today I made an upgrade from Rails 3.2.3 to Rails 3.2.6.
今天我从Rails 3.2.3升级到Rails 3.2.6。
I did that by changing the Gemfile: 我通过更改Gemfile来做到这一点:
I remove 我删除
gem 'rails', '3.2.3'
and add 并添加
gem 'rails', '3.2.6'
I run bundle update
. 我运行
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.
我有几个模型,显然所有的控制器#show都失败了。 Just the controller#show.
只是控制器#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 ?
谁可以帮我这个事 ?
This is an issue with the latest journey gem, (1.0.4) - 这是最新旅程宝石的问题,(1.0.4) -
To fix this, just lock the version of journey gem to 1.0.3(which is stable) 要解决这个问题,只需将trip gem的版本锁定为1.0.3(这是稳定的)
gem "journey", "1.0.3"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.