rubymine 错误 - 在任何源中都找不到 capybara-webkit-0.9.0
当我尝试在 rubyMine 中运行我的应用程序时,我收到有关 capybara-webkit 的错误 -
...
in `block in materialize':
Could not find capybara-webkit-0.9.0 in any of the sources (Bundler::GemNotFound)
但通过命令行运行应用程序时我没有收到它。
似乎 rubyMine 正在检查所有环境,即使我运行开发时也是如此,并且由于某种原因,该 gem 有问题。
我的 Gemfile 包括: ...
group :test do
gem 'rspec-rails'
gem "capybara"
gem "capybara-webkit"
...
我正在与另一位开发人员共享代码库。 我用 rubyMine,他没有。 我们需要 capybara-webkit 或类似的工具来进行 rspec 测试。
注意:
Rails 3.1.3
Ruby 1.9.2-p290
我尝试从 gem 管理器 rubyMine 中手动安装 gem,但仍然出现错误:
Following gems were not installed:
capybara-webkit (0.9.0): Error installing capybara-webkit:
ERROR: Failed to build gem native extension. /Users/durrantm/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb Gem files will remain installed in /Users/durrantm/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0 for inspection. Results logged to /Users/durrantm/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0/./gem_make.out
When I try to run my application within rubyMine I get an error about capybara-webkit -
...
in `block in materialize':
Could not find capybara-webkit-0.9.0 in any of the sources (Bundler::GemNotFound)
But I don't get it when running the app via the command line.
Seems like rubyMine is checking all environments even when I run development and it has an issue with this gem for some reason.
my Gemfile includes:
...
group :test do
gem 'rspec-rails'
gem "capybara"
gem "capybara-webkit"
...
I am sharing a code base with another developer.
I use rubyMine, he doesn't.
We need capybara-webkit or similar for rspec tests.
Note:
Rails 3.1.3
Ruby 1.9.2-p290
I tried manually installing the gem from within rubyMine, gem manager, but still got error:
Following gems were not installed:
capybara-webkit (0.9.0): Error installing capybara-webkit:
ERROR: Failed to build gem native extension. /Users/durrantm/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb Gem files will remain installed in /Users/durrantm/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0 for inspection. Results logged to /Users/durrantm/.rvm/gems/ruby-1.9.2-p290/gems/capybara-webkit-0.9.0/./gem_make.out
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是 Mac OS X,则需要确保在安装 Capybara WebKit 之前已安装所有依赖项。请参阅https://github.com/thoughtbot/capybara-webkit。因此,您需要安装 Qt 4 Mac,并且可以在此处获取安装说明:
http://doc.qt.nokia.com/4.7-snapshot/install-mac.html
另外,您可以通过 MacPorts 执行“sudo port install qt4-mac”来安装它。然后你可以安装 capybara-webkit Ruby gem。
If you're using Mac OS X, then you need to make sure that you have installed all dependencies prior to installing Capybara WebKit. Please see the https://github.com/thoughtbot/capybara-webkit. Thus, you'll need to install Qt 4 Mac and you can get installation instructions here:
http://doc.qt.nokia.com/4.7-snapshot/install-mac.html
Also, you can install it through MacPorts by doing 'sudo port install qt4-mac'. Then you can install the capybara-webkit Ruby gem.