Giter Club home page Giter Club logo

Comments (16)

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

pschuegr avatar pschuegr commented on August 16, 2024

I am, in development and test groups. phantomjs-linux is in my Gemfile.lock.

from teaspoon.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

pschuegr avatar pschuegr commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

pschuegr avatar pschuegr commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

pschuegr avatar pschuegr commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

pschuegr avatar pschuegr commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

Updated wiki, and released the change we discussed. Hopefully that will make it nicer for others.

Thanks again for your help.

from teaspoon.

jejacks0n avatar jejacks0n commented on August 16, 2024

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.

namick avatar namick commented on August 16, 2024

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.

jejacks0n avatar jejacks0n commented on August 16, 2024

Thank you, much appreciated.. I also added the link back to the wiki home.

from teaspoon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.