Question

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
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top