[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Problem with Rails and embedded SVG?

Williams, Chris

12/2/2004 5:06:00 PM

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
2 Answers

Tobias Luetke

12/2/2004 6:08:00 PM

0

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.



On Fri, 3 Dec 2004 02:06:28 +0900, Williams, Chris
<cawilliams@crt.xerox.com> wrote:
> 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
>
>


--
Tobi
http://blog.le...


Florian Gross

12/2/2004 7:11:00 PM

0

Williams, Chris wrote:

> 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?