# Ruby & flash

**URL:** <https://www.ruby-forum.com/t/ruby-flash/191487>\
**Category:** Ruby\
**Created:** [July 13, 2010, 12:35pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487 "2010-07-13T12:35:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andromeda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@andromeda](https://www.ruby-forum.com/u/andromeda)\
**Post date:** [July 13, 2010, 12:35pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487/1 "2010-07-13T12:35:04Z")

</div>

Hello there.  
we do have a problem with a ruby site we are forced to maintain but have  
absolutely no experience nor knowledge about the framework and the  
service structures. I’d really appreciate some patience here, because  
the infos I’m going to publish are going to be incomplete, nevertheless  
some advise would be much appreciated!  
We are talking about one website on a linux (CentOS 5) server  
administered with plesk 8. There’s ruby 1.8.5-5.el5\_2.6 installed.

Now, the whole frontend is flash with hundreds of as-classes dealing  
with the variables and the db-connections - i guess. The task is quite a  
simple one:  
. we need to extend one table in the db (mysql) and the corresponding  
select field in the backend - done  
. that value is to be saved via the backend in the db - done.  
. the as-files are to be extended accordingly to define the very new  
values passed from the db - done.

Problem: The flash-frontend doesn’t output the new strings - a blank  
output is shown. Like we never updated the actionscript-files. Even  
after a restart of the apache service!

My guess is, that files are being cached or mirrored in a way.

Anyone any idea what to do, where to start?

Thank you!  
Andro

---

<div class="post-metadata">

**Author:** ![andromeda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@andromeda](https://www.ruby-forum.com/u/andromeda)\
**Post date:** [July 13, 2010, 5:48pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487/2 "2010-07-13T17:48:08Z")

</div>

Ce Vau wrote:

> with the variables and the db-connections - i guess. The task is quite a
> 
> My guess is, that files are being cached or mirrored in a way.
> 
> Anyone any idea what to do, where to start?
> 
> Thank you!  
> Andro

I’ll ask a dumb question: did you rebuild the .swf after changing the  
.as files?

How is the AS code talking to the database? If it’s just getting some  
url, then what happens if you use curl or wget on that url?

---

<div class="post-metadata">

**Author:** ![andromeda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@andromeda](https://www.ruby-forum.com/u/andromeda)\
**Post date:** [July 13, 2010, 5:55pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487/3 "2010-07-13T17:55:10Z")

</div>

Joel VanderWerf wrote:

> Ce Vau wrote:
> 
> > with the variables and the db-connections - i guess. The task is quite a
> > 
> > My guess is, that files are being cached or mirrored in a way.
> > 
> > Anyone any idea what to do, where to start?
> > 
> > Thank you!  
> > Andro
> 
> I’ll ask a dumb question: did you rebuild the .swf after changing the  
> .as files?
> 
> How is the AS code talking to the database? If it’s just getting some  
> url, then what happens if you use curl or wget on that url?

swf was not rebuilt. Didn’t see the need… the swf is interacting with  
the data only through the .as files.

Now secondly: I’m not sure how the AS is getting the db-values, but it  
happens - I can tell, because changing the value in the database  
produces the empty output on the site. That can only mean, that the  
value is passed in the output rendering process, but the string defined  
to the value that is supposed to show never makes it to the swf file in  
the frontend.

---

<div class="post-metadata">

**Author:** ![andromeda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@andromeda](https://www.ruby-forum.com/u/andromeda)\
**Post date:** [July 13, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487/4 "2010-07-13T19:08:59Z")

</div>

Ce Vau wrote:

> > I’ll ask a dumb question: did you rebuild the .swf after changing the  
> > .as files?
> > 
> > How is the AS code talking to the database? If it’s just getting some  
> > url, then what happens if you use curl or wget on that url?
> 
> swf was not rebuilt. Didn’t see the need… the swf is interacting with  
> the data only through the .as files.

That’s a problem. Try rebuilding using the flex compiler (mxmlc). The  
.swf is compiled from the .as (plus other things).

> Now secondly: I’m not sure how the AS is getting the db-values, but it  
> happens - I can tell, because changing the value in the database  
> produces the empty output on the site. That can only mean, that the  
> value is passed in the output rendering process, but the string defined  
> to the value that is supposed to show never makes it to the swf file in  
> the frontend.

If you know so little about how your program works, why do you assume  
there is a ruby-related issue?

---

<div class="post-metadata">

**Author:** ![andromeda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@andromeda](https://www.ruby-forum.com/u/andromeda)\
**Post date:** [July 13, 2010, 8:09pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487/5 "2010-07-13T20:09:08Z")

</div>

Joel VanderWerf wrote:

> Ce Vau wrote:
> 
> > > I’ll ask a dumb question: did you rebuild the .swf after changing the  
> > > .as files?
> > > 
> > > How is the AS code talking to the database? If it’s just getting some  
> > > url, then what happens if you use curl or wget on that url?
> > 
> > swf was not rebuilt. Didn’t see the need… the swf is interacting with  
> > the data only through the .as files.
> 
> That’s a problem. Try rebuilding using the flex compiler (mxmlc). The  
> .swf is compiled from the .as (plus other things).

I have no idea how to do that. I guess I have to try to find someone who  
does.

> > Now secondly: I’m not sure how the AS is getting the db-values, but it  
> > happens - I can tell, because changing the value in the database  
> > produces the empty output on the site. That can only mean, that the  
> > value is passed in the output rendering process, but the string defined  
> > to the value that is supposed to show never makes it to the swf file in  
> > the frontend.
> 
> If you know so little about how your program works, why do you assume  
> there is a ruby-related issue?

I know that this is a ruby forum, but also wasn’t saying that it’s a  
ruby problem. I’m more used to php asp .net programming and do know that  
in order to see effects of adjusted classes or scripts (i.g. dlls) on an  
iis for example I need to restart/work with services. That’s why I tried  
to find help here - hoping to find people who can point me in the right  
direction ruby-wise.

---

<div class="post-metadata">

**Author:** ![andromeda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/977dab/32.png) [@andromeda](https://www.ruby-forum.com/u/andromeda)\
**Post date:** [July 13, 2010, 9:59pm UTC](https://www.ruby-forum.com/t/ruby-flash/191487/6 "2010-07-13T21:59:20Z")

</div>

After reading your problem. I would recommend a couple of small  
ref-cardz  
as a place to start.

> **[Very First Steps in Flex - DZone Refcardz](https://dzone.com/refcardz/very-first-steps-flex)**
>
> Flex is the focus of this DZone Refcard. Firstly, a simple “Hello, World” application which will help familiarize readers with the Flex Builder tool and programming model. Secondly, well go into depth about how to connect Flex applications to...

[http://refcardz.dzone.com/refcardz/very-first-steps-flex](http://refcardz.dzone.com/refcardz/very-first-steps-flex)

> **[Flexible Rails: Flex 3 on Rails 2 - DZone Refcardz](https://dzone.com/refcardz/flexible-rails)**
>
> Flexible Rails: Flex 3 on Rails 2 Refcard provides an overview of Flex and Rails and how they can be used together. Then you’ll learn how to build a simple Flex + Rails application using XML over HTTPService, in order to have the Flex client talk to...

[http://refcardz.dzone.com/refcardz/flexible-rails](http://refcardz.dzone.com/refcardz/flexible-rails)If you need anymore  
help  
i will be happy to point you to a couple of books on this subject.

## Thanks,

Allan D.  
Member of NetBeans Dream Team  
[http://wiki.netbeans.org/NetBeansDreamTeam](http://wiki.netbeans.org/NetBeansDreamTeam)  
Lead Developer, nbPython  
[http://wiki.netbeans.org/Python](http://wiki.netbeans.org/Python)  
[http://codesnakes.blogspot.com](http://codesnakes.blogspot.com) (my blog)  
Co-Chair, CajunJUG  
[http://www.cajunjug.org](http://www.cajunjug.org)
