I am using the webdrivers gem for Ruby (not selenium webdriver) https://rubygems.org/gems/webdrivers/versions/3.2.0
I can get the gem to update chrome fine, it places it in webdrivers new directory and sees the version of the chrome driver. I only used the update and latest methods on Webdrivers::Chromedriver. My issue is when trying to get the Webdrivers::Geckodriver installed (firefox). I get the error message: Cannot reach site. The documentation is a little lacking, does anyone know the proper setup for firefox? or why i get this error?
First, update to the latest version, there are a couple minor bugs that were fixed since your version.
You should only be seeing that error if the gem can't access the github site where mozilla stores its release binaries. So very likely a temporary issue.
If it isn't already working again, set Webdrivers.logger.level = :debug to get more info about what is happening, and we can debug it.
Related
I see WATIR supports Edge browser automation in official website. But when I tried to run my existing suite on Edge after setting the path for MicrosoftWebDriver.exe in environment variables I am facing the below error .
Selenium::WebDriver::Error::WebDriverError: unable to connect to
MicrosoftWebDriver localhost:17556
Below are my version details.
Watir - 6.8.4
Ruby - 2.2.6
Windows 10 64 bit
I even tried using webdrivers gem of titusfortner. But, no success webdrivers gem is not downloading MicrosoftWebDriver.exe into .webdrivers folder in my users directory.
I wanted to know whether I have anything wrong in my set up to trigger edge browser. Thanks in advance
Got the issue resolved. We have to download the right version of Microsoft WebDriver.
Go to Start > Settings > System > About and locate the number next to OS Build on the screen. This is your build number. Having the correct version of WebDriver for your build ensures it runs correctly.
Get the right version of driver at WebDriver - Microsoft Edge Development
So I've been having an issue getting my Protractor/Jasmine tests running in FireFox. I've been aware of the version issue from FireFox that doesn't support selenium angular/bootstrap etc etc and that has been my issue to date.
I was informed to try geckodriver but really can't find any good resources on how to set it up using protractor and jasmine. Or even which driver is the appropriate one to use.
Recently I've tried the following to get FF back up and running (all resulted with no luck):
Downgraded FireFox to as low as 33.x.x while keeping
Protractor/Jasmine at current versions (4.0.5 and 2.51 respectively).
Downgraded Protractor to as low as 3.0.0 while keeping FF at current version (47.0.1)
Downgraded both Protractor and FF to the lowest above versions.
Used Latest Version of FF 47.0.1 with lesser versions of Protractor.
Used Latest Version of FF 47.0.1 with latest version of Protractor 4.0.5
Used directConnect: true and directConnet: false
So I guess now I have one of two questions:
1. Could somebody post a protractor config snippet using the geckodriver / or direct me to a walk-through of this.
2. Inform me of a work around or a working solution (versions of both webdrivers/protractor/jasmine, etc).
If you need to see errors or my config file or anything at all please just simply comment and I'll be happy to revise.
There was a period of time around Firefox v46 and Selenium v2.5x where things were incompatible due to changes to the firefox web-driver. The issues were quickly addressed by the community.
The issue with Protractor lies with the webdriver-manager being a bit out of date with the updates. As per discussions on github, they are aware of this, and a fix is coming.
The workaround in the meantime is to manually update the outdated pieces.
Here's how you'd do it, run
webdriver-manager update
This will give you the paths to all the components the webdriver-manager handles for you.
Navigate to the selenium-server-standalone.jar file (protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar in my case) and replace this with the latest selenium standalone jar (anything v3+ should be good). Make sure to retain the exact filename as the previous jar file. (link: http://www.seleniumhq.org/download/)
Repeat the process to get the latest Gecko web-driver. Uncompress and replace the current version. (link: https://github.com/mozilla/geckodriver/releases)
Now run your tests through protractor and you should be good with the latest version of Firefox.
Good luck and happy testing :)
I apologize ahead of time if I don't do a good job of explaining this. I am a complete beginner and I have been struggling to find anything online that is written with that in mind.
So far, my only experience is doing the Javascript and Ruby sections of Codecademy.com. I read that I should have some knowledge of Ruby before trying out Rails.
So I found this site Getting Started with Rails and I tried to follow the steps and do exactly as it said. It even says at the beginning, "This guide is designed for beginners who want to get started with a Rails application from scratch. It does not assume that you have any prior experience with Rails." It also says, "The best way to use this guide is to follow each step as it happens, no code or step needed to make this example application has been left out, so you can literally follow along step by step."
Anyway, I'm using Windows 7 Home Premium and I already had Ruby installed. When I go into the command prompt and type ruby -v it says ruby 1.9.3p484 (2013-11-22) [i386-mingw32]. When I type rails -v it says 4.0.2. When I type gem -v I get 1.8.28. Now in the instructions it links to a place to download RubyGems and it says that it's 2.2.2. I downloaded that and clicked the setup.rb file and it said it installed it, yet the version is still 1.8.28. I don't know why, but it says it's installed so I assumed it did what it was supposed to do. I'm probably wrong.
Then I'm supposed to type rails server and then go to localhost:3000 and see some kind of default page. However, when I type rails server I get these errors. Sorry for the copy and paste, but I'm not allowed to post a pic of the command prompt.
E:\Apps\RailsWork\blog>rails server
←[31mCould not find gem 'rails (= 4.0.2) x86-mingw32' in the gems available on t
his machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m
E:\Apps\RailsWork\blog>bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.9.0)
Installing atomic (1.1.16)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
"E:/Apps/Rails Installer Package/RailsInstaller/Ruby1.9.3/bin/ruby.exe"
extconf.rb
E:/Apps/Rails Installer Package/RailsInstaller/Ruby1.9.3/bin/ruby.exe: invalid o
ption -P (-h will show valid options) (RuntimeError)
Gem files will remain installed in E:/Apps/Rails Installer Package/RailsInstalle
r/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/atomic-1.1.16 for inspection.
Results logged to E:/Apps/Rails Installer Package/RailsInstaller/Ruby1.9.3/lib/r
uby/gems/1.9.1/gems/atomic-1.1.16/ext/gem_make.out
An error occurred while installing atomic (1.1.16), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.16'` succeeds before bundling.
E:\Apps\RailsWork\blog>
You can see that it tells me to type bundle install, but when I try that I get another few error messages. I've tried googling these error messages, and some of them even linked me to questions asked on this site, but most of them were close, but not exactly what I'm having trouble with, and all of them have answers that are away over my head.
I also thought maybe it didn't matter and so I tried to go to localhost:3000 anyway, but I get the "Oops! Google Chrome could not connect to localhost:3000" message.
I'm a total noob. Everything I look up just gets me more confused so I'm hoping the answer is kind of simple and that someone can point it out for me in a beginner-friendly kind of way. I feel like once I get over this hump of getting all of this set up, I can actually start learning and gaining some experience. I had a blast learning Ruby so far and I hope to continue on with learning Rails. Thanks for reading and any help would be greatly appreciated. Oh, and if anyone has any better suggestions for a beginner's guide to all of this stuff, I'd also really appreciate it. Thanks again.
On windows it is probably the easiest to get started with the one click rails installer as this will also install the devkit although I see that it is not being kept up to date with ruby or rails versions. Although it does work Windows is not the best environment for Rails development. Starting up the rails server and running tests is much slower than on mac or linux and will get frustrating after a while. Also some handy gems and third party tools doesn't work on windows. Save yourself the pain and run ubuntu on a vm (virtualbox is good). Also use a ruby version manager like rbenv otherwise it becomes a royal pain to upgrade ruby later.
In attempting to upgrade to Bootstrap 2 (using twitter-bootstrap-rails gem), it seems that page-specific scripts are rendered unusable: all scripts must be loaded from the Asset Pipeline to work. Even a simple $ alert function called from a page script tag doesn't appear to load, even if yielded into the head after the AP loads. The original Bootstrap played fine with page scripts.
I understand that scripts should usually be loaded through the AP as a practice, but has anyone else experienced this behavior, and is this something that can be remedied easily, or is this something unique to my setup? (Rails 3.1.3, rvm, ruby 1.9.3, xCode 4.1)
A git reset solved the issue, but I'd rather upgrade and use the new TB features....
Thanks for any insights or thoughts about how to track down the issue.
You are using rails 3.1.3 the new gem works fine for me on rails 3.2.2 so it should be that your jquery-rails gem might not be using the latest jquery. so try upgrading cos the new gem works with the latest version of jquery
i am running ruby 1.9.2p0 on rails on windows OS with rubymine 3.1.1.
i use it for גseveral weeks.
a few days ago- i tried to run my project from rubymine and the console notification was:
"Could not find rake-0.8.7 in any of the sources
Process finished with exit code 7"
i googled it and i found reference to this problem in several places. the solution repeated most often was to delete the non-versioned "rake.gemspec" file.
i tried this solution but the problem is not resolved, it still says the same notification.
i trying to solve this problem for several days!!!
please help me if you know how!!!
thanks a lot in advanced!
Asaf,
I've had literally hours of frustration dealing with similar problems. The solution can be a challenge to track down, because there are numerous reasons you could be having the problem. I'm no expert myself, but I'll try to pass on some of what I've learned.
First, you mentioned getting an error about Rake, but didn't mention that you had tried to actually run Rake. Are you getting the error upon loading up RubyMine or specifically after running a Rake command?
Next, if you are running a Rake command and getting an error, you should take note that WHERE you run the command from is pretty important. For example, if you keep a Terminal window open like I do, and run the Rake command from Terminal, you won't necessarily get the same results you would get by running Rake from RubyMine itself. The reason for this was not self-evident when I first started with RubyMine, but I think it comes down to this:
The Ruby SDK and Gems preferences in RubyMine should be determining what types of dependency errors you get from within RubyMine. So you might start by looking there to see if there are any dependency errors. Next, I would guess that you're running RVM? Please be aware that it is completely possible to be using one RVM set in RubyMine (check the Ruby Interpreter in SDK and Gems Preferences to see which one you're using) and an entirely different RVM in Terminal (the command "RVM info" should get you the version you're using). If those don't match, you could very well get different results from both RubyMine and Terminal, even when running exactly the same commands.
My solution to this problem was to carefully ensure that both of my environments matched. I think you can set RVM defaults by typing "rvm default" plus the version you want to default to. That way both your Terminal and RubyMine environments match.
Lastly, be aware that RubyMine allows more than one version of a Gem to be installed at the same time. So, if you're getting an error that a Gem is failing because some dependency requires a specific version, you can tell RubyMine to install multiple versions. Do this thru the SDK manager, select the Gem, then click "Select Versions".
Hopefully some of this information applies to your issue. I sort of did the shotgun approach, because I'm not really sure what is causing your error, but maybe some of this can put you on the right path. One final note would be this: Use your Gemfile to control Gem versions, if need be. I've spent hours of frustration over broken dependencies, only to discover that the reason for the break was me telling RubyMine to update all my Gems to the latest version. The latest version of a particular Gem isn't necessarily backwards compatible with previous versions, and blindly updating Gems can cause huge problems.
Asaf, you should delete rake.gemspec and run gem install rake to get problem fixed