I am having a lot of troubles with this issue the past few days and I would like any suggestions to try to solve this.
I want to generate a PDF that has a really big report table from a given HTML (I am not using wicked_pdf plugin because the only thing I want from the HTML is that table. that being said I preferred to use the prawnto plugin).
So what I am trying to do is parse the HTML using Nokogiri. I did something like this in my reports controller: @doc = Nokogiri::HTML(open(“http://localhost/reports/1”)). The problem is that if I do this it gives me a Timeout error. I can parse almost any webpages that are not inside my own project.
Well, my questions are: There is a better approach than doing this? Is there someway that I can use open-uri library to open my own project?
I know that I could use the prawnto to generate a table for the report, but the thing is that there are a lot of kinds of reports and for each one there is a kind of calculation. So I am trying to bypass this by parsing the HTML.
Thanks in advance.