如何在路径中使用捆绑器 gem 二进制文件
我刚刚开始在vendor/中使用bundler进行gem打包。问题在于某些具有二进制文件的 gem(例如 rspec 和 cucumber)。 my_app/vendor/gems/ruby/1.8/...cucumber-0.6.2/bin/ 下的二进制路径不在我的路径中,因此当我去运行 cucumber 时,找不到命令。
从应用程序内执行捆绑的 gem 二进制文件而不是向我的路径添加大量文件夹的最简单方法是什么?
谢谢
I just started using bundler for gem packaging in vendor/. The problem is with certain gems (like rspec and cucumber) that have binaries. The binary path that is under my_app/vendor/gems/ruby/1.8/...cucumber-0.6.2/bin/ is not in my path, therefore when I go to run cucumber i get command cannot be found.
What is the easiest way to execute the bundled gem binaries from within the app rather than adding a large number of folders to my path?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
较新版本的捆绑程序有一个“exec”操作。所以对于黄瓜来说是:
Newer version of bundler have an "exec" action. So for cucumber it would be:
好吧,符号链接实际上是一个愚蠢的想法。这个问题确实让我思考,我发现了这个: http://litanyagainstfear.com/blog/2009/10/14/gem-bundler-is-the-future/
那么,从 Rails 根来看,
bin/cucumber
可以工作吗?OK, so symlinking was in fact a daft idea. This question did get me thinking though, and I found this: http://litanyagainstfear.com/blog/2009/10/14/gem-bundler-is-the-future/
so, from the Rails root, does
bin/cucumber
work?