rubymine 错误 - 在任何源中都找不到 capybara-webkit-0.9.0

发布于 2025-01-07 14:15:56 字数 1107 浏览 2 评论 0原文

当我尝试在 ruby​​Mine 中运行我的应用程序时,我收到有关 capybara-webkit 的错误 -

...
in `block in materialize': 
Could not find capybara-webkit-0.9.0 in any of the sources (Bundler::GemNotFound)

但通过命令行运行应用程序时我没有收到它。

似乎 ruby​​Mine 正在检查所有环境,即使我运行开发时也是如此,并且由于某种原因,该 gem 有问题。

我的 Gemfile 包括: ...

group :test do
  gem 'rspec-rails'
  gem "capybara"
  gem "capybara-webkit"

...

我正在与另一位开发人员共享代码库。 我用 ruby​​Mine,他没有。 我们需要 capybara-webkit 或类似的工具来进行 rspec 测试。

注意:
Rails 3.1.3
Ruby 1.9.2-p290

我尝试从 gem 管理器 ruby​​Mine 中手动安装 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖兔^ω^ 2025-01-14 14:15:56

如果您使用的是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文