<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Juju: Ruby on Rails OSX Console Aliases</title>
    <link>http://juju.org/articles/2007/01/18/ruby-on-rails-osx-console-aliases</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Sufficiently Advanced Technology</description>
    <item>
      <title>Ruby on Rails OSX Console Aliases</title>
      <description>&lt;p&gt;I found that every day when I goto work in the morning I do the same things whenever I go to work on a rails project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;open firefox&lt;/li&gt;
&lt;li&gt;open iTerm&lt;/li&gt;
&lt;li&gt;cd ~/Code/railsprojectx&lt;/li&gt;
&lt;li&gt;mate .&lt;/li&gt;
&lt;li&gt;script/server&lt;/li&gt;
&lt;li&gt;open another tab in iTerm&lt;/li&gt;
&lt;li&gt;svn update&lt;/li&gt;
&lt;li&gt;goto http://localhost:3000&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sure it only takes a few seconds, but it wasn't very DRY.  :)  I figured I could create a shell alias to basically reduce all that to a single command.  I also thought I'd finally start giving &lt;a href="http://mongrel.rubyforge.org/"&gt;mongrel&lt;/a&gt; a try.  So this is what I came up with for an rdev command (along with a bunch of my other rails related aliases):&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;alias rdev='svn update;mate .;mongrel_rails start -d;sleep 2;open http://localhost:3000;tail -f log/development.log'

alias ss='script/server'
alias sc='script/console'
alias sg='script/generate'
alias sp='script/plugin'
alias sr='script/runner'
alias rt='rake test'
alias rtu='rake test:units'
alias rtr='rake test:recent'
alias mr='mongrel_rails start -d'
alias mrs='mongrel_rails stop'&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Just stick that in your ~/.profile file and either reopen your console or run:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_default "&gt;. ~/.profile&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 18 Jan 2007 10:07:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:10cbc38f-9e10-4f33-9d67-5ba7457b8304</guid>
      <author>Tony Buser</author>
      <link>http://juju.org/articles/2007/01/18/ruby-on-rails-osx-console-aliases</link>
      <category>Ruby On Rails</category>
      <category>Code</category>
      <category>OSX</category>
      <trackback:ping>http://juju.org/articles/trackback/892</trackback:ping>
    </item>
    <item>
      <title>"Ruby on Rails OSX Console Aliases" by Ulysses</title>
      <description>&lt;p&gt;I do the same thing. :-) I typically have a few projects on the go, so I write a script for each one. When I want to start working on a new project, I just source the relevant script.&lt;/p&gt;

&lt;p&gt;I also use pushd and popd so that I can run (say, ) console from wherever I happen to be without cd'ing to $PROJECT.&lt;/p&gt;</description>
      <pubDate>Sat, 27 Jan 2007 19:38:36 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:7d9437d9-f16d-45d9-849c-71b250b67438</guid>
      <link>http://juju.org/articles/2007/01/18/ruby-on-rails-osx-console-aliases#comment-894</link>
    </item>
    <item>
      <title>"Ruby on Rails OSX Console Aliases" by Jake Good</title>
      <description>&lt;p&gt;Another technique that I use is doing rake tasks... seems like a good fit.&lt;/p&gt;</description>
      <pubDate>Thu, 18 Jan 2007 12:33:30 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:b237d5b1-5cd3-4821-a3bd-505d8a2ecf63</guid>
      <link>http://juju.org/articles/2007/01/18/ruby-on-rails-osx-console-aliases#comment-893</link>
    </item>
  </channel>
</rss>
