Я обновился до El Capitan, после чего проблема началась. Когда я бегу cucumber features
он дает следующую ошибку:не в состоянии загрузить selenium-webdriver на mac os el capitan
Background: Member should open homepage # features/m001_top_header.feature:6
Capybara's selenium driver is unable to load `selenium-webdriver`, please install the gem and add `gem 'selenium-webdriver'` to your Gemfile if you are using bundler. (LoadError)
./features/support/env.rb:47:in `new'
./features/support/env.rb:47:in `block in <top (required)>'
./features/support/app_life_cycle_hooks.rb:22:in `Before'
Capybara's selenium driver is unable to load `selenium-webdriver`, please install the gem and add `gem 'selenium-webdriver'` to your Gemfile if you are using bundler. (LoadError)
./features/support/env.rb:47:in `new'
./features/support/env.rb:47:in `block in <top (required)>'
./features/support/app_life_cycle_hooks.rb:22:in `Before'
когда я бегу bundle install
затем selenium-webdriver
установлен:
~/P/m/web-automation (responsive ⚡=) bundle install
...
Using websocket 1.2.2
Using selenium-webdriver 2.48.1
Using spec 5.3.4
...
Bundle complete! 13 Gemfile dependencies, 61 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
~/P/m/web-automation (responsive ⚡=) bundle show selenium-webdriver
/usr/local/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.48.1
Но когда я проверяю which selenium-webdriver
, она ничего не возвращает:
~/P/m/web-automation (responsive ⚡=) which selenium-webdriver
~/P/m/web-automation (responsive ⚡=) which rspec
/usr/local/bin/rspec
~/P/m/web-automation (responsive ⚡=) which ruby
/usr/local/bin/ruby
~/P/m/web-automation (responsive ⚡=) which selenium-webdriver
~/P/m/web-automation (responsive ⚡=)
Моя рубиновая версия:
~/P/m/web-automation (responsive ⚡=) ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin15]
Я думаю, проблема связана с путём и конфигурацией, потому что я могу потребовать selenium-webdriver
irb, но я не смог ее решить. Любые гуру, пожалуйста, помогите мне в решении проблемы?
Мне нужно использовать Cuc-скрипты с огурцами, которые зависят от него. –
ха? bundle exec cucumber просто устанавливает среду, поэтому указанная версия gems в вашем Gemfile используется, а затем выполняет огурец в этой среде. –
Я знаю, что он запускает огурец, но мне нужно запустить 'огурец ...' –