After pulling down an existing Rails project to my local machine, running the test suite throws an error when trying to run our feature tests which use the capybara-webkit gem. The tests run fine on all the other dev machines, as well as Codeship, so it has been narrowed down to my machine.
The first error when running the specs:
dyld: Library not loaded: #rpath/lib/QtWebKit.framework/Versions/4/QtWebKit
Referenced from: /Users/myname/.rvm/gems/ruby-1.9.3-p448myproject/gems/capybara-webkit-1.2.0/bin/webkit_server
Reason: image not found
From what I can gather, it's looking for the webkit_server executable and can't find it. So I did a search for it myself and found it here:
/usr/local/Cellar/qt/4.8.6/lib/QtWebKit.framework/Versions/4
So the discrepancy here is in #rpath from what I can tell. I guess the question here is where is #rpath pointing, and where should my QtWebkit.framework be?
The second error when running the specs:
An error occurred in an after hook
Errno::EADDRNOTAVAIL: Can't assign requested address - connect(2)
occurred at /Users/myname/.rvm/gems/ruby-1.9.3-p448#myproject/gems/capybara-webkit-1.2.0/lib/capybara/webkit/connection.rb:84:in `initialize'
I'm assuming this is a byproduct of the previous error, but have included it anyway.
So far, we've done a few other things to try and remedy the situation:
Removed and reinstalled Qt4 using Homebrew (via this post:
Error using capybara-webkit (really QtWebKit webkit_server) on MacOS X due to libpng version incompatibility)
Updated the capybara-webkit gem to 1.2.0 from 1.0.0
Verified that the output of which QMake makes sense (shows /usr/local/bin/QMake)
Reinstalled X11
Edit: Just installed Qt from source - No luck
After searched for a long time, I finally found that capybara-webkit version is the problem. So update your gem capybara-webkit should fix this. At least it solved my problem.
I've used the cheat code to increase the WEBKIT_SERVER_START_TIMEOUT constant time.
Capybara::Webkit.configure do |config|
config.class.parent::Connection.send(:remove_const,:WEBKIT_SERVER_START_TIMEOUT)
config.class.parent::Connection::WEBKIT_SERVER_START_TIMEOUT = 30
end
Related
I followed the install instructions for Flutter on OSX, and ended up with this error:
"Dart_NewStringFromUTF8 expects argument 'str' to be valid UTF-8."
Checking the github issues, this one seems to be closed but was not helpful in resolving. I have no weird characters in my file path.
I cannot find anything else on it that will resolve this error, nor do I know what/where to check to find out what is causing this. Anyone else ran into this issue on OSX?
I was able to fix this error by running flutter in verbose mode:
flutter doctor -v
This gave me clues on where the issue was on my machine. There was a directory with a non UTF-8 character and that tripped up the installation process. Renaming that directory solved the error.
I am trying to install capybara-webkit gem on my macbook (sierra 10.12.6) but I still have some problems. I installed Xcode, gt, I tried almost every solution but I think I made it even worse :(
Now the error is "Could not resolve SDK Path for 'macosx'". Full message is on link down.
Can someone help me? :-/
full error message
I'm trying to install webkit for Capybara, using the information provided here, but I'm getting an error.
Following the instructions I have tried to change the qmake.conf file in the Qt installation directory but I couldn't find the QMAKE_IDC parameter and I don't know where the following values should be placed:
QMAKE_RCC = $$[QT_INSTALL_BINS]$${DIR_SEPARATOR}rcc$${EXE_SUFFIX}
QMAKE_LFLAGS = -static-libgcc -static-libstdc++
The following error is what I got:
C:\Users\Deepzster\Desktop\app\app>gem install capybara-webkit
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby2.0.0/bin/ruby.exe -r ./siteconf20141118-9536-wfpmna.rb extconf.rb
Command 'qmake -spec win32-g++ ' not available
Makefile not found
I had the same problem. I had installed the latest version of Qt, which is version 5.3. I looked up the instructions on https://github.com/thoughtbot/capybara-webkit/wiki/Installing-Qt-and-compiling-capybara-webkit, and one of the instructions is to modify the qmake.conf file, and the edits are to be made after "the line beginning with QMAKE_IDC". However, this line wasn't available in my qmake.conf file.
Therefore, I installed the version stated in the instructions, which is version 4.8.5. Here's the link - http://download.qt-project.org/archive/qt/4.8/4.8.5/. I downloaded qt-win-opensource-4.8.5-mingw.exe (I'm on a Windows 7 64-bit machine).
The qmake.conf file in this version does have the line beginning with QMAKE_IDC, so I could edit it as required. I then followed the rest of the instructions up to step 10 on the link (I also tried step 11, but I got a 'make failed' error). I then went to the directory containing my Gemfile and entered
gem install capybara-webkit
and the installation was successful.
Make sure your qmake is added in system path, otherwise it will fail to install.
There is no qmake utility on your workstation, as indicated by this message:
Command 'qmake -spec win32-g++ ' not available
I may suggest you to install QT for Windows. If this already done here suggested readings.
Question Rephrase:
Can I configure my local web server to be connected to the public internet so that I can test my API calls locally?
Details: (edited)
I'm still looking for some help on this. It seems that there is a compatibility issue from what I can gather from many Google searches. Has anyone out there used the gem Proxylocal on a Windows machine? Did you need to perform any extra steps to get it to work because you were on a Windows machine?
I am using Ruby on Rails and Heroku for deployment.
I was pointed to Pow (pow.cx), but this only works on macs. I am running Windows 8. Does anyone have a suggestion for me? Thanks!
Update:
I was unable to install the proxylocal gem. I receive the following error upon entering gem install proxylocal in my command line prompt:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing proxylocal:
ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
make
generating decode-i386-mingw32.def
compiling decode.c
decode.c:3:24: fatal error: netinet/in.h: No such file or directory
compilation terminated.
make: *** [decode.o] Error 1
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bert-1.1.6 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bert-1.1.6/ext/bert/c/gem_make.out
And this is the contents of gem_make.out:
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
make
generating decode-i386-mingw32.def
compiling decode.c
decode.c:3:24: fatal error: netinet/in.h: No such file or directory
compilation terminated.
make: *** [decode.o] Error 1
Does anyone have an idea of what might be the issue here? I don't see any spaces in the paths I have my gems installed in, which seems to be a common cause to this error for a lot of people...
You can try the proxylocal gem
I was facing the same issue, but I found that, it's not proxylocal's problem, it's bert's problem, see the error log:
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bert-1.1.6 for inspection.
It's because with bert distribution, linux headers are being provided, I have posted here a solution for the same after testing it on my windows system. Please have a look and let me know, it you were able to solve it or not!
Hi I'm trying to do some basic messing around with capybara-webkit.
When I try to include the Capybara::DSL I get the following error
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/lib/QtGui.framework/Versions/4/QtGui
Reason: Incompatible library version: QtGui requires version 29.0.0 or
later, but libpng15.15.dylib provides version 21.0.0
/Users/brian/.rvm/gems/ruby-1.9.3-p374#rails3211/gems/capybara-webkit-0.14.2/lib/capybara/webkit/connection.rb:95:in
`initialize': Can't assign requested address - connect(2)
(Errno::EADDRNOTAVAIL)
Can anyone help? Confused.
Thanks
looks like it was an old edition of imagemagick that was the problem. Downloading latest version solved it.