如何在 MINGW 上获取 Windows Color 中的 Rspec 测试
我是 Ruby 新手,只是想学习它,按照 Ruby on Rails 教程
我正在运行 GitBash MINGW 用于窗口,当我运行(rspec 2.4.0)时,
rspec spec/
我得到响应:
You must use ANSICON 1.31 or later (http://adoxa.110mb.com/ansicon/) to use
colour on Windows
...但我非常喜欢使用 MINGW。如果我使用 ANSICON,我似乎无法开始
ssh-add
工作,我收到错误
Could not open a connection to your authentication agent
,我可以使用 MINGW 进行推送,使用 ANSICON 进行测试,但我宁愿将其全部放在一个控制台中。
I'm new to Ruby, just tying to learn it, following the Ruby on Rails Tutorial
I'm running the GitBash MINGW for window, and when I run (rspec 2.4.0)
rspec spec/
I get the response:
You must use ANSICON 1.31 or later (http://adoxa.110mb.com/ansicon/) to use
colour on Windows
... but I quite like using MINGW. and if I use ANSICON I cant seem to get
ssh-add
to work, I get the error
Could not open a connection to your authentication agent
I could use MINGW for Pushing and ANSICON for Testing, but I'd rather have it all in the one console.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于 GitBash 已经支持转义,因此您应该能够通过定义 ANSICON 环境变量来伪造 RSpec/Ruby。不确定 Ruby 是否真的读取了它,但它的内容是“WxH (wxh)”,其中 W & H 是宽度 &缓冲区的高度和 w & h 窗户。
Since GitBash already supports escapes, you should be able to fake RSpec/Ruby by defining the ANSICON environment variable. Not sure if Ruby actually reads it, but its content is "WxH (wxh)", where W & H are the width & height of the buffer and w & h the window.