2014-01-10 73 views
1

我在Ruby 2.0.0上使用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- p353和OSX小牛。权限被拒绝错误phantomjs

当我运行捆绑高管后卫我得到了很多失败与此错误消息:在发生 错误后钩 变量Errno :: EACCES:权限被拒绝 - 在/ usr /本地/库/ phantomjs 发生在/用户/ gillesmath/.rvm/rubies/ruby​​-2.0.0-p353/lib/ruby​​/2.0.0/open3.rb:211:在'spawn'

我检查了/ usr/local/Cellar/phantomjs并没有注意到任何异常。我可以在没有'sudo'的情况下运行phantomjs。

我spec_helper文件看起来像这样: ENV [ “RAILS_ENV”] || = '测试' 要求File.expand_path( “../../配置/环境”,FILE ) 需要“rspec的/ Rails的 需要 'rspec的/自动运行' 需要 “水豚/ rspec的” 需要 'webmock/rspec的' 需要 '水豚/骚灵'

DIR [Rails.root.join(“规格/支持/ * / .rb“)]。each {| f |要求f}

ActiveRecord :: Migration.check_pending!如果定义(ActiveRecord的::迁移)

WebMock.disable_net_connect?!(:net_http_connect_on_start =>真实,:allow_localhost =>真)

Capybara.javascript_driver =:骚灵

我什么也看不见是错误的,因为owner:group对于rails应用程序和/ usr/local/Cellar/phantomjs dir及其内容都是相同的。

感谢您的帮助

回答

3

该错误使得它看起来像它试图执行/usr/local/Cellar/phantomjs目录,而不是里面的可执行文件。我认为Poltergeist扫描你的PATH第一件事叫phantomjs/usr/local/Cellar在您的PATH

如果是这样,我建议把它拿出来,因为可执行文件不应该直接出现在那里。

如果不能,另一个选择是在你的安装代码的显式路径配置骚灵到phantomjshttps://github.com/jonleighton/poltergeist#customization

看起来已经有人在吵闹鬼使用Cliver宝石opened a pull request with a fix to skip directories,所以希望这将尽快修复!