Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to choose which phantomjs they use #140

Closed
ivanistheone opened this issue Dec 21, 2017 · 1 comment
Closed

Allow users to choose which phantomjs they use #140

ivanistheone opened this issue Dec 21, 2017 · 1 comment

Comments

@ivanistheone
Copy link
Contributor

Description

I ran into problems while running https://github.com/learningequality/sushi-chef-teachengineering
because phantomjs version on vader is 1.9.x
but chef script depends on phanomjs 2.1.x

Workararound

Download phantomjs2.1.1 to chef dir

cd /data/sushi-chef-teachengineering
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2

then monkey patched venv/lib/python3.5/site-packages/ricecooker/utils/downloader.py from

    try:
        if loadjs:                                              # Wait until js loads then return contents
            driver = driver or webdriver.PhantomJS()

to

    try:
        if loadjs:                                              # Wait until js loads then return contents
            driver = driver or webdriver.PhantomJS('/data/sushi-chef-teachengineering/phantomjs-2.1.1-linux-x86_64/bin/phantomjs')

Feature spec

Ricecooker utils downloader could use environement variable like PHANTOM_JS_BINARY to optionally specify a particular binary we want to use.

ivanistheone added a commit to ivanistheone/ricecooker that referenced this issue Jan 16, 2018
ivanistheone added a commit to ivanistheone/ricecooker that referenced this issue Feb 5, 2018
jayoshih added a commit that referenced this issue Feb 6, 2018
@ivanistheone
Copy link
Contributor Author

Fixed in #144

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant