Topic: Problems with variables upon deployment

Hi guys,
I have a small problem. It's very strange. I am trying to get my rails app off my computer and onto a server for all to see. It's going quite well except for one thing. One controller to be precise.

All other controllers work just fine, but this one controller will not pass variables on to the view AT ALL! As you can imagine, this is a pain.

For example, on every controller in every action I have a variable called @page_title. This gets passed through to the view and used both in the <title> tag and an <h2> tag in the body. It works fine for all controllers apart from this one. I've tried scrapping the controller and starting with a blank file and even then it doesn't work!

Has anyone else had a problem like this before and how did you resolve it? Or even if you haven't had this problem but know how to fix it?

Please help! Thanks smile

Edit: Oh yeah and it won't follow redirect_to commands either. It all works fine on my local machine!

Last edited by maktheyak (2007-03-05 20:13:03)

Re: Problems with variables upon deployment

That's very strange. What's the controller called? Perhaps there's a name conflict or something.

Railscasts - Free Ruby on Rails Screencasts

Re: Problems with variables upon deployment

Very strange indeed. The controller is called imageman (so imageman_controller.rb) - not exactly a prime candidate for likely conflicts I wouldn't have thought but there are many things I have yet to learn!

Re: Problems with variables upon deployment

Heh, yeah, no name conflict there.

Is there anything that might make this controller unique from the others? Perhaps some config somewhere? I'm having trouble thinking of anything that might cause this to happen and I don't think the usual debug techniques will work here. What I would do is simplify everything. Make the controller action only do one thing (such as set an instance variable) and make the RHTML file only do one thing: display it. If that doesn't work, try renaming the action and the instance variable to rule out possible conflict there. Double check your path and file names to make sure it is linked up correctly. Feel free to post the code here too.

Railscasts - Free Ruby on Rails Screencasts