权限被拒绝的错误与phantomjs

用户名

我在Ruby 2.0.0-p353和OSX Mavericks上使用Rails 4.0.2,Guard 2.2.4,guard-rspec 4.2.4,rspec-rails 2.14.0,Capybara 2.2.1和Poltergeist 1.5.0。

当我运行bundle execguard时,出现以下错误消息,导致很多失败:在后钩Errno :: EACCES中发生错误:权限被拒绝-/ usr / local / Cellar / phantomjs出现在/Users/gillesmath/.rvm/红宝石/红宝石-2.0.0-p353 / lib /红宝石/2.0.0/open3.rb:211:在'spawn'中

我检查了对/ usr / local / Cellar / phantomjs的许可,没有发现任何异常。我可以在没有“ sudo”的情况下运行phantomjs。

我的spec_helper文件如下所示:ENV [“ RAILS_ENV”] || ='test'需要File.expand_path(“ ../../ config / environment”,FILE)需要'rspec / rails'需要'rspec / autorun'要求“ capybara / rspec”要求“ webmock / rspec”要求“ capybara / poltergeist”

Dir [Rails.root.join(“ spec / support / * / .rb”)]。each {| f | 要求f}

ActiveRecord :: Migration.check_pending!如果定义了(ActiveRecord :: Migration)

WebMock.disable_net_connect!(:net_http_connect_on_start => true,:allow_localhost => true)

Capybara.javascript_driver =:poltergeist

我看不出有什么问题,因为rails应用程序和/ usr / local / Cellar / phantomjs目录及其内容的owner:group是相同的。

谢谢你的帮助

蒂姆·摩尔

该错误使它看起来像是尝试执行/usr/local/Cellar/phantomjs 目录,而不是其中的可执行文件。我认为Poltergeist会扫描您PATH的第一件事phantomjs/usr/local/CellarPATH

如果是这样,我建议将其删除,因为可执行文件永远不应直接出现在其中。

如果不能这样做,另一种选择是使用phantomjs设置代码中的显式路径配置Poltergeist https : //github.com/jonleighton/poltergeist#customization

似乎有人已经打开了一个带修复程序的拉取请求,该修复程序可以跳过Poltergeist使用Cliver gem中的目录,因此希望不久将得到解决!

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章