Comments (16)
include the phantomjs-linux
gem in your Gemfile.. not sure why phantomjs.rb isn't properly adding it as a dependency.
oh, are you including teabag in a "development", or "asset" group in your Gemfile?
from teaspoon.
I am, in development and test groups. phantomjs-linux is in my Gemfile.lock.
from teaspoon.
hmm.. ok.. that's odd -- it's working for us (check our gemfile in this project) on travis-ci.
I do assume you're running on Linux, and if you say everything is being required correctly in your Gemspec I trust you.
If you can't find an easy solution (or it requires something on our end) please let us know.
And if all else fails, you can use selenium if you want -- https://github.com/modeset/teabag/wiki/Using-Selenium-WebDriver
from teaspoon.
Thanks for the near-instant responses. It looks like a result of running Ubuntu x64,
sudo apt-get install ia32-libs
seems to have fixed it. I guess the phantomjs-linux is 32bit.
from teaspoon.
Interesting to know. I think we probably need to add some info about installing phantomjs vs the phantomjs.rb gem on Linux but I don't think I know enough to write anything about it.
from teaspoon.
I just added some info to the readme and a wiki article.
I am literally one of the worst people to contribute information on the topic, so if you would like to contribute to the wiki article, that would be immensely appreciated: https://github.com/modeset/teabag/wiki/PhantomJS-on-Linux
Thanks for the heads up as well.
from teaspoon.
I've opened a bug on phantomjs.rb (westoque/phantomjs.rb#6), but it looks there's not much that can be done about it, sadly. It may be necessary to add the sub-version (phantomjs-linux or phantomjs-mac) to your gemfile manually. Is it possible to add a setting to teabag to allow you to specify the path to phantomjs or to use the system version?
from teaspoon.
When I understood what the issue was I looked into adding a "fallback" scenario to phantomjs.rb -- if neither gem was found, then the execution path could be specified, but I couldn't find an elegant solution.
I'll poke around more and let you know.
from teaspoon.
Ok, so no.. I don't have a good solution for this, but this adds the ability to override the phantomjs bin path.
So the problem I see with this is that it lacks the ability to keep this sort of override system specific -- you're on Ubuntu, I'm on OS X, we're both working on the same project.. we're screwed.. that's the down side to this implementation.
I would actually recommend doing this instead..
In an initializer that you add to gitignore:
require "phantomjs"
module Phantomjs
def get_executable
"your path"
end
end
from teaspoon.
Well, at least with this version you can switch on the platform, using RUBY_PLATFORM. So you don't really need to gitignore that initializer, if you have some standardization between developers. The ideal solution would be if the gemspec for phantomjs.rb could be evaluated at run-time - I guess this could be done by adding it to your gemfile next to teabag and pointing to the github version, but that leaves you no version control.
Thanks for your quick responses.
from teaspoon.
Just to clarify, you want to keep the phantomjs_bin configuration?
If that's the case I'll make the changes that Jay suggested, and provide the information on the wiki article.. It will likely not get documented anywhere but on the wiki -- as it raises the chances of shooting one's self in the foot.
from teaspoon.
Your call, of course. I think it's nice to allow usage of an already existing phantom install, but on the other hand, if it's going to install phantomjs.rb anyway, I'm not sure it matters.
from teaspoon.
Updated wiki, and released the change we discussed. Hopefully that will make it nicer for others.
Thanks again for your help.
from teaspoon.
We've provided a better interface for this now.. The PHANTOMJS_BIN env allows you to specify your own installed version -- this also improves flexibility on CI (specifically Travis CI). You can specify this globally in your environment, or you can specify it when you run the rake task or teabag command.
from teaspoon.
Hey guys, thanks for this great library. I hope you don't mind that I took the liberty of adding back the wiki page on phantomjs. It was still linked from the main readme file and I kept wishing it was there as I fought with this exact problem for way too long. :-)
env variable is a nice solution by the way.
from teaspoon.
Thank you, much appreciated.. I also added the link back to the wiki home.
from teaspoon.
Related Issues (20)
- Add Support for Istanbul-nyc HOT 2
- javascript_include_tag needs to support new nonce: true option HOT 9
- New release HOT 3
- teaspoon 1.2.0 causes Teaspoon::EnvironmentNotFound error HOT 13
- Selenium Timeout with Rails 6 HOT 10
- Coverage output path ignored in 1.2.0 HOT 3
- Reload window on every jasmine spec in teaspoon HOT 1
- Browser console output should be logged to log/development.log HOT 2
- TypeError: undefined is not an object (evaluating 'window.SpreePaths.mounted_at') HOT 3
- [ANN] Looking for a new maintainer HOT 2
- Ruby 3.0.0 HOT 2
- Migrate from Travis to use Github Actions HOT 1
- Support newer version of Jasmine
- How to use headless chrome with Teaspoon
- Coverage when specs are in test/dummy HOT 1
- Is teaspoon-mocha actively managed? HOT 3
- Sprockets 4 support
- Not getting coverage reports after upgrading from rails 5 to rails 6 HOT 3
- Code coverage not working with Puma 6.2 HOT 5
- Teaspoon fails to load webrick on Rails 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teaspoon.