<?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>Sentia &#124; Sydney IT Consultancy, Software Development, Ruby on Rails, Web Application Development, Rails Development, Test Driven Development, Microsoft.Net, Asp.Net , Agile, Continuous Integration Training, iPhone development &#187; ruby on rails</title>
	<atom:link href="http://www.sentia.com.au/category/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sentia.com.au</link>
	<description>Sentia company website and blog about all things development, Ruby on Rails, Microsoft .Net, ASP.Net, C#.Net, Agile web development, Test Driven Development</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:16:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Integrating CBA&#8217;s BPOINT gateway using ActiveMerchant</title>
		<link>http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/</link>
		<comments>http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 06:49:47 +0000</pubDate>
		<dc:creator>mario</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=1135</guid>
		<description><![CDATA[Recently a client of ours wanted to use the Commonwealth Bank &#8230; <a href="http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently a client of ours wanted to use the Commonwealth Bank of Australia (CBA)&#8217;s <a title="BPOINT gateway" href="http://www.bpoint.com.au/bpoint/business/">BPOINT gateway</a> for their web application. The first thing we do is usually turn to <a title="ActiveMerchant" href="https://github.com/Shopify/active_merchant">ActiveMerchant</a> to see if there is already a gateway class for the merchant. In this case we couldn&#8217;t find a gateway class or anything or any sort of implementation in ruby.</p>
<p>So today we&#8217;re releasing our open source BPOINT plugin for ActiveMerchant. Installation instructions and usage are available at the GitHub project page: <a title="ActiveMerchant BPOINT on Github" href="https://github.com/Sentia/activemerchant-bpoint">https://github.com/Sentia/activemerchant-bpoint</a>.</p>
<p>It&#8217;s very simple to setup and use, good luck and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2011/12/integrating-cbas-bpoint-gateway-using-activemerchant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sublime Text 2 the next text editor in your toolbox</title>
		<link>http://www.sentia.com.au/2011/08/sublime-text-2-the-next-text-editor-in-your-toolbox/</link>
		<comments>http://www.sentia.com.au/2011/08/sublime-text-2-the-next-text-editor-in-your-toolbox/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 10:36:52 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mac osx]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[sublime]]></category>
		<category><![CDATA[Text Editor]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=1081</guid>
		<description><![CDATA[So i have decided to try out Sublime Text 2. &#8230; <a href="http://www.sentia.com.au/2011/08/sublime-text-2-the-next-text-editor-in-your-toolbox/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So i have decided to try out <a href="http://www.sublimetext.com/">Sublime Text 2</a>. Now l have been a <a href="http://macromates.com/">Textmate</a> user for a number of years now but the speed in which you can find files and the way it handles large files such as log files or csv&#8217;s for example has always been an issue and one of the guys here at <a href="http://www.sentia.com.au">Sentia</a> suggested l try Sublime as he is also in the process of giving it a go as well.</p>
<p>So there is a Beta 2 out now which l promptly downloaded and fire it up. Now l have to say that its fantastic. Its super fast and easy to use. Sure its missing some of the little things that Textmate has that makes life easy such as the rails bundles etc but you can actually download and install ported bundles from textmate that users have ported across.</p>
<p>The UI is clean and simple to use and the fact that you can change almost every setting in the app and also with the full screen feature its hard to beat.</p>
<p>The search is the best feature hands down. Its super fast and simple to use and you never get caught again hitting apple + T and find out later that you have typed some of your search letters into a random ruby file you had open at the time.</p>
<p>Here are some screen shots of how clean the UI is in full screen mode and the search tool</p>

<a href='http://www.sentia.com.au/2011/08/sublime-text-2-the-next-text-editor-in-your-toolbox/screen-shot-2011-08-03-at-8-23-50-pm/' title='Screen Shot 2011-08-03 at 8.23.50 PM'><img width="150" height="150" src="http://www.sentia.com.au/wp-content/uploads/2011/08/Screen-Shot-2011-08-03-at-8.23.50-PM-150x150.png" class="attachment-thumbnail" alt="Screen Shot 2011 08 03 at 8.23.50 PM 150x150 Sublime Text 2 the next text editor in your toolbox" title="Screen Shot 2011-08-03 at 8.23.50 PM" /></a>
<a href='http://www.sentia.com.au/2011/08/sublime-text-2-the-next-text-editor-in-your-toolbox/screen-shot-2011-08-03-at-8-24-19-pm/' title='Screen Shot 2011-08-03 at 8.24.19 PM'><img width="150" height="150" src="http://www.sentia.com.au/wp-content/uploads/2011/08/Screen-Shot-2011-08-03-at-8.24.19-PM-150x150.png" class="attachment-thumbnail" alt="Screen Shot 2011 08 03 at 8.24.19 PM 150x150 Sublime Text 2 the next text editor in your toolbox" title="Screen Shot 2011-08-03 at 8.24.19 PM" /></a>

<p>p.s One thing that you will be missing is the </p>
<pre class="brush: cpp; title: ; notranslate">
mate .
</pre>
<p>Command but not to worry simply add the following </p>
<pre class="brush: cpp; title: ; notranslate">
alias sub='open -a &quot;/Applications/Sublime Text 2.app&quot;'
</pre>
<p>to your .bashrc or .profile file and you can open projects the same you would have in textmate in sublime but with the following command</p>
<pre class="brush: cpp; title: ; notranslate">
sub .
</pre>
<p>Also worth the license is cross platform so no more buying multiple licenses.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2011/08/sublime-text-2-the-next-text-editor-in-your-toolbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Big Switch launches</title>
		<link>http://www.sentia.com.au/2011/07/one-big-switch-launches/</link>
		<comments>http://www.sentia.com.au/2011/07/one-big-switch-launches/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 08:18:40 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[client projects]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=884</guid>
		<description><![CDATA[The CHOICE big bank switch which is powered by One &#8230; <a href="http://www.sentia.com.au/2011/07/one-big-switch-launches/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The CHOICE big bank switch which is powered by <a href="http://www.onebigswitch.com.au">One Big Switch</a> has hit the web in a big way. One Big Switch uses the power of group switching to help consumers pay less for their regular household bills, in a quick, easy and obligation free way.</p>
<p>So be sure to check it out at <a href="http://www.onebigswitch.com.au">One Big Switch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2011/07/one-big-switch-launches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sentia playing host for Hack Night</title>
		<link>http://www.sentia.com.au/2010/10/sentia-playing-host-for-hack-night/</link>
		<comments>http://www.sentia.com.au/2010/10/sentia-playing-host-for-hack-night/#comments</comments>
		<pubDate>Wed, 20 Oct 2010 05:26:40 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[sentia]]></category>
		<category><![CDATA[hack night]]></category>
		<category><![CDATA[rorosyd]]></category>
		<category><![CDATA[user groups]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=832</guid>
		<description><![CDATA[Sentia is happy to announce we are hosting the next &#8230; <a href="http://www.sentia.com.au/2010/10/sentia-playing-host-for-hack-night/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Sentia is happy to announce we are hosting the next Hack Night for the Rorosyd group. The night is being tailored to helping out people who are newer to rails with the use of mentors. Sentia is also providing along with the use of its office space the beer for the event which we all know helps the code flow easier.</p>
<p>For more info check out the user group <a href="http://wiki.rubyonrails.com.au/index.php/Rorosyd_hack_meetup#Noob_Hack_Night_.40_Sentia">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2010/10/sentia-playing-host-for-hack-night/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Ruby On Rails</title>
		<link>http://www.sentia.com.au/2010/04/learning-ruby-on-rails/</link>
		<comments>http://www.sentia.com.au/2010/04/learning-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 00:37:02 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[learing rails]]></category>

		<guid isPermaLink="false">http://www.sentia.com.au/?p=704</guid>
		<description><![CDATA[Hey spoken to a few developers mainly UNI grads who &#8230; <a href="http://www.sentia.com.au/2010/04/learning-ruby-on-rails/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hey spoken to a few developers mainly UNI grads who are looking to get into rails and they often ask whats the best way to do so. So l thought l would put together a list of resources they can use to get up to speed.</p>
<p>If anyone else knows of some other ones please let me know</p>
<p>== General Practices ==<br />
Dev on a Mac<br />
Read up on TDD (Test Driven Development)<br />
Use Growl for your Autotest notifications<br />
<a href="http://macromates.com/">TextMate</a> &#8211; The only Editor you need<br />
<a href="http://github.com">GitHub</a> &#8211; Great space to see open source code and gems and plugins<br />
<a href="http://gemcutter.org/">http://gemcutter.org/</a></p>
<p>== Rails Setup ==</p>
<p><a href="http://hivelogic.com/">http://hivelogic.com/</a> &#8211; Has some great tutorials on getting your environment setup on a mac.</p>
<p>== Tutorials ==<br />
<a href="http://rubyonrails.org">http://rubyonrails.org</a><br />
<a href="http://railscasts.com">Rails Casts</a> &#8211; Ryan Bates screen casts about all things rails related<br />
<a href="https://peepcode.com">PeepCode</a> &#8211; Great screen casts about all things rails related</p>
<p>== Blogs ==</p>
<p><a href="http://sentia.com.au/blog">Sentia Blog</a><br />
<a href="http://thoughtbot.com/">http://thoughtbot.com</a><br />
<a href="http://weblog.jamisbuck.org">http://weblog.jamisbuck.org</a><br />
<a href="http://blog.jayfields.com">http://blog.jayfields.com</a><br />
<a href="http://errtheblog.com">http://errtheblog.com</a></p>
<p>== Books ==<br />
<a href="http://pragmaticstudio.com">http://pragmaticstudio.com</a> &#8211; Great source of books about rails and other technologies with a focus on the right practices.</p>
<p>Finally the only real way to learn is to try things out. Follow other developers blogs and use all the resources you can such as Google groups etc.<br />
Don&#8217;t be scared to get it wrong its the only way to learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2010/04/learning-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PayFlow recurring billing with ActiveMerchant</title>
		<link>http://www.sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/</link>
		<comments>http://www.sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 04:47:47 +0000</pubDate>
		<dc:creator>James Kong</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[activemerchant]]></category>
		<category><![CDATA[Payflow]]></category>
		<category><![CDATA[Payment Gateway]]></category>
		<category><![CDATA[paypal]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Recurring Billing]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=612</guid>
		<description><![CDATA[Today we are going to look at using ActiveMerchant to &#8230; <a href="http://www.sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today we are going to look at using ActiveMerchant to set up a recurring billing subscription with PayFlow .</p>
<p>PayFlow is Paypal&#8217;s payment gateway and you need to setup a PayFlow account.<br />
<strong>IMPORTANT!</strong> This is separate from Paypal&#8217;s development sandbox. Follow these steps to setup a Payflow testing account</p>
<ol>
<li>Go to <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-get-started-outside">https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-get-started-outside<br />
</a> and fill in the details for an account.</li>
<li>When you get to the page where you need to enter your payment information, hit Save and Exit. This will create a testing PayFlow account for you.</li>
<li>You will be sent an email with your partner ID and your vendor login. Take note of your partner ID as this will be important later.</li>
<li>You should now be able to login at <a href="https://manager.paypal.com/">https://manager.paypal.com/</a></li>
</ol>
<p>Now that you have a PayFlow account, you can use ActiveMerchant to setup payments. For now we will muck around in irb to test that methods out.</p>
<p>So lets open up irb and start by including the active merchant gem and setting ActiveMerchant to test mode</p>
<pre class="brush: ruby; title: ; notranslate">
kongy@Deadpool: $ irb
irb(main):001:0&gt; require 'rubygems'
irb(main):002:0&gt; require 'active_merchant'
irb(main):003:0&gt; ActiveMerchant::Billing::Base.mode = :test
</pre>
<p>Now lets setup the gateway.</p>
<pre class="brush: ruby; title: ; notranslate">
gateway = ActiveMerchant::Billing::PayflowGateway.new(:login =&gt; 'PAYFLOW_LOGIN', :password =&gt; 'PAYFLOW_PASSWORD', :partner =&gt; 'PARTNER_ID')
</pre>
<p>This creates the gateway that we will be using to request purchases. By default ActiveMerchant passes PAYPAL as the partner value if you leave it out. I believe that this is the default for US PayFlow account. For my Aussie one, I received a VSA partner_id. I would suggest putting it in there anyway.</p>
<p>PayFlow Testing only accepts testing credit cards numbers.Ã‚Â  You can grab them from the PayFlow recurring billing documentation found <a href="https://cms.paypal.com/cms_content/US/en_US/files/developer/PayflowPro_RecurringBilling_Guide.pdf">here</a>. Here is a quick list which I can&#8217;t guarantee will be up to date.</p>
<table border="0">
<tbody>
<tr>
<td>American Express</td>
<td>378282246310005</td>
</tr>
<tr>
<td>American Express</td>
<td>371449635398431</td>
</tr>
<tr>
<td>American Express Corporate</td>
<td>378734493671000</td>
</tr>
<tr>
<td>Diners Club</td>
<td>30569309025904</td>
</tr>
<tr>
<td>Diners Club</td>
<td>38520000023237</td>
</tr>
<tr>
<td>Discover</td>
<td>6011111111111117</td>
</tr>
<tr>
<td>Discover</td>
<td>6011000990139424</td>
</tr>
<tr>
<td>JCB</td>
<td>3530111333300000</td>
</tr>
<tr>
<td>JCB</td>
<td>3566002020360505</td>
</tr>
<tr>
<td>MasterCard</td>
<td>5555555555554444</td>
</tr>
<tr>
<td>MasterCard</td>
<td>5105105105105100</td>
</tr>
<tr>
<td>Visa</td>
<td>4111111111111111</td>
</tr>
<tr>
<td>Visa</td>
<td>4012888888881881</td>
</tr>
<tr>
<td>Visa</td>
<td>4222222222222</td>
</tr>
</tbody>
</table>
<p>So lets create a Mastercard credit card.</p>
<pre class="brush: ruby; title: ; notranslate">
irb(main):004:0&gt; credit_card = ActiveMerchant::Billing::CreditCard.new( :number =&gt; '5105105105105100', :month =&gt; '9', :year =&gt; '2007', :first_name =&gt; 'Mal', :last_name =&gt; 'Reynolds', :verification_value =&gt; '123', :type =&gt; 'master' )
</pre>
<p>Now we are ready to start billing. If you want to setup a one time payment it is quite easy.</p>
<pre class="brush: ruby; title: ; notranslate">
irb(main):007:0&gt; response = gateway.purchase(1000, credit_card)
irb(main):008:0&gt; response.success?
=&gt; true
</pre>
<p>If you go into your Paypal Manager and search for transactions you should see it appear.</p>
<p>To setup a recurring billing we need to use the <b>recurring</b> method of the gateway. The recurring method accepts the amount in cents, the credit card object and the time intervals to charge the card, at a minimum. There are other options available which you can find <a href="http://activemerchant.rubyforge.org/classes/ActiveMerchant/Billing/PayflowGateway.html">here</a>. Lets charge $10/month</p>
<pre class="brush: ruby; title: ; notranslate">
irb(main):009:0&gt; response = gateway.recurring(100, credit_card, :periodicity =&gt; :monthly)
irb(main):010:0&gt; response.success?
=&gt; true
irb(main):011:0&gt; response.profile_id
=&gt; &quot;RT0000000002&quot;
</pre>
<p>You can view the recurring billings in your Paypal Manager by clicking on Service Settings > Recurring Billings > Manage Profiles. You will probably want to store the profile_id in your database for when you need to edit details of the recurring billing. You can do it quite simply by calling the <b>recurring</b> method again. Let&#8217;s change the amount we want to bill to $20/week.</p>
<pre class="brush: ruby; title: ; notranslate">
irb(main):0012:0&gt; response = gateway.recurring(2000, nil, :profile_id =&gt; &quot;RT0000000001&quot;,  :periodicity =&gt; :weekly)
irb(main):013:0&gt; response.success?
=&gt; true
</pre>
<p>You can see here that we no longer need to pass in the credit card since we have the profile_id. We update the amount, and change the periodicity of the billing.</p>
<p>And that&#8217;s it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/10/payflow-recurring-billing-with-activemerchant/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>When to use Nested Controllers in your Rails apps</title>
		<link>http://www.sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/</link>
		<comments>http://www.sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 00:27:43 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[nested controllers]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=575</guid>
		<description><![CDATA[Nested controllers are great. I don&#8217;t care that they have &#8230; <a href="http://www.sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Nested controllers are great. I don&#8217;t care that they have a stigma attached to them they work well and make sense especially if your rails application has a Admin section for example. This allows you to easy separate the admin logic into its own controllers etc keeping your code clean and easy to manage.</p>
<p>So thats what we are going to do for this example.</p>
<h2>Step 1.  Create your admin controller</h2>
<p>You can use whichever process works best for you, but for this we are going to use script/generate:</p>
<pre class="brush: ruby; title: ; notranslate">
 ./script/generate controller admin
</pre>
<h2>Step 2.  Create your user controller</h2>
<p>You can use whichever process works best for you, but for this we are going to use script/generate:</p>
<pre class="brush: ruby; title: ; notranslate">
 ./script/generate controller admin/users
</pre>
<h2>Step 3.  Check to ensure proper inheritance</h2>
<p>The nested users controller should look something like so:</p>
<pre class="brush: ruby; title: ; notranslate">
class Admin::UsersController &lt; ApplicationController
end
</pre>
<h2>Step 4. Create the Routes</h2>
<p>The nested users controller should look something like so:</p>
<pre class="brush: ruby; title: ; notranslate">
map.namespace :admin do |admin|
  admin.resources :users
end
</pre>
<p>Before rails 2+ you had to do like like we have below. Personally l don&#8217;t mind it makes it a little easier to read but either option works fine</p>
<pre class="brush: ruby; title: ; notranslate">
map.resource(:admin) do |admin|
  admin.resources(:users, :controller =&gt; 'admin/users')
end
</pre>
<h2>Step 5. Wait there is no step 5 your done</h2>
<p>Now when you need to link to any of these actions its very simple keeping in mind that users is nested under the admin controller so all you have to do to create a link that goes to the index action on the nested users controller is add the admin prefix before</p>
<pre class="brush: ruby; title: ; notranslate">
 link_to &quot;Users&quot;, admin_users_url
</pre>
<p>The same applies when you are wanting to link to the show action of users all you do is loose the &#8220;s&#8221; on users as you would normally</p>
<pre class="brush: ruby; title: ; notranslate">
 link_to &quot;View User&quot;, admin_user_url(@user)
</pre>
<p>You can see a list of all the routes you have available to you by going to the root directory of your project in terminal and typing</p>
<pre class="brush: ruby; title: ; notranslate">
rake routes
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/09/when-to-use-nested-controllers-in-your-rails-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using passenger to run your rails applications when developing</title>
		<link>http://www.sentia.com.au/2009/09/using-passenger-to-run-your-rails-applications-when-developing/</link>
		<comments>http://www.sentia.com.au/2009/09/using-passenger-to-run-your-rails-applications-when-developing/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 07:21:04 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mac osx]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[macosx]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=494</guid>
		<description><![CDATA[If your like me and sick of having to run &#8230; <a href="http://www.sentia.com.au/2009/09/using-passenger-to-run-your-rails-applications-when-developing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If your like me and sick of having to run ./script/server every time you want to start your rails app using passenger locally is for you then. First thing is to install passenger like so</p>
<pre class="brush: ruby; title: ; notranslate">
sudo gem install passenger
</pre>
<p>Then you need to install the apache module for passenger.</p>
<pre class="brush: ruby; title: ; notranslate">
sudo passenger-install-apache2-module
</pre>
<p>Now once you do this you will be told to all the following lines to your httpd.conf file in apache. Now you can just add these lines no problems but l like to have it in its own conf file and since apache will also load all conf files in /etc/apache2/other/ directory just create a  passenger.conf file and add those lines in. Now these lines are different depending on how you installed ruby. I installed it in user/local keeping the orginal ruby version that ships with mac clean so mine looks like so</p>
<pre class="brush: ruby; title: ; notranslate">
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /usr/local/bin/ruby
</pre>
<p>To create the new passenger.conf file just run the below command assuming you have textmate installed.</p>
<pre class="brush: ruby; title: ; notranslate">
mate /etc/apache2/other/passenger.conf
</pre>
<p>Once you have cut and pasted those lines in save it and close the file. You then need to download the <a href=" http://www.fngtps.com/passenger-preference-pane">passenger preference pane</a>. Here is a link to the latest build <a href="http://www.fngtps.com/files/2/2009/09/PassengerPane-1.3.tgz">passenger-preference-pane1.3</a>. Download and install then fire it up.</p>
<p><img src="http://sentia.com.au/wp-content/uploads/2009/09/passenger_preference_pane.png" alt="passenger preference pane Using passenger to run your rails applications when developing" height="382px" width="500px" title="Using passenger to run your rails applications when developing" /></p>
<p>Now unlock it if need be and click on the + button to add a new site. A window will pop up and now just select the root of your rails app and click &#8220;open&#8221;. You can now change the address if need be but just defaults to (rails_app_name).local. Hit apply and your good to go.</p>
<p>So go back to your browser and type in that address and it will fire up and your up and running. Now you wont see the log like you are used to since your not running webrick etc but all you have to do is tail the development log by going to the root dir of your application in terminal and typing the following</p>
<pre class="brush: ruby; title: ; notranslate">
 tail -f log/development.log
</pre>
<p>And that&#8217;s it. You will need to restart passenger if you change the environment.rb file but thats simple enough via the preference pane. So no more ./script/server yay</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/09/using-passenger-to-run-your-rails-applications-when-developing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>no such file to load &#8212; capistrano/ext/multistage</title>
		<link>http://www.sentia.com.au/2009/09/no-such-file-to-load-capistranoextmultistage/</link>
		<comments>http://www.sentia.com.au/2009/09/no-such-file-to-load-capistranoextmultistage/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 06:55:02 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mac osx]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=488</guid>
		<description><![CDATA[I ran into this error the other day when running &#8230; <a href="http://www.sentia.com.au/2009/09/no-such-file-to-load-capistranoextmultistage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I ran into this error the other day when running &#8220;cap -T&#8221;</p>
<blockquote><p>/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#8217;: no such file to load &#8212; capistrano/ext/multistage (LoadError)</p></blockquote>
<p>So to fix this l did the following</p>
<blockquote><p>sudo gem uninstall capistrano<br />
sudo rm -rf /usr/bin/cap<br />
sudo gem install capistrano-ext<br />
sudo gem install capistrano</p></blockquote>
<p>Needed to do &#8220;sudo rm -rf /usr/bin/cap&#8221; as doing just the uninstall of capistrano didn&#8217;t remove all the files l needed it to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/09/no-such-file-to-load-capistranoextmultistage/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Setting up a new Rails app with Git</title>
		<link>http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/</link>
		<comments>http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 03:15:40 +0000</pubDate>
		<dc:creator>Michael Cindric</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[source control]]></category>

		<guid isPermaLink="false">http://sentia.com.au/?p=479</guid>
		<description><![CDATA[Ok so you want to be cool like all other &#8230; <a href="http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ok so you want to be cool like all other rails developers out there and use Git for your projects. Here is a quick run down of how you might go about it.</p>
<p>Firstly create your rails app and using terminal go into the root of that project.</p>
<p>Then create a top, project-level .gitignore file. I use textmate so this can be done like so</p>
<pre class="brush: ruby; title: ; notranslate">
$ mate .gitignore
</pre>
<p>Then add the following to the .gitignore file</p>
<pre class="brush: ruby; title: ; notranslate">
.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
</pre>
<p>You can also add more directories or files in here to ignore like css files if using sass for example, or your uploads directory.</p>
<p>Create some .gitignore files so the empty directories get tracked:</p>
<pre class="brush: ruby; title: ; notranslate">
$ touch log/.gitignore
$ touch tmp/.gitignore
</pre>
<p>and finally commit that bad boy</p>
<pre class="brush: ruby; title: ; notranslate">
$ git add .
$ git commit -m &quot;First commit&quot;
</pre>
<p>Running git add will tell git to track all the new files (Since first commit thats all of them). The commit will commit to your local Git repository and all that is left to do would be to add it to GitHub for example and your in business.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sentia.com.au/2009/09/setting-up-a-new-rails-app-with-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

