Ruby on rails 不能';找不到id=资产的模型

Ruby on rails 不能';找不到id=资产的模型,ruby-on-rails,ruby,rspec,friendly-id,Ruby On Rails,Ruby,Rspec,Friendly Id,我正在使用rspec和poltergeist/phantomjs测试我的应用程序,在我安装gem-friendly_id以更改默认路由后,我的所有javascript测试都开始抛出以下错误: Failure/Error: Unable to find matching line from backtrace ActiveRecord::RecordNotFound: Couldn't find SelectionProcess with id = assets 我的资产

我正在使用rspec和poltergeist/phantomjs测试我的应用程序,在我安装gem-friendly_id以更改默认路由后,我的所有javascript测试都开始抛出以下错误:

Failure/Error: Unable to find matching line from backtrace
    ActiveRecord::RecordNotFound:
        Couldn't find SelectionProcess with id = assets
我的资产在test.rb中配置:

config.serve_static_assets = true 
config.static_cache_control = "public, max-age=3600"
回溯中的最后几行:

 # /Users/Augusto/.rvm/gems/ruby-1.9.3-p362@startupbase/gems/activerecord-3.2.12/lib/active_record/relation/finder_methods.rb:267:in `find_by_attributes'
 # /Users/Augusto/.rvm/gems/ruby-1.9.3-p362@startupbase/gems/activerecord-3.2.12/lib/active_record/dynamic_matchers.rb:50:in `method_missing'
 # /Users/Augusto/.rvm/gems/ruby-1.9.3-p362@startupbase/gems/cancan-1.6.9/lib/cancan/controller_resource.rb:109:in `find_resource'
 # /Users/Augusto/.rvm/gems/ruby-1.9.3-p362@startupbase/gems/cancan-1.6.9/lib/cancan/controller_resource.rb:68:in `load_resource_instance'
 # /Users/Augusto/.rvm/gems/ruby-1.9.3-p362@startupbase/gems/cancan-1.6.9/lib/cancan/controller_resource.rb:32:in `load_resource'
 # /Users/Augusto/.rvm/gems/ruby-1.9.3-p362@startupbase/gems/cancan-1.6.9/lib/cancan/controller_resource.rb:10:in `block in add_before_filter'

听起来像是资产URL的友好id。如果为根url(/)定义友好的\u id,则所有资产请求(/assets)都将被接管。因此,Rails尝试查找id=assets的记录。

能否添加实际调用
find
方法的部分?