<?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/"
	>

<channel>
	<title>ninajansen.dk &#187; tips</title>
	<atom:link href="http://ninajansen.dk/category/tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://ninajansen.dk</link>
	<description></description>
	<lastBuildDate>Thu, 23 Apr 2009 21:46:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Do not use apt-get to install passenger on Ubuntu</title>
		<link>http://ninajansen.dk/2009/02/14/do-not-use-apt-get-to-install-passenger-on-ubuntu/</link>
		<comments>http://ninajansen.dk/2009/02/14/do-not-use-apt-get-to-install-passenger-on-ubuntu/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 02:28:43 +0000</pubDate>
		<dc:creator>Nina Jansen</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ninajansen.dk/?p=89</guid>
		<description><![CDATA[So I wanted to experiment with Phusion Passenger on my home server. The server runs Ubuntu 8.10 and serves a bunch of small low-traffic sites through apache (including this blog). I saw that there was a package from brightbox for passenger on ubuntu and tried to install it. However, this package automatically disables the php5 [...]]]></description>
			<content:encoded><![CDATA[<p>So I wanted to experiment with Phusion Passenger on my home server. The server runs Ubuntu 8.10 and serves a bunch of small low-traffic sites through apache (including this blog). I saw that there was a <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">package from brightbox for passenger</a> on ubuntu and tried to install it. However, this package automatically disables the php5 apache module. I have no idea why, it is possible to run both php and passenger apps from the same apache. Anyway this clobbered all my wordpress blogs (I know, I should always read the messages carefully&#8230;) and I had to reinstall php5. If you want to install passenger on Ubuntu 8.10, use <a href="http://wiki.vpslink.com/HOWTO:_Ubuntu_Intrepid_RubyOnRails_Passenger">this approach</a>.</p>
<img src="http://ninajansen.dk/?ak_action=api_record_view&id=89&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://ninajansen.dk/2009/02/14/do-not-use-apt-get-to-install-passenger-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cache sweepers in Rails, put them in app/models!</title>
		<link>http://ninajansen.dk/2008/05/14/cache-sweepers-in-rails-put-them-in-appmodels/</link>
		<comments>http://ninajansen.dk/2008/05/14/cache-sweepers-in-rails-put-them-in-appmodels/#comments</comments>
		<pubDate>Wed, 14 May 2008 15:41:50 +0000</pubDate>
		<dc:creator>Nina Jansen</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[sweepers]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ninajansen.dk/?p=33</guid>
		<description><![CDATA[So i&#8217;ve been spending hours tracking this one down: I wanted to have cache sweepers in rails and followed the advice from railscasts and railsevny. Those tutorials tell you to put sweepers in an app/sweepers directory and add that directory to your load path. DON&#8217;T DO THAT. That simply did not work for me (using [...]]]></description>
			<content:encoded><![CDATA[<p>So i&#8217;ve been spending hours tracking this one down: I wanted to have cache sweepers in rails and followed the advice from <a href="http://railscasts.com/episodes/89">railscasts</a> and <a href="http://www.railsenvy.com/2007/2/28/rails-caching-tutorial">railsevny</a>. Those tutorials tell you to put sweepers in an app/sweepers directory and add that directory to your load path. DON&#8217;T DO THAT. That simply did not work for me (using rails 2.02). After banging my head against google for hours, I found out that sweeper simply has to go in app/models, MVC be dammed. If they are put there they get loaded, and you can add them as active record observers. If they are not put there rails won&#8217;t find them. I don&#8217;t know if this is a bug or a feature, but that is just the way it is.</p>
<img src="http://ninajansen.dk/?ak_action=api_record_view&id=33&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://ninajansen.dk/2008/05/14/cache-sweepers-in-rails-put-them-in-appmodels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In place editing in rails</title>
		<link>http://ninajansen.dk/2008/05/13/in-place-editing-in-rails/</link>
		<comments>http://ninajansen.dk/2008/05/13/in-place-editing-in-rails/#comments</comments>
		<pubDate>Tue, 13 May 2008 17:06:01 +0000</pubDate>
		<dc:creator>Nina Jansen</dc:creator>
				<category><![CDATA[REST]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ninajansen.dk/?p=32</guid>
		<description><![CDATA[So basically, the official plugin is old and cant really deal with restful routing. For some reason, when I used the url_for method in my views, the in place editor javascript function couldn&#8217;t interpret the (restful) route properly and sent a post request to &#8216;/controller/1/edit&#8217; to an action named &#8220;1&#8243; with an id set to [...]]]></description>
			<content:encoded><![CDATA[<p>So basically, the official plugin is old and cant really deal with restful routing. For some reason, when I used the url_for method in my views, the in place editor javascript function couldn&#8217;t interpret the (restful) route properly and sent a post request to &#8216;/controller/1/edit&#8217; to an action named &#8220;1&#8243; with an id set to &#8220;edit&#8221;, which obviously didn&#8217;t do anything useful. So instead I called the in place editor script in the following manner (I&#8217;m using haml btw.):</p>
<p><code><br />
%span{:id =&gt; "name", :class =&gt; "in_place_editor_field"}= @user.name<br />
= in_place_editor "name", {:url =&gt; '/user/edit/' + @user.id.to_s, :rows =&gt; 1, :size =&gt; 32 }<br />
</code></p>
<p>So basically I hard coded the route so it would fall back on standard routing. Yes I know that:</p>
<ul>
<li> This is ugly as sin</li>
<li> I&#8217;m supposed to do a PUT request to a function named update, not a post request to a function named edit.</li>
</ul>
<p>But it solved the problem.</p>
<img src="http://ninajansen.dk/?ak_action=api_record_view&id=32&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://ninajansen.dk/2008/05/13/in-place-editing-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails tips #1</title>
		<link>http://ninajansen.dk/2008/05/02/rails-tips-1/</link>
		<comments>http://ninajansen.dk/2008/05/02/rails-tips-1/#comments</comments>
		<pubDate>Fri, 02 May 2008 11:02:42 +0000</pubDate>
		<dc:creator>Nina Jansen</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://ninajansen.dk/?p=25</guid>
		<description><![CDATA[These might be completely obvious to everyone, but I found them useful:

 If you want to migrate a specific database, you can do it by setting RAILS_ENV on the command line. Like this:
rake db:migrate RAILS_ENV=production
 If you want to see all the rake tasks in your application with a description of what they do, execute:
rake [...]]]></description>
			<content:encoded><![CDATA[<p>These might be completely obvious to everyone, but I found them useful:</p>
<ul>
<li> If you want to migrate a specific database, you can do it by setting RAILS_ENV on the command line. Like this:<br />
<code>rake db:migrate RAILS_ENV=production</code></li>
<li> If you want to see all the rake tasks in your application with a description of what they do, execute:<br />
<code>rake -D</code></li>
</ul>
<img src="http://ninajansen.dk/?ak_action=api_record_view&id=25&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://ninajansen.dk/2008/05/02/rails-tips-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
