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

Where my css is generated? #48

Closed
suissa opened this issue Oct 10, 2013 · 6 comments
Closed

Where my css is generated? #48

suissa opened this issue Oct 10, 2013 · 6 comments

Comments

@suissa
Copy link

suissa commented Oct 10, 2013

I'm trying in some css but don't throw any error and dont generate any css.

My command:
phantomjs ratiocinate.js http://javascriptbrasil.com/wp-content/plugins/crayon-syntax-highlighter/themes/classic/classic.css

@agats
Copy link

agats commented Oct 10, 2013

Hi suissa,

css-ratiocinator is expecting a html file and in your command it is passing a css file.

Try this command phantomjs ratiocinate.js http://javascriptbrasil.com/

@suissa
Copy link
Author

suissa commented Oct 10, 2013

Oh sorry! I tried with other site and returns an error, but whe i tried with google.com worked.

//javascriptbrasil.com/
^C% css-ratiocinator|master⚡ ⇒ phantomjs ratiocinate.js http://fri.la
TypeError: 'undefined' is not an object (evaluating '$.lr.api')

http://signup.fri.la/ignition-current.min.js:246
http://signup.fri.la/ignition-current.min.js:253
vendor/jquery-1.8.2.js:605
http://signup.fri.la/ignition-current.min.js:253
http://signup.fri.la/ignition-current.min.js:253
http://signup.fri.la/ignition-current.min.js:249
http://signup.fri.la/ignition-current.min.js:245
http://signup.fri.la/ignition-current.min.js:245
http://signup.fri.la/ignition-current.min.js:245
http://signup.fri.la/ignition-current.min.js:244
^C% css-ratiocinator|master⚡ ⇒ phantomjs ratiocinate.js htt

@agats
Copy link

agats commented Oct 10, 2013

I tried opening http://javascriptbrasil.com with just phantomjs. And it looks like phantomjs was able to open the page.

Here is what I did,
-Created a file debugging.js

console.log('Loading a web page');
var page = require('webpage').create();
var url = 'http://javascriptbrasil.com/';
debugger;
page.open(url, function (status) {
    debugger;
    //Page is loaded!
    phantom.exit();
});

-And ran the command
phantomjs --remote-debugger-port-9000 debugging.js

-Opened the phantomjs debugger in Chrome

@begriffs
Copy link
Owner

What OS and phantom version are you using?

Using the domain http://fri.la I reproduced the issue when running ratiocinator on a Heroku instance

However I get no error when I run ratiocinator on my laptop

  • phantomjs 1.9.1
  • Mac OS X 10.8.5

@agats
Copy link

agats commented Oct 11, 2013

I was also able to reproduce the issue on the domain http://fri.la.

  • phantomjs 1.9.0
  • Ubuntu 12.04
  • node 0.10.20

@begriffs
Copy link
Owner

Looks like the problem was that I was unconditionally inserting a certain version of jQuery which conflicted with what http://fri.la uses. Fixing this issue uncovered another: the page content is loaded with javascript, so we need to wait for the document to finish. I fixed this as well. Pull the newest master and give it a try.

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

3 participants