Created
March 4, 2015 15:31
-
-
Save jordanandree/3e6d37ce7aa68ed6fa43 to your computer and use it in GitHub Desktop.
Revisions
-
jordanandree revised this gist
Mar 4, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ There is a bug in PhantomJS on Mac OS X that doesn't render an HTML page as selectable text. <del>It will be fixed in PhantomJS 2.0</del>, so for now you'll have to apply a patch when installing with Homebrew. First, update homebrew formulae: ``` -
jordanandree created this gist
Mar 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ There is a bug in PhantomJS on Mac OS X that doesn't render an HTML page as selectable text. <del>It will be fixed in PhantomJS</del> 2.0, so for now you'll have to apply a patch when installing with Homebrew. First, update homebrew formulae: ``` $ brew update ``` If you already have PhantomJS installed, then remove it: $ brew uninstall phantomjs Next, the PhantomJS formula needs to be edited to apply a patch that fixes native text rendering in Mac OS X: If, you previously had 2.0 installed, you'll need to rollback to 1.9.8: ``` $ cd `brew --prefix` $ git checkout 9089836 # 1.9.8 release ``` Edit the Formula ``` $ brew edit phantomjs ``` Add these lines after any other patches blocks and before the def install method: ``` patch do url "https://github.com/ariya/phantomjs/commit/0663263bfa748b0933d7eff4b5e49d9ed97bcc84.diff" sha1 "ac0f7f967d8b5a3a49c8f6654f8182ffb99391f5" end ``` Finally, reinstall PhantomJS from source via homebrew and go do something else since your computer will be at 100% CPU for about 30 minutes: ``` $ brew install phantomjs --build-from-source ```