# A question about routing

**URL:** <https://www.ruby-forum.com/t/a-question-about-routing/113905>\
**Category:** Rails\
**Created:** [September 6, 2007, 1:37am UTC](https://www.ruby-forum.com/t/a-question-about-routing/113905 "2007-09-06T01:37:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Welch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@Jim\_Welch](https://www.ruby-forum.com/u/Jim_Welch)\
**Post date:** [September 6, 2007, 1:37am UTC](https://www.ruby-forum.com/t/a-question-about-routing/113905/1 "2007-09-06T01:37:28Z")

</div>

Hi all,

I have recently bought a site template that I’ve tacked on to my rails  
application. The template came with a flash movie that plays at the  
top of each page, displaying the site’s name and a few words of the  
user’s choosing. The template’s files are stored in the /public  
directory as follows:

/public/flash.txt #This is the text displayed in the flash movie  
/public/picts/ # a directory where the templates pictures and gif  
formatting files are stored  
/public/flash/logo.fla  
/public/logo.swf  
/javascripts/header.js # This script launches the flash movie at the  
top of a page

I am using the default routing for the rails application.

If I enter a URL in a browser that matches a controller and gives  
no :action or :id parameters then the flash movie works just fine.  
For instance: [http://www.myapp.com/controller](http://www.myapp.com/controller)

If I enter anything more explicit than the above (i.e.  
[应用宝官网-全网最新最热手机应用游戏下载](http://www.myapp.com/controller/index) or  
[应用宝官网-全网最新最热手机应用游戏下载](http://myapp.com/controller/list/15))  
then the movie will not play. On inspecting the errors in the  
development log, I have the following:

Processing LoginController#picts (for 127.0.0.1 at 2007-09-05  
16:52:13) [GET]  
Session ID: ed449af214e04296229e540d2ae277ae  
Parameters: {“format”=\>“gif”, “action”=\>“picts”, “id”=\>“menu”,  
“controller”=\>“login”}

ActionController::RoutingError (no route found to match “/login/  
flash.txt” with {:method=\>:get}):

I would appear that the flash movie is requesting files from the  
server and that the server is not understanding the requests.

Can anyone point in in the right direction to solving this problem?

Many thanks for any help.  
Jim

---

<div class="post-metadata">

**Author:** ![Jim\_Welch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@Jim\_Welch](https://www.ruby-forum.com/u/Jim_Welch)\
**Post date:** [September 6, 2007, 6:04am UTC](https://www.ruby-forum.com/t/a-question-about-routing/113905/2 "2007-09-06T06:04:51Z")

</div>

Jim Welch wrote:

> formatting files are stored
> 
> ActionController::RoutingError (no route found to match “/login/  
> flash.txt” with {:method=\>:get}):
> 
> I would appear that the flash movie is requesting files from the  
> server and that the server is not understanding the requests.
> 
> Can anyone point in in the right direction to solving this problem?
> 
> Many thanks for any help.  
> Jim

We need to see the part of your template where you are embedding the  
Flash object. I’m guessing you need to give an absolute path in there  
somewhere instead of a relative one.

–  
Michael W.

---

<div class="post-metadata">

**Author:** ![Jim\_Welch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7feea3/32.png) [@Jim\_Welch](https://www.ruby-forum.com/u/Jim_Welch)\
**Post date:** [September 6, 2007, 10:29am UTC](https://www.ruby-forum.com/t/a-question-about-routing/113905/3 "2007-09-06T10:29:16Z")

</div>

Hi Michael,

Here is the line in my layout that calls the header javascript file:

But I have aslo tried the following:

\<%= javascript\_include\_tag “header” %\>

which gives me exactly the same behaviour.

Here is the code in the header.js file, which is kept in /public/  
javascripts/:

Please let me know if there is anything else that you would find  
helpful in solving this problem.

Many thanks,  
Jim
