Rspec 在 Rails 教程中给出了我的布局链接错误:“失败/错误:无法从回溯中找到匹配的行" [英] Rspec is giving an error with my layout links from the rails tutorial: “Failure/Error: Unable to find matching line from backtrace”

查看:36
本文介绍了Rspec 在 Rails 教程中给出了我的布局链接错误:“失败/错误:无法从回溯中找到匹配的行"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

同样的问题,但解决方案不起作用:,我尝试了多个版本的 rspec:为什么是Rspec 说失败/错误:无法从回溯中找到匹配的行"?

Same question, but solution did not work:, I've tried several versions of rspec: Why is Rspec saying "Failure/Error: Unable to find matching line from backtrace"?

dpalacio:sample_app dpalacio$ rspec -v
2.0.0.beta.18
dpalacio:sample_app dpalacio$ rspec spec/
controllers/    factories.rb    models/         requests/       spec_helper.rb  
dpalacio:sample_app dpalacio$ rspec spec/requests/
FFFFF

Finished in 0.55501 seconds
5 examples, 5 failures

1) LayoutLinks should have a Home page at '/'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

2) LayoutLinks should have a Contact page at '/contact'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

3) LayoutLinks should have an About page at '/about'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

4) LayoutLinks should have a Help page at '/help'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

5) LayoutLinks should have a Help page at '/signup'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

和2.0.1版本一样:

And the same with the 2.0.1 version:

dpalacio:sample_app dpalacio$ rspec -v
2.0.1
dpalacio:sample_app dpalacio$ rspec spec/
controllers/    factories.rb    models/         requests/       spec_helper.rb  
dpalacio:sample_app dpalacio$ rspec spec/requests/
FFFFF

Finished in 0.55501 seconds
5 examples, 5 failures

1) LayoutLinks should have a Home page at '/'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

2) LayoutLinks should have a Contact page at '/contact'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

3) LayoutLinks should have an About page at '/about'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

4) LayoutLinks should have a Help page at '/help'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

5) LayoutLinks should have a Help page at '/signup'
    Failure/Error: Unable to find matching line from backtrace
    stack level too deep
    # /Users/dpalacio/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/forwardable.rb:185

推荐答案

ok 找到问题了,问题不是 RSPEC 而是 WEBRAT.添加到您的 Gemfile:

Ok found the issue, the issue is not RSPEC but WEBRAT. Add to your Gemfile:

gem 'webrat', '0.7.1'

RSPEC 的版本应该是:宝石'rspec','2.0.1'

The version of RSPEC should be: gem 'rspec', '2.0.1'

这篇关于Rspec 在 Rails 教程中给出了我的布局链接错误:“失败/错误:无法从回溯中找到匹配的行"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆