ruby – Textmate黄瓜束问题 – ‘运行功能’产生错误

前端之家收集整理的这篇文章主要介绍了ruby – Textmate黄瓜束问题 – ‘运行功能’产生错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
从黄瓜功能文件,当我去“运行功能”我得到下面的错误弹出框出现.

我该如何解决

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in gem_original_require’:没有这样的文件加载 – /Users/evolve/Projects/i9/Tornelo/.bundle/environment(LoadError)from / Library / Ruby / Site / 1.8 / ruby​​gems / custom_require.rb:31:inrequire’from / Users / evolve / Library / Application Support / TextMate / Bundles / Cucumber.tmbundle / Support / lib / cucumber / mate /../ mate.rb: 10 / from / Users / evolve / Library / Application Support / TextMate / Bundles / Cucumber.tmbundle / Support / lib / cucumber / mate / feature_helper.rb:1:in require / from / Users / evolve / Library / Application Support / TextMate / Bundle / Cucumber.tmbundle / Support / lib / cucumber / mate / feature_helper.rb:1 from /tmp/cucumber-906.rb:2:inrequire’from /tmp/cucumber-906.rb:2

@H_403_7@解决方法
我有同样的错误.要修复它,您需要编辑此文件
/Users/richie/Library/Application Support/TextMate/Pristine Copy/Bundles/Cucumber.tmbundle/Support/lib/cucumber

用以下2行替换第10行:

environment_file = File.join(ENV['TM_PROJECT_DIRECTORY'],bundle_path,"environment")
require "#{enviroment_file}" if File.exists?("#{environment_file}.rb")

这样它只会加载文件(如果存在).

我正在使用RSpec 2.0,所以我也不得不修改第23行(现24行)的rspec要求:

require 'rspec'
原文链接:https://www.f2er.com/ruby/267303.html

猜你在找的Ruby相关文章