<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Andkrup&#039;s Blog</title>
	<atom:link href="http://andkrup.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://andkrup.wordpress.com</link>
	<description>flash/flex/fdt and music and cooking</description>
	<lastBuildDate>Tue, 17 Jan 2012 08:25:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='andkrup.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Andkrup&#039;s Blog</title>
		<link>http://andkrup.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://andkrup.wordpress.com/osd.xml" title="Andkrup&#039;s Blog" />
	<atom:link rel='hub' href='http://andkrup.wordpress.com/?pushpress=hub'/>
		<item>
		<title>A3Tasks update</title>
		<link>http://andkrup.wordpress.com/2012/01/05/a3tasks-update/</link>
		<comments>http://andkrup.wordpress.com/2012/01/05/a3tasks-update/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 21:41:00 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Ant]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[a3tasks]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[flash banner]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=325</guid>
		<description><![CDATA[Finally had some time to work on the A3Tasks! A3Tasks is a little set of Ant tasks for Flash development, made by me (hence the 3 A&#8217;s; Andkrups Ant tasks for Actionscript). Have a look at the repository at bitbucket (http://bit.ly/y63Nz4) and tell me what you think.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=325&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Finally had some time to work on the A3Tasks!</p>
<p>A3Tasks is a little set of Ant tasks for Flash development, made by me (hence the 3 A&#8217;s; Andkrups Ant tasks for Actionscript).</p>
<p>Have a look at the repository at bitbucket (http://bit.ly/y63Nz4) and tell me what you think.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/325/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/325/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=325&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2012/01/05/a3tasks-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Mxml</title>
		<link>http://andkrup.wordpress.com/2011/11/03/mxml/</link>
		<comments>http://andkrup.wordpress.com/2011/11/03/mxml/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 08:41:44 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[component framework]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mxml]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=304</guid>
		<description><![CDATA[Here&#8217;s a little neat trick I didn&#8217;t know &#8211; actually I haven&#8217;t used mxml that much so I don&#8217;t really know if this is trivial&#8230; It looks like a custom component, but actually it&#8217;s just a bread&#8217;n'butter MovieClip (or it&#8217;s a componentized MovieClip). It compiles as a swf with the mxml compiler, so flex applications... <a href="http://andkrup.wordpress.com/2011/11/03/mxml/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=304&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little neat trick I didn&#8217;t know &#8211; actually I haven&#8217;t used mxml that much so I don&#8217;t really know if this is trivial&#8230;</p>
<p><pre class="brush: as3;">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;fd:MovieClip xmlns:mx=&quot;http://ns.adobe.com/mxml/2009&quot;
    xmlns:fd=&quot;flash.display.*&quot;&gt;
&lt;/fd:MovieClip&gt;
</pre></p>
<p>It looks like a custom component, but actually it&#8217;s just a bread&#8217;n'butter MovieClip (or it&#8217;s a componentized MovieClip).</p>
<p>It compiles as a swf with the mxml compiler, so flex applications doesn&#8217;t have to use &lt;mx:Application/&gt; as root element.</p>
<p>In other words, you don&#8217;t have to use the flex component framework in order to use mxml to mark up your application layout.</p>
<p>Obviously, you will then have to manage the layout yourself.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/304/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/304/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/304/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=304&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/11/03/mxml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Converting fla files to xfl and vice versa to simplify copying publish settings</title>
		<link>http://andkrup.wordpress.com/2011/08/23/converting-fla-files-to-xfl-and-vice-versa-to-simplify-copying-publish-settings/</link>
		<comments>http://andkrup.wordpress.com/2011/08/23/converting-fla-files-to-xfl-and-vice-versa-to-simplify-copying-publish-settings/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 09:13:04 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Ant]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[fla]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[publish settings]]></category>
		<category><![CDATA[xfl]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=310</guid>
		<description><![CDATA[A really nice feature of the xfl flash file format is that (mostly) everything is text-based. Today I was working on a small landing page project with 1 fla file that is supposed to display small variations each week for the next 6 weeks. Some of the variations are changes in graphics, and the easiest... <a href="http://andkrup.wordpress.com/2011/08/23/converting-fla-files-to-xfl-and-vice-versa-to-simplify-copying-publish-settings/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=310&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A really nice feature of the xfl flash file format is that (mostly) everything is text-based.</p>
<p>Today I was working on a small landing page project with 1 fla file that is supposed to display small variations each week for the next 6 weeks. Some of the variations are changes in graphics, and the easiest solution was to create 7 different publish settings each with different compiler constants.</p>
<p>Copying a publish setting will copy all the current settings, bit for some reason, the library settings pointing to the swc files used, was not copied into the new publish setting.</p>
<p>Instead of tediously selecting and copying every compiler constants back and forth in 7 publish settings, it was much easier and faster to convert the fla file to xfl, and edit the PublishSettings.xml with a simple search and replace.</p>
<p>This way you can replace a text like this:</p>
<p><pre class="brush: xml;">
&lt;AS3ConfigConst&gt;CONFIG::FLASH_AUTHORING=&amp;quot;true&amp;quot;;CONFIG::debug=&amp;quot;false&amp;quot;;CONFIG::production=&amp;quot;true&amp;quot;;&lt;/AS3ConfigConst&gt;
</pre></p>
<p>with a text like this.</p>
<p><pre class="brush: xml;">
&lt;AS3ConfigConst&gt;CONFIG::FLASH_AUTHORING=&amp;quot;true&amp;quot;;CONFIG::debug=&amp;quot;false&amp;quot;;CONFIG::production=&amp;quot;true&amp;quot;;CONFIG::week34=&amp;quot;false&amp;quot;;CONFIG::week35=&amp;quot;false&amp;quot;;CONFIG::week36=&amp;quot;false&amp;quot;;CONFIG::week37=&amp;quot;false&amp;quot;;CONFIG::week38=&amp;quot;false&amp;quot;;CONFIG::week39=&amp;quot;true&amp;quot;;&lt;/AS3ConfigConst&gt;
</pre></p>
<p>in the PublishSettings.xml instead of risking carpal tunnel syndrome by copying each constant and clicking a lot of gui components in the gui.</p>
<p>Converting a fla file into a xfl file is as easy as unzipping the fla file &#8211; it&#8217;s a zip file with the *.fla extension. Converting back is rather obvious.</p>
<p>I use some ant tasks to streamline the process:</p>
<p><pre class="brush: xml;">
&lt;target name=&quot;Convert Xfl to Fla&quot;&gt;
&lt;zip destfile=&quot;${dir.flash}/${_flash.name}.fla&quot; basedir=&quot;${dir.flash}/${_flash.name}&quot; /&gt;
&lt;delete dir=&quot;${dir.flash}/${_flash.name}&quot; /&gt;
&lt;/target&gt;

&lt;target name=&quot;Convert Fla to Xfl&quot;&gt;
&lt;mkdir dir=&quot;${dir.flash}/${_flash.name}&quot; /&gt;
&lt;unzip src=&quot;${dir.flash}/${_flash.name}.fla&quot; dest=&quot;${dir.flash}/${_flash.name}&quot; /&gt;
&lt;delete file=&quot;${dir.flash}/${_flash.name}.fla&quot; /&gt;
&lt;/target&gt;


</pre></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=310&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/08/23/converting-fla-files-to-xfl-and-vice-versa-to-simplify-copying-publish-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Problems &amp; Errors encountered during Red5 installation on Ubuntu 11.04</title>
		<link>http://andkrup.wordpress.com/2011/08/10/problems-errors-encountered-during-red5-installation-on-ubuntu-11-04/</link>
		<comments>http://andkrup.wordpress.com/2011/08/10/problems-errors-encountered-during-red5-installation-on-ubuntu-11-04/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 08:53:52 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[red5]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[classnotfoundexception]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[problems]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=295</guid>
		<description><![CDATA[During a Red5 installation on Ubuntu 11.04 I encountered some problems and errors. The Red5 documentation does not really include the common problems that you may encounter while installing it. This can be attributed to Red5 previously requiring java, ant and subversion. Target System Ubuntu 11.04 Java Look up resources on how to install java... <a href="http://andkrup.wordpress.com/2011/08/10/problems-errors-encountered-during-red5-installation-on-ubuntu-11-04/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=295&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During a Red5 installation on Ubuntu 11.04 I encountered some problems and errors.</p>
<p>The Red5 documentation does not really include the common problems that you may encounter while installing it.</p>
<p>This can be attributed to Red5 previously requiring java, ant and subversion.</p>
<h3>Target System</h3>
<p>Ubuntu 11.04</p>
<h4>Java</h4>
<p><a href="http://www.google.com/search?q=install+java+ubuntu&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a#sclient=psy&amp;hl=en&amp;client=firefox-a&amp;hs=h1k&amp;rls=org.mozilla:en-US%3Aofficial&amp;source=hp&amp;q=install%20java%20in%20ubuntu%2011.04&amp;pbx=1&amp;oq=install%20java%20in%20ubuntu&amp;aq=1&amp;aqi=g5&amp;aql=1&amp;gs_sm=sc&amp;gs_upl=3106l3377l0l4941l3l2l0l0l0l0l158l310l0.2l2l0&amp;bav=on.2,or.r_gc.r_pw.r_cp.&amp;fp=a5190ac754b40f6f&amp;biw=1386&amp;bih=897&amp;pf=p&amp;pdl=300">Look up resources on how to install java on ubuntu 11.04</a>. The short version is that java isn&#8217;t included in Natty and Natty doesn&#8217;t know where to look for it, so you need to add a line in a file with an url so Natty can look up a java distribution and install it.</p>
<p>Anyway, this is how it went:</p>
<h2>Problems while installing Red5</h2>
<h2>Problems while testing Red5</h2>
<p>After creating the start-up scripts (can be found on the bottom of <a href="http://red5wiki.com/wiki/Installing_and_running_Red5">this page</a> ) Red5 hopefully starts up like we want it, and we want to test it.</p>
<p>But first we need to get acquainted with Red5 terminology in order to be able to google properly.</p>
<p>The Red5 version 1.0 installation contains client-side demo samples that require a server-side counterpart. Clients connect to a Red5 server application which you must install in the Red5 webapp folder.</p>
<h3>NetConnection.Connection.Failed</h3>
<p>Most of the time this status message was popping up because Red5 couldn&#8217;t install the server application correctly. Somehow I got this to work when:</p>
<ol>
<li>Red5 was started with sudo (see below), so file permissions is out of the picture</li>
<li>Connecting to the correct url</li>
</ol>
<p>Starting the Red5 server manually:</p>
<p><pre class="brush: bash;">
sudo /etc/init.d/red5 start &amp;gt; dev/null &amp;amp;
</pre></p>
<h2>Problems with the admin part</h2>
<p>In order to run the admin demo, you need to do this first:</p>
<ol>
<li>find the documentation about how to install the required parts (it&#8217;s here: <a href="http://wiki.red5.org/wiki/AppServer/Plugins">http://wiki.red5.org/wiki/AppServer/Plugins</a> &#8211; the page is aptly named so it&#8217;s easy to find) so you know what to do.</li>
<li>download the admin plugin (it&#8217;s here: <a href="http://red5.googlecode.com/files/AdminPlugin-1.0.zip">http://red5.googlecode.com/files/AdminPlugin-1.0.zip</a>)</li>
<li>download the admin.jsp into the webapp/root folder (from here: <a href="http://red5.googlecode.com/files/admin.jsp">http://red5.googlecode.com/files/admin.jsp</a>)</li>
<li>use the admin.jsp to create a new admin user.</li>
<li>input the correct text in the server input field (only the server name, like in an apache config without stating protocol and port)</li>
</ol>
<p>Installing on Natty can be done like so (assuming that you installed red5 in (/opt/red5):</p>
<p><pre class="brush: bash;">
cd /opt/red5/webapps/root
sudo wget http://red5.googlecode.com/files/AdminPlugin-1.0.zip
unzip AdminPlugin-1.0.zip
</pre></p>
<p>The documentation assumes that all required jar files are included in the zip file, but atm, they&#8217;re not&#8230;</p>
<h3>java.lang.ClassNotFoundException</h3>
<p>The name says it all &#8211; you need some classes, because either the Red5 team assumes you already have them installed or they just didn&#8217;t bother including them in the distribution.</p>
<p>This support ticket describesthe problem:</p>
<p><a href="http://code.google.com/p/red5/issues/detail?id=41">http://code.google.com/p/red5/issues/detail?id=41</a></p>
<p>While the ticket status is set to fixed, you would assume that the AdminPlugin-1.0.zip has been re-packaged, but at the time of writing you need to fetch the missing jar files from somewhere else:</p>
<p>Using jarfinder.com I found these compatible files:</p>
<ul>
<li>
<div><a title="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper/6.0.18/jasper-6.0.18.jar" href="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper/6.0.18/jasper-6.0.18.jar" rel="nofollow">http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper/6.0.18/jasper-6.0.18.jar</a></div>
</li>
<li>
<div><a title="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-jdt/6.0.18/jasper-jdt-6.0.18.jar" href="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-jdt/6.0.18/jasper-jdt-6.0.18.jar" rel="nofollow">http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-jdt/6.0.18/jasper-jdt-6.0.18.jar</a></div>
</li>
<li>
<div><a title="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-el/6.0.18/jasper-el-6.0.18.jar" href="http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-el/6.0.18/jasper-el-6.0.18.jar" rel="nofollow">http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-el/6.0.18/jasper-el-6.0.18.jar</a></div>
</li>
</ul>
<p>that you can download directly into the plugins folder like so (assuming that you installed red5 in (/opt/red5):</p>
<p><pre class="brush: bash;">
cd /opt/red5/plugins
sudo wget http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper/6.0.18/jasper-6.0.18.jar
unzip jasper-6.0.18.jar
sudo wget http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-jdt/6.0.18/jasper-jdt-6.0.18.jar
unzip jasper-jdt-6.0.18.jar
sudo wget http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/tomcat/jasper-el/6.0.18/jasper-el-6.0.18.jar
unzip jasper-el-6.0.18.jar
</pre></p>
<p>Hopefully this helps</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=295&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/08/10/problems-errors-encountered-during-red5-installation-on-ubuntu-11-04/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>AS2 History class: The construct function</title>
		<link>http://andkrup.wordpress.com/2011/07/03/as2-history-class-the-construct-function/</link>
		<comments>http://andkrup.wordpress.com/2011/07/03/as2-history-class-the-construct-function/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 22:13:10 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[actionscript 2]]></category>
		<category><![CDATA[construct]]></category>
		<category><![CDATA[document class]]></category>
		<category><![CDATA[flash mx]]></category>
		<category><![CDATA[prototype inheritance chain]]></category>
		<category><![CDATA[timeline]]></category>
		<category><![CDATA[_level0]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=289</guid>
		<description><![CDATA[Here&#8217;s a little nugget of information that may or may not come in handy. If javascript is to get the revival that everybody is hoping for (with html5 and ajax), this kind of code could prove useful, especially since we&#8217;re touching on some common concepts (mostly prototype manipulation). Also, if you are being forced to... <a href="http://andkrup.wordpress.com/2011/07/03/as2-history-class-the-construct-function/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=289&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a little nugget of information that may or may not come in handy. If javascript is to get the revival that everybody is hoping for (with html5 and ajax), this kind of code could prove useful, especially since we&#8217;re touching on some common concepts (mostly prototype manipulation).</p>
<p>Also, if you are being forced to develop something for the flash museum, you might need this snippet of code.</p>
<p>But first, some history lecture&#8230;</p>
<h3>The problem</h3>
<p>Most of the time a flash developer is to develop a larger flash application, he wants to have control of the main timeline. As3 developers have it easy with the possibility of creating a Document class and flex coders extends the Application class all the time.</p>
<p>In flash 8 we typically added scripts in the top-most timeline in_level0 but there where always some problems with this approach, especially in modular applications where you could only cast a loaded swf file as a MovieClip and hope that that instance had had some function references added to it, with execution scope being addressed correctly.</p>
<p>Normal MovieClip symbols from the library could map to external as2 classes fine, but the _level0 timeline was out of reach, even though it behaves just like any other normal MovieClip symbol, when loaded into another swf file.</p>
<p>In as3 this architectural problem was addressed with the advent of the Document class, but you can actually do the same in as2:</p>
<h3>The Solution</h3>
<p><pre class="brush: as3;">
class Main extends MovieClip{
static var instance:Main;
public static function construct(timeline):Void{
if(!instance){
timeline.__proto__ = Main.prototype;
Function(Main).apply(timeline, arguments.slice(1));
instance = (Main)(timeline);
}
}

public function Main(){
}
}
</pre></p>
<p>Invoke the static construct method in _level0 in your 2004-tech flash file, with &#8216;this&#8217; as the first argument like so:</p>
<p><pre class="brush: as3;">
Main.construct(this);
</pre></p>
<p>&nbsp;</p>
<p>What this method does, is that it replaces the _level0 hidden property __proto__ with the one from your external as2 class, invokes your external as2 classes constructor and in practicality casts _level0 (with the new prototype inheritance chain) as an instance of your external as2 class.</p>
<p>This means that whenever we need to develop modular flash in yesterdays technology, we can stay comfortably in the OO-zone (especially if we also create and implement some interfaces to establish an api), and use _level0 as an instance of your &#8216;Document&#8217; class</p>
<p>Very nice.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=289&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/07/03/as2-history-class-the-construct-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Compiling external javascript files into flash for javascript injection</title>
		<link>http://andkrup.wordpress.com/2011/07/02/compiling-external-javascript-files-into-flash-for-javascript-injection/</link>
		<comments>http://andkrup.wordpress.com/2011/07/02/compiling-external-javascript-files-into-flash-for-javascript-injection/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 07:49:06 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[inject javascript]]></category>
		<category><![CDATA[embed text]]></category>
		<category><![CDATA[embed javascript]]></category>
		<category><![CDATA[external javascript]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=263</guid>
		<description><![CDATA[This page contains detailed information about how you inject javascript into the web page that embeds your flash: http://frontenddeveloper.net/wiki/index.php?title=JavaScript_and_VBScript_Injection_in_ActionScript_3 One of the drawbacks of adding javascript code directly into your as3 class files, is that it becomes less transparent where to look for the javascript code. But the solution is simply to add the javascript... <a href="http://andkrup.wordpress.com/2011/07/02/compiling-external-javascript-files-into-flash-for-javascript-injection/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=263&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This page contains detailed information about how you inject javascript into the web page that embeds your flash:</p>
<p><a href="http://frontenddeveloper.net/wiki/index.php?title=JavaScript_and_VBScript_Injection_in_ActionScript_3">http://frontenddeveloper.net/wiki/index.php?title=JavaScript_and_VBScript_Injection_in_ActionScript_3</a></p>
<p>One of the drawbacks of adding javascript code directly into your as3 class files, is that it becomes less transparent where to look for the javascript code. But the solution is simply to add the javascript as an embedded resource, like you would a jpeg or png, using the Embed tag.</p>
<p>See this page for an example of how to embed text files:</p>
<p><a href="http://techrays.wordpress.com/2007/09/19/embedding-text-files-in-a-flex-application/">http://techrays.wordpress.com/2007/09/19/embedding-text-files-in-a-flex-application/</a></p>
<p>Once you begin to think about that, you can create a JavaScript class that may help your workflow:</p>
<p><pre class="brush: as3;">
package dk.andkrup.resource {
import flash.external.ExternalInterface;
import flash.utils.ByteArray;

public class JavaScript extends ByteArray {
private var rValue : *;

public function get returnValue():*{
return rValue;
}

public static function inject(javascript:JavaScript):Boolean{
if(ExternalInterface.available){
javascript.rValue = ExternalInterface.call(javascript.toXML());
return true;
}
return false;
}

private function toXML():XML{
return new XML(&quot;&lt;script&gt;&lt;![CDATA[&quot;+this.toString()+&quot;]]&gt;&lt;/script&gt;&quot;);
}
}
}
</pre></p>
<p>Extend this class and add an Embed tag, in order to externalize your javascript in a separate *.js file.</p>
<p>Example embed tag:</p>
<p><pre class="brush: as3;">
[Embed(source=&quot;../js/javascript.js&quot;, mimeType=&quot;application/octet-stream&quot;)]
public class MyJavascript extends JavaScript{
...
</pre></p>
<p>(above example implies that you have a javascript called &#8220;javascript.js&#8221; in the relative location &#8220;../js&#8221;)</p>
<p>Then it becomes a small one-liner to inject your external javascript subclass with the static inject method like this:</p>
<p><pre class="brush: as3;">
JavaScript.inject(new MyJavascript());
</pre></p>
<p>Or, in order to retrieve any javascript return value:</p>
<p><pre class="brush: as3;">
var js:JavaScript = new MyJavascript();
if(JavaScript.inject(js)){
trace(&quot;return from javascript: &quot;+js.returnValue);
}
</pre></p>
<p>This way you can keep your javascript separate from your actionscript, possibly making it easier to maintain your project.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/263/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/263/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/263/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=263&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/07/02/compiling-external-javascript-files-into-flash-for-javascript-injection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Disabling the Warning: 1090: Migration issue</title>
		<link>http://andkrup.wordpress.com/2011/05/31/disabling-the-warning-1090-migration-issue/</link>
		<comments>http://andkrup.wordpress.com/2011/05/31/disabling-the-warning-1090-migration-issue/#comments</comments>
		<pubDate>Tue, 31 May 2011 13:28:05 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Bugs & Solutions]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[1090]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[migration warning]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=255</guid>
		<description><![CDATA[In actionscript 2, eventhandlers was already defined in the MovieClip class, so whenever you needed to run some code in an eventhandler, say in the onLoad function, you could &#8216;override&#8217; the default (empty) onLoad function and all was good. In actionscript 3 Flash CS assumes that you&#8217;re struggling with migration issues if the compiler encounters... <a href="http://andkrup.wordpress.com/2011/05/31/disabling-the-warning-1090-migration-issue/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=255&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In actionscript 2, eventhandlers was already defined in the MovieClip class, so whenever you needed to run some code in an eventhandler, say in the onLoad function, you could &#8216;override&#8217; the default (empty) onLoad function and all was good.</p>
<p>In actionscript 3 Flash CS assumes that you&#8217;re struggling with migration issues if the compiler encounters a function that is named similar to the actionscript 2 eventhandlers.</p>
<p>If I decide to listen for the Event.ADDED_TO_STAGE, and create  an eventlistener with the name onLoad, I will get the titular warning.</p>
<p>I don&#8217;t really need that warning; I like to give the eventhandler a meaningful name and that&#8217;s what I think &#8216;onLoad&#8217; is.</p>
<p>To disable this warning, you can browse to this file on your Mac:</p>
<p>/Applications/Adobe Flash CS5/en_US/Configuration/ActionScript 3.0/EnabledWarnings.xml</p>
<p>(I would assume that the &#8216;EnabledWarnings.xml&#8217; file is in a similar location on Windows)</p>
<p>and change the enabled-attribute value from true&#8230;</p>
<p><pre class="brush: xml;">
&lt;warning id=&quot;1090&quot; enabled=&quot;true&quot;  label=&quot;kWarning_DepricatedEventHandlerError&quot;&gt;EventHandler was not added as a listener.&lt;/warning&gt;
</pre></p>
<p>to false.</p>
<p><pre class="brush: xml;">
&lt;warning id=&quot;1090&quot; enabled=&quot;false&quot;  label=&quot;kWarning_DepricatedEventHandlerError&quot;&gt;EventHandler was not added as a listener.&lt;/warning&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/255/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/255/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/255/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=255&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/05/31/disabling-the-warning-1090-migration-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Ubuntu 10.10, Apache2, passenger, RVM, Capistrano and Git &#8211; the whole shebang!</title>
		<link>http://andkrup.wordpress.com/2011/05/10/ubuntu-10-10-apache2-passenger-rvm-capistrano-and-git-the-whole-shebang/</link>
		<comments>http://andkrup.wordpress.com/2011/05/10/ubuntu-10-10-apache2-passenger-rvm-capistrano-and-git-the-whole-shebang/#comments</comments>
		<pubDate>Tue, 10 May 2011 21:59:30 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Bugs & Solutions]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=243</guid>
		<description><![CDATA[I&#8217;m learning a lot about our new test server each day! Today I set up RVM on our apache web server, so that it can serve Rails applications with multiple gem installations. There is a lot of tutorials and write-ups on this topic, but everybody encounters different problems, so why not document my own experiences?... <a href="http://andkrup.wordpress.com/2011/05/10/ubuntu-10-10-apache2-passenger-rvm-capistrano-and-git-the-whole-shebang/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=243&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m learning a lot about our new test server each day!</p>
<p>Today I set up RVM on our apache web server, so that it can serve Rails applications with multiple gem installations. There is a lot of tutorials and write-ups on this topic, but everybody encounters different problems, so why not document my own experiences?</p>
<h2>Installation Strategy</h2>
<p>My goal was to be able to create virtual hosts that can serve rails apps, depending on unique gemsets.</p>
<p>In order to do this, we need to:</p>
<ul>
<li>be able to create a gemset for every project that we deploy on the server</li>
</ul>
<p>We will need to:</p>
<ul>
<li>prepare the rail projects for RVM and Capistrano</li>
<li>set up apache with passenger and RVM</li>
<li>prepare gemsets for projects on the server</li>
</ul>
<h3>Existing setup</h3>
<p>The apache web server is run by the user www-data on the server, but I have previously set up a user, www-publisher with ssh, a homedir and as a member of the www-data group so I can update web content without sudo. This user will also need to be the user that installs RVM in order to access the rvm-gemsets with no problems.</p>
<p>Currently, when apache is running mod_passenger with RVM, you have some restrictions that you will need to work with.</p>
<p>First, you can only use 1 ruby, but with this ruby you can use different gemsets. This I believe, is because mod_passenger will be installed as a gem under RVM, and apache needs to serve rails apps with gemsets containing the passenger gem.</p>
<h3>Existing software</h3>
<p>The Ubuntu server was already set up to serve the rails app Redmine, which is an amazing piece of project managing software. More on that in a future post.</p>
<p>Unfortunately it was set up with mod_passenger installed with apt-get, so the first thing was to remove that module.</p>
<p><pre class="brush: bash;">
$ sudo a2dismod passenger # disable the passenger module
$ sudo apt-get remove libapache2-mod-passenger # uninstall passenger
</pre></p>
<p>The reason for uninstalling the apt-get installed passenger, is that Apache will need to have passenger in the RVM-controlled ruby that we&#8217;re using.</p>
<p>Afaik this means that we can only use 1 RVM-ruby. But we can still use as many gemsets as we&#8217;d like to.</p>
<p>Git was already set up on the server with gitosis serving repositories on the local network. I will describe setting up Git later.</p>
<h2>Installing</h2>
<p>After removing the unwanted software, I had the following list of software to install:</p>
<ul>
<li>rvm</li>
<li>gems:</li>
<ul>
<li>passenger</li>
<li>rails</li>
<li>capistrano</li>
</ul>
</ul>
<p>Plus some additional setup of existing software:</p>
<ul>
<li>apache</li>
</ul>
<p>Here&#8217;s what happened:</p>
<h3>Installing RVM</h3>
<p>In order to install in the correct location as a single-user, we need to install as www-publisher and we need www-publisher to be able to sudo. We also need to revoke sudo from www-publisher when we&#8217;re done so www-publisher won&#8217;t wreck unnecessary havoc later on. And we need to install the passenger gem so apache can serve rails pages.</p>
<p><pre class="brush: bash;">
$ groups www-publisher #list all groups that www-publisher is a member of
$ sudo usermod -G www-publisher,www-data,rvm,sudo www-publisher  # add www-publisher to the list of sudoers
</pre></p>
<p>Once we&#8217;re done we can revoke sudo from www-publisher by</p>
<p><pre class="brush: bash;">
 $ sudo usermod -G www-publisher,www-data,rvm www-publisher
</pre></p>
<p>Notice that www-publisher was already a member of rvm. I believe that was due to a previous (failed) rvm installation attempt <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Installing in www-publishers home dir</p>
<p><pre class="brush: bash;">
$ su www-publisher #switch to www-publisher
$ cd ~ # not really necessary but now we're in www-publishers home dir
$ bash &lt; &lt;(curl -s https://rvm.beginrescueend.com/install/rvm) # installing rvm
$ echo '[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;&amp; source &quot;$HOME/.rvm/scripts/rvm&quot;' &gt;&gt; ~/.bashrc # adding the rvm function to the file .bashrc in www-publishers home dir
$ source ~/.rvm/scripts/rvm # initiating the rvm function
</pre></p>
<p>Testing the installation:</p>
<p><pre class="brush: bash;">
$ type rvm | head -1 # should display 'rvm is a function'
</pre></p>
<p>When the time comes, we can log in as, or switch to the user www-publisher in order to create gemsets and install some gems, but for now we really only need to install the ruby that we want to use and passenger gem:</p>
<p><pre class="brush: bash;">
$ rvm install 1.8.7 # installs ruby1.8.7
$ rvm use 1.8.7 # switch to ruby1.8.7
$ gem install passenger # install the passenger ruby API
$ rvmsudo passenger-install-apache2-module # run the install script for passenger on apache
</pre></p>
<p>The last line will output some lines that you can use later to configure the passenger module. Copy those lines and save them for later.</p>
<h3>Setting up Apache and Passenger</h3>
<p>So now we can switch back to our normal administrator user by typing</p>
<p><pre class="brush: bash;">
$ exit # quit being www-publisher
</pre></p>
<p>and set up apache.</p>
<p>First we need to set up the passenger module by adding the lines that was output when we ran the passenger-install-apache2-module script</p>
<p><pre class="brush: bash;">
$ sudo nano /etc/apache2/mods-available/passenger.load # edit /etc/apache2/mods-available/passenger.load with a simple editor
$ # in file /etc/apache2/mods-available/passenger.load
LoadModule passenger_module /home/www-publisher/.rvm/gems/ruby-1.8.7-p334/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
$ sudo nano /etc/apache2/mods-available/passenger.conf # edit /etc/apache2/mods-available/passenger.conf with a simple editor
$ # in file /etc/apache2/mods-available/passenger.conf
&lt;IfModule mod_passenger.c&gt;
PassengerRoot /home/www-publisher/.rvm/gems/ruby-1.8.7-p334/gems/passenger-3.0.7
PassengerRuby /home/www-publisher/.rvm/wrappers/ruby-1.8.7-p334/ruby
&lt;/IfModule&gt;
</pre></p>
<p>We also need to make apache trust the rvm settings that we decide to do later in our rails applications:</p>
<p><pre class="brush: bash;">
$ sudo echo &quot;&lt;code&gt;rvm_trust_rvmrcs_flag=1&lt;/code&gt;&quot; &gt;&gt; /home/www-publisher/.rvmrc # set a flag that will make the www-publisher always trust .rvmrc files in capistrano deployed rails apps
</pre></p>
<p>Now we can set up multiple virtual hosts for our rails applications</p>
<h4>Setting up for a Rails application</h4>
<p>We need a RVM gemset</p>
<p><pre class="brush: bash;">
$ su www-publisher # switch to the www-publisher user so we can create gemsets and install required gems
$ rvm use 1.8.7 # selecting the ruby that we will install our new gemset in
$ rvm create gemset myprojectname # creating a gemset with the name 'myprojectname'
</pre></p>
<p>and a Virtual Host</p>
<p><pre class="brush: bash;">
$ sudo nano /etc/apache2/sites-available/myprojectname.domain # edit and create the file myprojectname.domain
# in file myprojectname.domain
&lt;VirtualHost *:80&gt;
ServerAdmin admin@domain.com
ServerName myprojectname.domain.com
DocumentRoot /home/www-publisher/myprojectname/www/current/public
RailsEnv development
RailsBaseURI /
ErrorLog /home/www-publisher/myprojectname/logs/error.log
CustomLog /home/www-publisher/myprojectname/logs/access.log combined
&lt;Directory /home/www-publisher/myprojectname/www/current/public&gt;
AllowOverride all
Options -MultiViews
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre></p>
<p>Above virtual host assumes that you wants to serve your rails app from the folder /home/www-publisher/myprojectname/www, while apache is logging to log files in /home/www-publisher/myprojectname/log</p>
<h3>Preparing a Rails application for deployment with Capistrano to a server with RVM</h3>
<p>We need to configure our Rails app so the passenger loaded apache server can select gems from the correct gemset.</p>
<p>Add a .rvmrc file in your Rails dir</p>
<p><pre class="brush: bash;">
# in file .rvmrc
rvm 1.8.7@myprojectname
</pre></p>
<p>This will make the pasenger loaded apache swap to the gemset with the name &#8216;myprojectname&#8217;</p>
<p>Add a setup_load_paths.rb file in the  config folder in your Rails dir</p>
<p><pre class="brush: bash;">
# in file .rvmrc
if ENV['MY_RUBY_HOME'] &amp;&amp; ENV['MY_RUBY_HOME'].include?('rvm')
begin
rvm_path     = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
rvm_lib_path = File.join(rvm_path, 'lib')
$LOAD_PATH.unshift rvm_lib_path
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
rescue LoadError
# RVM is unavailable at this point.
raise &quot;RVM ruby lib is currently unavailable.&quot;
end
end
# If we're using a Bundler 1.0 beta
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'
</pre></p>
<p>This post will be proofread very soon &#8211; there may still be some commands missing</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/243/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/243/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/243/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=243&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/05/10/ubuntu-10-10-apache2-passenger-rvm-capistrano-and-git-the-whole-shebang/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Swf 2 Png</title>
		<link>http://andkrup.wordpress.com/2011/05/03/swf-2-png/</link>
		<comments>http://andkrup.wordpress.com/2011/05/03/swf-2-png/#comments</comments>
		<pubDate>Tue, 03 May 2011 08:49:59 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash games cross-platform swf to png]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=217</guid>
		<description><![CDATA[Just saw this tool &#8211; could be real nifty for cross-platform games development http://marshgames.com/swftopng/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=217&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just saw this tool &#8211; could be real nifty for cross-platform games development</p>
<p><a href="http://marshgames.com/swftopng/">http://marshgames.com/swftopng/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/217/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/217/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/217/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=217&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/05/03/swf-2-png/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
		<item>
		<title>Launching a separate Firefox instance from Ant, testing php files locally</title>
		<link>http://andkrup.wordpress.com/2011/01/17/launching-a-separate-firefox-instance-from-ant-testing-php-files-locally/</link>
		<comments>http://andkrup.wordpress.com/2011/01/17/launching-a-separate-firefox-instance-from-ant-testing-php-files-locally/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 11:10:44 +0000</pubDate>
		<dc:creator>andkrup</dc:creator>
				<category><![CDATA[Ant]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[ant task]]></category>
		<category><![CDATA[multiple firefox instances]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://andkrup.wordpress.com/?p=230</guid>
		<description><![CDATA[Darron Schall has a post about launching Firefox via Apache Ant on mac: http://www.darronschall.com/weblog/2007/12/launching-firefox-from-ant-on-osx.cfm I found the post very useful, although the post was made 3 years ago, but where Darron used the task to test Swf files, I was interested in Launching Firefox in order to test php files locally and this had some... <a href="http://andkrup.wordpress.com/2011/01/17/launching-a-separate-firefox-instance-from-ant-testing-php-files-locally/">Read more.</a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=230&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Darron Schall has a post about launching Firefox via Apache Ant on mac:</p>
<p><a href="http://www.darronschall.com/weblog/2007/12/launching-firefox-from-ant-on-osx.cfm">http://www.darronschall.com/weblog/2007/12/launching-firefox-from-ant-on-osx.cfm</a></p>
<p>I found the post very useful, although the post was made 3 years ago, but where Darron used the task to test Swf files, I was interested in Launching Firefox in order to test php files locally and this had some unfortunate consequences.</p>
<p>My test-task includes copying all relevant project php-files to the local web servers www-location, then opening Firefox as described in above link. Last, a clean-up task can be invoked to remove the test files.</p>
<p>The problem is that Apache will lock the php-files when you test them because your request will require Apache to execute the php scripts, which means that the clean-up task cannot remove the files, because Apache has a lock on them.</p>
<p>Closing the tab in Firefox doesn&#8217;t help &#8211; you have to close the browser instance (I assume that Firefox somehow sends a &#8216;end-session&#8217; signal that will make Apache release its file locks &#8211; I don&#8217;t really have an understand in this regard, but it works if you close the browser).</p>
<p>But if you do not want to close Firefox because you don&#8217;t want to close other tabs, you can combine the tips from this post:</p>
<p><a href="http://devongovett.wordpress.com/2009/04/14/multiple-firefox-mac/">http://devongovett.wordpress.com/2009/04/14/multiple-firefox-mac/</a></p>
<p>By creating multiple Firefox profiles, you can open as many Firefox instances as you have profiles. This way you can open and close a separate &#8216;test&#8217; Firefox instance that will allow Apache to release your test files from memory on closing the &#8216;test&#8217;-profile Firefox instance without requiring you to close your other tabs in your normal profile Firefox instance.</p>
<p>The arguments for &#8216;open&#8217; should look like this:</p>
<p><pre class="brush: plain;">
open -n -a /Applications/Firefox.app/Contents/MacOS/firefox-bin http://localhost/${ant.project.name}/ --args -P developer
</pre></p>
<p>, where &#8216;http://localhost/${ant.project.name}/&#8217; is the web directory that just has been created and enabled for testing by a prior Ant task.</p>
<p>My &#8216;Test on localhost&#8217; target looks like this:</p>
<p><pre class="brush: xml;">
&lt;target name=&quot;Test on localhost&quot; depends=&quot;Deploy to localhost&quot;&gt;
 &lt;property name=&quot;browser&quot; value=&quot;open&quot; /&gt;
&lt;property name=&quot;browser.args&quot; value=&quot; -n -a /Applications/Firefox.app/Contents/MacOS/firefox-bin http://localhost/${ant.project.name}/ --args -P developer&quot; /&gt;
 &lt;property name=&quot;browser&quot; value=&quot;open&quot; /&gt;
 &lt;exec executable=&quot;${browser}&quot; spawn=&quot;yes&quot;&gt;
 &lt;arg line=&quot;${browser.args}&quot; /&gt;
&lt;/exec&gt;
 &lt;/target&gt;
</pre></p>
<p>, where the depending task &#8216;Deploy to localhost&#8217; is the task that copies all files that I want to test to the localhost web directory, and the &#8216;&#8211;args -P developer&#8217; part is the magic that enables Ant to launch Firefox as a separate application instance. The &#8216;developer&#8217; argument indicates that I have created a new Firefox profile named &#8216;developer&#8217;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/andkrup.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/andkrup.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/andkrup.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/andkrup.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/andkrup.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/andkrup.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/andkrup.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/andkrup.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=andkrup.wordpress.com&amp;blog=5548748&amp;post=230&amp;subd=andkrup&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://andkrup.wordpress.com/2011/01/17/launching-a-separate-firefox-instance-from-ant-testing-php-files-locally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/736f6f78753c597b67323b621e154a94?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">andkrup</media:title>
		</media:content>
	</item>
	</channel>
</rss>
