Problem with Rails and embedded SVG?

  • Thread starter Williams, Chris
  • Start date
W

Williams, Chris

------_=_NextPart_001_01C4D891.53C23CB4
Content-Type: text/plain

I've gone and bit the bullet and used SVG::Graph to generate my charts
within Rails. (The other solutions all seemed to not work on windows or need
perl or something else behind them to generate graphs. I know everyone hates
Windows, but we could use some graphing libraries that work on more than
Linux!)

Now, I'm running into something weird. When I try to embed the SVG in the
rhtml using either the embed or object tags the SVG never actually loads -
there's a nice big box where the chart should be and IE loads the page for a
very long time.

When I open the SVG file itself in IE, it displays fine.
When I create a static html page on my HD that contains the exact same
contents as the generated .rhtml page, it works fine.
When I load the same static page through Apache, it works fine.

Has anyone run into this when trying to embed SVG? Seeing as how I can view
the page fine with static html I'm guessing this is some weird problem with
Rails.

Thanks,
Chris

------_=_NextPart_001_01C4D891.53C23CB4--
 
T

Tobias Luetke

does your rails run on localhost ?

Maybe its a permission problem and IE only shows the SVG in its
trusted localhost domain.

In any case, rails magic stops after sending data to the browser. This
basically cannot be a rails problem.
 
F

Florian Gross

Now, I'm running into something weird. When I try to embed the SVG in the
rhtml using either the embed or object tags the SVG never actually loads -
there's a nice big box where the chart should be and IE loads the page for a
very long time.

When I open the SVG file itself in IE, it displays fine.
When I create a static html page on my HD that contains the exact same
contents as the generated .rhtml page, it works fine.
When I load the same static page through Apache, it works fine.

This sounds a lot like a Content-Type problem. Can you compare the
Content-Type that is used when you do this with a static page on Apache
versus the dynamic one via .rhtml?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top