qt 4.8.0 compatibility error: "Can't load , the file may be broken." #101
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I keep getting this error with jasmine-headless-webkit, regardless of which project I try to use it in. I've tried it in our current project. I tried it on two online projects designed to show off jasmine and it didn't work with those either. For example, the error above came from adding jasmine-headless-webkit to: https://github.com/froots/backbone-jasmine-examples
At this point, I've exhausted every idea I have for debugging this. I've delved as far into the gem as I could and still be futzing around with ruby code. I don't even know where to begin,especially since the error message doesn't say which file it failed on.
My computer is a 17" MBP running OS X Lion, 10.7.2
Here are the contents of the file emitted by the
--runner-out
option:I was able to get the tests from the Git repo running on my system (10.6, 1.9.2-p280 and 1.9.3-rc1) using both the standalone Gem and by adding the Gem to the Gemfile. When I get back from vacation, I can have a friend with Lion determine if it's a problem with that version of the OS.
What version of Qt did you install?
I installed
qt 4.8.0
using brew and the compile from source options,$ brew install qt --build-from-source
Also, I tried this with
ruby-1.9.2-p290
as well and got the same issue. Let me know if there is anything else I can try out here. I'm super anxious to try this out. I already have JSLint and LiveReload set up, so it's the remaining piece left to implement in Guard to get fully automated development goodness.Thanks!
Qt 4.8 may be the problem. I didn't even know it was out and haven't had any chance to see what changed with regards to Qt WebKit. Try a 4.7.x line and see if that makes it work.
Weird. I tried checking out the qt formula for 4.7.4 and it installed but some how it didn't work. Going to try to install qt 4.7.4 from source now.
It says 4.7.4 is installed, but the error references qt 4.8.0, even though I ran
brew uninstall qt
before I installed 4.7.4You'll have to reinstall the gem, if you haven't done so already.
Worked. You're awesome. Thanks. I'm going to leave this open as an issue and rename it to QT 4.8.0 compatibility.
I wish I could follow an issue without having to comment on it: +1
@christiannelson You can. On an issue you haven't commented on, just look for this text below the "Comment on this issue" button:
"Notifications for new comments on this Issue are off. Enable notifications for this Issue"
@malandrew thanks!
Turns out Qt 4.8's WebKit widget implementation doesn't let you play fast an loose with file paths for loading local files. I was feeding it
runner.html
when it at least needed./runner.html
or, better yet,/full/path/runner.html
. Latest commit should fix that issue in 4.8 and 4.7, since it's actually an issue with what the Ruby wrapper sends to the C++ runner. (Did clean up just what gets sent into the WebKit widget, just to make it real clear what's going on).Just tested on 4.7.4 on my work machine. Works great there.
John,
Didn't work over here. I force removed all qt versions from my system and reinstalled. Then I removed all the installed gems from the rvm folder and I'm still getting the error.
I'm going to try installing qt 4.8.0 from the source now to see if that resolves this. I also realized that I didn't have the gem file pointing to the master branch on this github repo. Out of curiosity, how long does it take for changes made here to make it to rubygems.org?
John,
Got it working. I had to build qt from source using:
brew install qt --build-from-source
Then I had to clone and build the gem in my rvm gems folder and install it from the resulting pkg/ folder using the instructions here: http://stackoverflow.com/questions/2823492/install-gem-from-github-branch
In other words, it works fine with qt 4.8.0, but for the time being the current :master branch isn't available from rubygems.org and putting
gem 'jasmine-headless-webkit', :git => 'git://github.com/johnbintz/jasmine-headless-webkit.git', :branch => 'master
in the gem file doesn't seem to be working for some reason.I found that I had to remove a directory to get :git bundler deps to rebuild. Using rvm, it was
~/.rvm/gems/ruby-1.9.3-p0@<gemset>/bundler/gems/jasmine-headless-webkit-<sha>
. Otherwise, bundler wasn't rebuilding the gem for me because it thought there was an already suitable version around.I'm still having this issue: i've followed the fixes above, built qt 4.8.0 from source on lion, cleaned out all previous versions of jasmine-headless-webkit, installed the latest version of jasmine-headless-webkit from github, and still, getting the "Can't load , the file may be broken" error. Any ideas?
No idea off the top of my head, @cromulus. I believe thorough debugging of the C++ runner on your system would be the only way. I don't have the time to look deeper into this myself right now, so if you want, I would suggest looking through the files in
ext
and see if you can start to pinpoint where filenames aren't being passed along properly on your setup. It would be best to usebundle exec guard
to recompile everything and re-run tests automatically on your setup.I just had the same issue and installing from the git branch resolved it. Thanks!
I was able to avoid having to install the qt from source (which takes forever).
The root of the problem is twofold:
The morale of the story? use 'bundle exec' (in this case: 'bundle exec jasmine-headless-webkit') any time you have git-sourced gems in your Gemfile.
I had the same issue, but installed qt 4.8 (not from source just 'brew install qt') then after the 4.8 install I just ran 'sudo gem install jasmine-headless-webkit' again over top again. I thinks its the order in which you install. So for me I did the following steps
sudo gem install jasmine-headless-webkit
brew install qt
sudo gem install jasmine-headless-webkit
Now it works.
I confirm thtat the solution posted by @hawknewton works.
I had qt 4.8 previously installed, and just by specifying the git source for the gem did the trick. No need to reinstall qt whatsoever.
👍