require: cannot load such file -- selenium-webdriver (LoadError) on Ubuntu



From irb 'require selenium-webdrive' returns true and from RubyMine I get the following error.

require': cannot load such file -- selenium-webdriver (LoadError)

Ruby path:  ~/.rvm/rubies/ruby-2.3.3/bin/ruby

IRB path:  ~/.rvm/rubies/ruby-2.3.3/bin/irb

From RubyMine setting the Ruby interpreter path is the same.

Why I get an error while require 'selenium-webdriver' from a Ruby code inside the RubyMine ?

bundle info selenium-webdriver returns the following:


Please help me to fix this issue.







Comment actions Permalink

Please let me know what should I change in RubyMine settings or in project configuration to fix this problem. 

I can run the project code from command line, so all the packages and gems are installed.


Comment actions Permalink


have you specified the gem in question in your Gemfile?

Comment actions Permalink

I have installed selenium-webdriver gem.

sudo gem install selenium-webdriver
[sudo] password for khachatryan:
Successfully installed selenium-webdriver-3.11.0
Parsing documentation for selenium-webdriver-3.11.0
Done installing documentation for selenium-webdriver after 1 seconds
1 gem installed


Could you please answer on matter of my problem. How to configure IntelliJ so it will run Ruby code with selenium?

Why I get the following error while I am trying to run a Ruby code with 

require 'selenium-webdriver'

require': cannot load such file -- selenium-webdriver (LoadError)



Comment actions Permalink

Without sudo can't install

$ gem install selenium-webdriver
ERROR: Loading command: install (LoadError) cannot open shared object file: No such file or directory - /usr/local/home/khachatryan/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/x86_64-linux/
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass


Comment actions Permalink

Can you please help me with resolving this issue?



Please sign in to leave a comment.