Flex and Rails Part 2: Extra Time
May 13th, 2006 In honour of today's FA Cup Final (What a Game!!) here is an extra time on the last tutorial. There was some questions on how to productionise the Flex application. If the flex application is served from the same domain as your Rails application you can modify the HTTPService URLs to just point to your controller with a relative path. From
To
You can then compile the application and move the files from the Flex bin directory into the rails publicdirectory.
3 Responses to “Flex and Rails Part 2: Extra Time”
Sorry, comments are closed for this article.
May 13th, 2006 at 09:37 PM
Stu,
What an amazing game!!! Instanbal again. Stevie was Captain Marvel again. Don’t know what happened to our defence. It’s like they never turned up today.
June 2nd, 2006 at 12:11 PM
Idea!... How about generating MXML code directly from Rails… sort of like rxml templates, but with MXML output … maybe a FlexRails plugin or gem? I haven’t put alot of thought into it, or tried to see if it’ll work, but I think it would be great to be able to render MXML output directly from within Rails. If anybody has any helpful thoughts, drop me an e-mail. By the way, great job!
June 21st, 2006 at 03:57 PM
Hi Stuart,
Being lazy I don’t want to even have to copy the the files from the bin directory into the rails app public directory. So…
1. Check that all HTTPService URLs are relative as in your post.
2. Set Flex to build to the public directory in project properties/Flex Build Path/Output folder.
3. Set the url the Flex will use for running and debugging – – Open up the Debugging Configurations form (run/debug/other) – Under “URL or path to launch” uncheck the Use defaults checkbox and enter the URL to your local Webrick server. On my project this will look like: “http://localhost:3000/ProductManagement-debug.html” and “http://localhost:3000/ProductManagement.html”
Each developer will probably have to change the Flex build path, but we won’t have to mess about with HTTPService URLs in the source in between development and deployment.