Selenium WebDriver - Unable to connect to Mozilla geckodriver - selenium-webdriver

I am not able to run automation cases any longer since last time I set up the Centos 7 server things worked very well with the Bitbucket repo and I have the exact repo cloned and am not able to run the this time, please if you can help?
My Gem File is below:
source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.2'
# Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.3.6'
# Use Puma as the app server gem 'puma', '~> 3.11'
# Use SCSS for stylesheets gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.5'
# Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.1.0', require: false
group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] end
group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 3.3.0' gem 'listen', '>= 3.0.5', '< 3.2' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-watcher-listen', '~> 2.0.0' end
gem 'rspec'
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
gem 'geckodriver-helper'
gem 'cucumber-rails', :require => false
gem 'database_cleaner'
gem 'rspec-retry'
gem 'rubyXL'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data
gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
I have tried all the version till 3.12.0 from the [change log][1], but still get the same error every time which is as below:
unable to connect to Mozilla geckodriver 127.0.0.1:4444 (Selenium::WebDriver::Error::WebDriverError)
It has been more then half day but not able to find a suitable solution.
Thanks!

May be useful, I got a solution after 2 weeks when the bundle update updated some of the gems and then the Chrome and Frirefox browser were launched successfully.

Related

Unable to use metasploit framework(I'm using windows 8.1)

Bundler could not find compatible versions for gem "bcrypt":
In Gemfile:
metasploit-framework x64-mingw32 was resolved to 5.0.102, which depends on bcrypt (=3.1.12) x64-mingw32
Could not find gem 'bcrypt (=3.1.12)', which is required by gem 'metasploit-framework', in any of the sources.
You are missing a ruby dependency required for Metasploit to run. Simply run gem install bcrypt and you should be good to go (unless other dependencies are missing). If you’re using Linux, apt or yum would help you avoid this and automatically install any dependencies along with your desired binary

Unable to install sass using Gem from terminal on Windows

I am trying to develop a Web Application using Angular JS. I am about to develop Admin Panel. I will use this template - http://startangular.com/product/flatlogic-angular-material-dashboard/. I need to set up the that admin panel following this instruction - https://github.com/flatlogic/angular-material-dashboard/blob/master/README.md. As you can see, I need to run this command in terminal.
$ gem install sass
I am using Windows 10. All the steps working fine. But when I run that command, it is giving me this error.
What is that error and how can I solve it? Is there a way to solve that step without using that command?
I found the solution. This question saved me.
Error: SASS installation for windows
I run this command
gem source -a http://rubygems.org/
Before running this
gem install sass
This is additional
If you still getting errors, try this.
gem sources --remove https://rubygems.org/
gem sources --add http://rubygems.org
gem update --system
gem sources --remove http://rubygems.org
gem sources --add https://rubygems.org

Rack seems to think my environment is ' ' when it is production

Rack app error: # in puma log
when running capistrano production deploy.
Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.1.0'
gem 'mysql'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'puma'
group :development do
gem 'capistrano'
gem 'capistrano-rails'
gem 'capistrano3-puma'
gem 'rvm1-capistrano3',require: false
end
gem 'capistrano3-nginx'
deploy.rb:
lock '3.2.1'
set :application, 'foobar'
set :repo_url, '/home/joeradtke/rails/foobar/.git'
set :app_port, '8500'
set :nginx_domains, "radtke.in www.radtke.in"
set :nginx_template, "config/nginx.conf.erb"
set :app_server_socket, "#{shared_path}/sockets/puma-#{fetch :application}.sock"
set :deploy_to, '/home/joe/foobar'
set :deploy_user, 'joe'
set :sudo_user, 'joe'
set :stage, :production
set :puma_init_active_record, true
set :puma_env, :production
set :puma_state, "#{shared_path}/tmp/pids/puma.state"
set :linked_files, %w{config/database.yml}
set :rvm1_ruby_version, "2.1.2"
set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
set :ssh_options, {
config:false
}
namespace :deploy do
after :deploy, "nginx:restart"
after :deploy, "puma:restart"
end
deploy/production.rb:
server 'radtke.in', user: 'joe', roles: %w{web app}, primary: true
set :ssh_options, {
keys: %w(/home/joe/.ssh/id_rsa),
forward_agent: true,
auth_methods: %w(publickey)
}
Capfile:
require 'capistrano/setup'
require 'capistrano/deploy'
require 'rvm1/capistrano3'
require 'capistrano/rails'
require 'capistrano/puma'
require 'capistrano/puma/jungle'
require 'capistrano/puma/monit'
require 'capistrano/nginx'
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
cap production deploy runs fine but
web page at root shows:
"A really lowlevel plumbing error occured. Please contact your local Maytag(tm) repair man."
can server assets so nginx is fine.
I think I've put production everywhere.
Even tried adding
'':
secret_key_base:.................. to secret.yml file.
I've been fooling with this for two days. Usually can find online answer but not for this. Please help.
Joe Radtke
I ran in to this same problem today while migrating an app from an old Rails 1.9.3 Suspenders environment to a new Rails 2.0 environment on AWS.
First the message the error message "A really lowlevel plumbing error occured. Please contact your local Maytag(tm) repair man." is some smartass way of saying that there was an error with Puma and you should look in puma.log to see what the error is...
tail -f /var/log/puma/puma.log
In my case I found this line:
Rack app error: #<RuntimeError: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`>
sadly I'm not nerd enough to tell you exactly why this was an issue, but I can tell you that my config/secrets.yml was not the issue. For some reason that file wasn't getting loaded correctly in production, so I did two things. First I made sure that the puma gem was getting loaded in production:
group :production do
gem 'puma'
end
I still had problems so I had a look at the application.rb file and changed
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
require "http_logger"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
to
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
Which is what we were using in our newer rails environment.

Installing MSSQL Adapter for Ruby on Rails fails

I run this command:
gem install activerecord-sqlserver-adapter --source=http://gems.rubyonrails.org
and it fails with
ERROR: Could not find a valid gem 'activerecord-sqlserver-adapter' (>= 0) in any repository
How can I install the Microsoft SQL Server adapter?
Remove the source, and it works:
gem install activerecord-sqlserver-adapter
Cheers!

Fix an external dependency of a ruby gem

I am currently trying to install the gem nfoiled, which provides a ruby interface to ncurses.
I do this by using gem install elliottcable-nfoiled as suggest in the README. Downloading it manually from the github repository and then installing it with rake install doesn't work because of a problem with the echoe-gem, thus I am bound to use the normal way.
Unfortunately it depends on the gem ncurses-0.9.1 which is only compatible with ruby 1.8, and thus I can't install nfoiled either (since it always tries to compile ncurses-0.9.1 first):
novavortex:/usr/src# gem install elliottcable-nfoiled
Building native extensions. This could take a while...
...
form_wrap.c: In function `rbncurs_m_new_form':
form_wrap.c:395: error: `struct RArray' has no member named `len'
form_wrap.c: In function `rbncurs_c_set_field_type':
form_wrap.c:619: error: `struct RArray' has no member named `len'
form_wrap.c: In function `rbncurs_c_set_form_fields':
form_wrap.c:778: error: `struct RArray' has no member named `len'
form_wrap.c: In function `make_arg':
form_wrap.c:1126: error: `struct RArray' has no member named `len'
make: *** [form_wrap.o] Error 1
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/ncurses-0.9.1/gem_make.out
novavortex:/usr/src#
I managed to fix the problem in ncurses-0.9.1 (by replacing RARRAY(x)->len with RARRAY_LEN(x)) and to install it, but nfoiled still always tries to recompile it from a freshly downloaded source.
How can I install nfoiled without having it recompile ncurses first?
You said you already fixed ncurses manually. You can then install the other gem without its dependencies with the --ignore-dependencies switch:
gem install elliottcable-nfoiled --ignore-dependencies
I was able to install ncurses-ruby it under ruby 1.9.2-head without any problems, I could not install the nfoiled gem because it requires a specific version of echoe.
$ gem install --source http://gems.github.com elliottcable-nfoiled
ERROR: Error installing elliottcable-nfoiled:
elliottcable-nfoiled requires ncurses (>= 0, runtime)
$ gem install ncurses
Building native extensions. This could take a while...
Successfully installed ncurses-0.9.1
1 gem installed
Installing ri documentation for ncurses-0.9.1...
Installing RDoc documentation for ncurses-0.9.1...
$ gem install --source http://gems.github.com elliottcable-nfoiled
ERROR: Error installing elliottcable-nfoiled:
elliottcable-nfoiled requires echoe (>= 0, = 3.0.2, runtime)
Are you sure you have the right ncurses development headers so that the ruby bindings build?

Resources