<?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>Anlek&#039;s Blog</title>
	<atom:link href="http://blog.anlek.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.anlek.com</link>
	<description>Another Ruby On Rails and Technology Blog!</description>
	<lastBuildDate>Fri, 05 Mar 2010 20:35:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>uninitialized constant Rails::Railtie</title>
		<link>http://blog.anlek.com/2010/03/uninitialized-constant-railsrailtie/</link>
		<comments>http://blog.anlek.com/2010/03/uninitialized-constant-railsrailtie/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 01:12:39 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=146</guid>
		<description><![CDATA[A few days ago my app just stopped working, after a quick google search I found a great site that explains why:
Jamie van Dyke that pointed out that inherited_resources has now fully moved to Rails 3 and will no longer work on Rails 2.3 or lower. Now Jamie seems to point to use older versions [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago my app just stopped working, after a quick google search I found a great site that explains why:</p>
<p><a title="Jamie van Dyke" href="http://www.jamievandyke.com/post/378395109/uninitialized-constant-rails-railtie">Jamie van Dyke</a> that pointed out that inherited_resources has now fully moved to Rails 3 and will no longer work on Rails 2.3 or lower. Now Jamie seems to point to use older versions of the gem because they changed the code for Rails 3.0, however I feel that his versions aren&#8217;t the latest version you could be running. So I wanted to add my 2 cents by showing you what I use:</p>
<p>In my environment.rb make sure you have both these lines in:<br />
<code>config.gem "inherited_resources", :version =&gt; "1.0.2"<br />
config.gem "responders", :version =&gt; "0.4.2"</code><br />
Hope that helps some of you out!</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2010/03/uninitialized-constant-railsrailtie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>uninitialized constant Test::Unit::TestResult::TestResultFailureSupport Error</title>
		<link>http://blog.anlek.com/2009/10/uninitialized-constant-test-unit-testresult-testresultfailuresupport-error/</link>
		<comments>http://blog.anlek.com/2009/10/uninitialized-constant-test-unit-testresult-testresultfailuresupport-error/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 17:46:57 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[RSpec]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=137</guid>
		<description><![CDATA[Today trying to run my RSpec tests and I get an odd error:
uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError)
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in `const_missing&#8217;
/usr/local/lib/ruby/gems/1.8/gems/test-unit-2.0.3/lib/test/unit/testresult.rb:28
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#8217;
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require&#8217;
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require&#8217;
&#8230;.
After doing some research online I found out that the issue is caused by Shoulda and Mocha being included in my app. It seems that if you put a gem dependence for Shoulda before Mocha,  you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>Today trying to run my RSpec tests and I get an odd error:</p>
<blockquote><p>uninitialized constant Test::Unit::TestResult::TestResultFailureSupport (NameError)<br />
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in `const_missing&#8217;<br />
/usr/local/lib/ruby/gems/1.8/gems/test-unit-2.0.3/lib/test/unit/testresult.rb:28<br />
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require&#8217;<br />
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require&#8217;<br />
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require&#8217;<br />
&#8230;.</p></blockquote>
<p>After doing some research online I found out that the issue is caused by Shoulda and Mocha being included in my app. It seems that if you put a gem dependence for Shoulda before Mocha,  you&#8217;ll get this error, so the <strong>fix</strong> is to place the gem dependence for Mocha before Shoulda.</p>
<blockquote><p>config.gem &#8220;rspec&#8221;, :lib =&gt; false, :version =&gt; &#8220;&gt;=1.2.6&#8243;<br />
config.gem &#8220;rspec-rails&#8221;, :lib =&gt; &#8217;spec/rails&#8217;, :version =&gt; &#8220;&gt;=1.2.6&#8243;<br />
config.gem &#8220;mocha&#8221;<br />
config.gem &#8220;thoughtbot-shoulda&#8221;, :lib =&gt; &#8220;shoulda&#8221;, :source =&gt; &#8220;http://gems.github.com&#8221;</p></blockquote>
<p>Hope that helps</p>
<p><strong>UPDATE:</strong></p>
<p>I hit the same error having shoulda in my environment.rb file, moving it to the test.rb (in environment folder) fixed the issue as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/10/uninitialized-constant-test-unit-testresult-testresultfailuresupport-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Error with fsevent and autospec (on Mac)</title>
		<link>http://blog.anlek.com/2009/10/error-with-fsevent-version-0-1-2-and-autospec/</link>
		<comments>http://blog.anlek.com/2009/10/error-with-fsevent-version-0-1-2-and-autospec/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 05:16:18 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[RSpec]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=129</guid>
		<description><![CDATA[Today I&#8217;ve upgraded my gems and noticed that when running my autospec I get an odd error:
[01:09:25 /usr/local/lib/ruby/gems/1.8/gems/ruby-ole-1.2.10/lib/ole/storage/base.rb:146:load]
WARN   root name was &#8220;R&#8221;
And my autospec would keep printing out:


sh: line 1:  6303 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep &#8216;/Users/andrew/rails_apps/example_com&#8217; 2&#62;&#38;1
sh: line 1:  6307 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep &#8216;/Users/andrew/rails_apps/example_com&#8217; 2&#62;&#38;1

Unfortunately I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve upgraded my gems and noticed that when running my autospec I get an odd error:</p>
<blockquote><p>[01:09:25 /usr/local/lib/ruby/gems/1.8/gems/ruby-ole-1.2.10/lib/ole/storage/base.rb:146:load]</p>
<p>WARN   root name was &#8220;R&#8221;</p></blockquote>
<div>And my autospec would keep printing out:</div>
<div>
<blockquote>
<div>sh: line 1:  6303 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep &#8216;/Users/andrew/rails_apps/example_com&#8217; 2&gt;&amp;1</div>
<div>sh: line 1:  6307 Trace/BPT trap          /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.1.2/fsevent/darwin/fsevent_sleep &#8216;/Users/andrew/rails_apps/example_com&#8217; 2&gt;&amp;1</div>
</blockquote>
<div>Unfortunately I don&#8217;t have the time to look into the fsevent code to see if I can make a work around, however I found that you can remove the gem (&#8217;<strong><code>sudo gem uninstall autotest-fsevent</code></strong>&#8216;) and install the older version (&#8217;<strong><code>sudo gem install autotest-fsevent --version 0.1.1</code></strong>&#8216;)</div>
</div>
<div>Hopefully this helps someone out!</div>
<div><strong>UPDATE</strong>: I forgot to mention I was using a Mac OS X 10.5.8, and based on the <a href="http://github.com/svoop/autotest-fsevent/blob/master/History.txt" target="_blank">History.txt</a> they made changes effecting Macs.</div>
<div><strong>UPDATE 2 (Oct 22, 09):</strong> It seems that the same issue exists in fsevent 0.1.3 as well</div>
<div><strong>UPDATE 3 (Mar 05, 2010):</strong> Issue still present in 0.2.1 however I found out that the error is only for OS X 10.5 and will not happen on OS X 10.6.</div>
<div>The full error message is:</div>
<p><code>/usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.2.1/fsevent/darwin/fsevent_sleep ; exit;<br />
~%  /usr/local/lib/ruby/gems/1.8/gems/autotest-fsevent-0.2.1/fsevent/darwin/fsevent_sleep ; exit;<br />
dyld: unknown required load command 0x80000022<br />
zsh: trace trap</code></p>
<p><strong>The only work around (outside of downgrading to version 0.1.1) is to copy fsevent_sleep from version 0.1.1 to version 0.2.1. However I&#8217;m not sure how stable that solution is.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/10/error-with-fsevent-version-0-1-2-and-autospec/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Setting Session Cookie across your whole domain (in Rails 2.3)</title>
		<link>http://blog.anlek.com/2009/08/setting-session-cookie-across-your-whole-domain-in-rails-23/</link>
		<comments>http://blog.anlek.com/2009/08/setting-session-cookie-across-your-whole-domain-in-rails-23/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 19:57:43 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=119</guid>
		<description><![CDATA[I have an application that has subdomains based on account (i.e. user1.example.com) but I want one login for the whole system, no matter what subdomain/account your in. In rails 2.2 I&#8217;d set it up by setting:

ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_domain] = '.domain.com'

Notice the leading &#8216;.&#8217; (very much needed)
But in rails 2.3 it doesn&#8217;t work, so I found from Mark [...]]]></description>
			<content:encoded><![CDATA[<p>I have an application that has subdomains based on account (i.e. user1.example.com) but I want one login for the whole system, no matter what subdomain/account your in. In rails 2.2 I&#8217;d set it up by setting:<br />
<code><br />
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_domain] = '.domain.com'<br />
</code><br />
<em>Notice the leading &#8216;.&#8217; </em>(very much needed)</p>
<p>But in rails 2.3 it doesn&#8217;t work, so I found from <a href="http://www.markgandolfo.com.au/archive" target="_blank">Mark Gandolfo</a> you can set it using:<br />
<code><br />
config.action_controller.session = {<br />
:session_key =&gt; '_my_session_id',<br />
:secret      =&gt; '..your_secret_code_here..',<br />
<strong>:domain =&gt; ".domain.com"</strong><br />
}<br />
</code></p>
<p>Hope that helps someone! <img src='http://blog.anlek.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>UPDATE:</strong></p>
<p>If what I&#8217;m showing here is to simple for your needs, I did find a great post on how to deal with multiple domains (not just subdomains) in rails 2.3 at <a title="Code Tunes" href="http://codetunes.com/2009/04/17/dynamic-cookie-domains-with-racks-middleware/" target="_blank">Code Tunes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/08/setting-session-cookie-across-your-whole-domain-in-rails-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unobtrusive Javascript Presentation</title>
		<link>http://blog.anlek.com/2009/06/unobtrusive-javascript-presentation/</link>
		<comments>http://blog.anlek.com/2009/06/unobtrusive-javascript-presentation/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 18:49:51 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Presentation]]></category>
		<category><![CDATA[DemoCampMississauga]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[unobtrusive]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=113</guid>
		<description><![CDATA[A few weeks ago I was asked if I could give a presentation at the upcoming new DemoCampMississauga and last night I got to present on Unobtrusive JavaScript. Hopefully people learned lots.
In the spirit of sharing, I want to make sure that my presentation and all the files I created are accessible to all users [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I was asked if I could give a presentation at the upcoming new DemoCampMississauga and last night I got to present on Unobtrusive JavaScript. Hopefully people learned lots.</p>
<p>In the spirit of sharing, I want to make sure that my presentation and all the files I created are accessible to all users (whether you came to the demo camp or not).<br />
I figured posting everything on Github was the best solution: <a href="http://github.com/anlek/unobtrusive_javascript_presentation">http://github.com/anlek/unobtrusive_javascript_presentation</a></p>
<p>Also for the next month or so, I&#8217;m going to leave up the demo site that I created (from the code provided on github) to compare GOOD (unobtrusive) javascript to the BAD javascript. Demo site at: http://todonts.anlek.com/</p>
<p>Please leave a comments to let me know what you think!</p>
<p><strong>UPDATE:</strong><br />
I figured I should give you other places to find more info:<br />
<a href="http://peepcode.com/products/unobtrusive-prototype-js">http://peepcode.com/products/unobtrusive-prototype-js</a><br />
<a href="http://railsenvy.com/2008/1/3/unobtrusive-javascript">http://railsenvy.com/2008/1/3/unobtrusive-javascript</a><br />
Please let me know if there are other links I can add here.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/06/unobtrusive-javascript-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ERROR:  While executing gem &#8230; (Zlib::BufError) in windows</title>
		<link>http://blog.anlek.com/2009/05/error-while-executing-gem-zlibbuferror-in-windows/</link>
		<comments>http://blog.anlek.com/2009/05/error-while-executing-gem-zlibbuferror-in-windows/#comments</comments>
		<pubDate>Thu, 21 May 2009 19:16:05 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=102</guid>
		<description><![CDATA[So today I&#8217;m trying to update my gems and I get this error on random gems like rspec-rails but rspec updated fine. 
I googled the issue and found great articles on the error, unfortunately none of them really worked. This brought me to posting what I did to fix it the error.
First, based on dontrepeatyourself, [...]]]></description>
			<content:encoded><![CDATA[<p>So today I&#8217;m trying to update my gems and I get this error on random gems like rspec-rails but rspec updated fine. </p>
<p>I googled the issue and found great articles on the error, unfortunately none of them really worked. This brought me to posting what I did to fix it the error.</p>
<p>First, based on <a href="http://dontrepeatyourself.wordpress.com/2007/05/14/zlibbuferror/">dontrepeatyourself</a>, I updated to the latested gem system (version 1.3.3).<br />
<code>gem update --system</code><br />
Based on what I&#8217;ve read on the site, it fixed the issue for a lot of people (keep in mind this is an article from 2007) but it didn&#8217;t fix my issue. I continued looking for another solution, and I found a bunch of Window&#8217;s specific fixes that involved altering ruby code which I wasn&#8217;t going to attempt. Some article comments said to re-install ruby but who has time for that? <a href="http://www.misuse.org/science/2007/09/07/ruby-zlib-buffer-error-on-windows/">Other posts (in the comments)</a> said to download windows specific <a href="http://gnuwin32.sourceforge.net/packages/gzip.htm">GZip ports</a> but that also had no effect. I even installed a <a href="http://www.rubyforge.org/projects/zliby">zliby gem</a> hoping it would replace the Zlib but that still didn&#8217;t work. So I did what every windows user should do when the problem isn&#8217;t getting fixed, <strong>REBOOT!</strong>. After the reboot, gems updated without a problem (well except of the usual <a href="http://blog.anlek.com/2008/09/installing-updating-sqlite3-on-windows/">SQLite3 update error on windows</a></p>
<h3>Long story short</h3>
<p>try calling<br />
<code>gem update --system</code><br />
And then <strong>Reboot</strong> your system and see if that fixes it</p>
<p>Please leave me a comment to let me know if this helped you</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/05/error-while-executing-gem-zlibbuferror-in-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Removing a remote git branch</title>
		<link>http://blog.anlek.com/2009/05/removing-a-remote-git-branch/</link>
		<comments>http://blog.anlek.com/2009/05/removing-a-remote-git-branch/#comments</comments>
		<pubDate>Wed, 06 May 2009 20:34:38 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Git]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=96</guid>
		<description><![CDATA[I was showing someone how great git is using the new version of MSYSgit (version 1.6.2.2.1669.g7eaf8) and found out that calling git push &#8211;all will push ALL branches, even if they don&#8217;t exist on the remote server. So I ended up pushing a development branch that was very unstable and wanted to remove it. Luckily [...]]]></description>
			<content:encoded><![CDATA[<p>I was showing someone how great git is using the new version of MSYSgit (version 1.6.2.2.1669.g7eaf8) and found out that calling git push &#8211;all will push ALL branches, even if they don&#8217;t exist on the remote server. So I ended up pushing a development branch that was very unstable and wanted to remove it. Luckily a quick google search pointed me to this great blog post: <a href="http://unpluggable.com/?p=129">.liferc</a>.<br />
Reading this, very to the point, post I was a little confused on what is my repository. So I figured I&#8217;d clearify a bit by what you need to do.<br />
Say you have a git branch that you pushed called &#8216;<em>new_feature_26</em>&#8216; and you needed to remove it from your remote server called <em>origin</em>, the command would be:</p>
<p><code>git push origin :heads/new_feature_26</code></p>
<p>I&#8217;m not exactly sure how this works by deleting the remote branch but I know it does!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/05/removing-a-remote-git-branch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 2.3 Templates on Windows</title>
		<link>http://blog.anlek.com/2009/04/rails-templates/</link>
		<comments>http://blog.anlek.com/2009/04/rails-templates/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 05:16:51 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=70</guid>
		<description><![CDATA[In Rails 2.3, templates are simple ruby files containing DSL for adding plugins, gems, initializers, etc. to your freshly created Rails project. To apply the template, you need to provide the rails generator with location of the template you wish to apply, using -m option.

Reading up on the commands in the template system and watching [...]]]></description>
			<content:encoded><![CDATA[<p>In Rails 2.3, <a href="http://weblog.rubyonrails.org/2009/3/16/rails-2-3-templates-engines-rack-metal-much-more">templates</a> are simple ruby files containing DSL for adding plugins, gems, initializers, etc. to your freshly created Rails project. To apply the template, you need to provide the rails generator with location of the template you wish to apply, using -m option.</p>
<p>
<a href="http://m.onkey.org/2008/12/4/rails-templates">Reading up</a> on the commands in the template system and watching the <a href="http://railscasts.com/episodes/148-app-templates-in-rails-2-3">railscasts.com</a> episode, I got fired up on the possibilities of such a simple yet amazing system. So I dove in and started creating my base template. I was so excited that I write the whole template out in one go and than ran it. The result: <strong>FAIL</strong>!</p>
<p>
After including some gems, I ran a <code>rake "gems:install"</code> and ended up with an <code>Exec format error</code>. I googled the problem and found that mostly Windows users were getting this error and the recommend solution was to use a rake.bat (or rake.cmd) instead of the rake command from ruby. So I wrote my own function:<br />
<code><br />
#HELPERS<br />
def win_env?<br />
  RUBY_PLATFORM=~ /win32/<br />
end<br />
<br/>def rake(command, options = {})<br />
  env = options[:env] || 'development'<br />
  log 'rake', "#{command} in #{env} "<br />
  sudo = win_env?  ? '' : (options[:sudo] ? 'sudo' : '')<br />
  rake_cmd = win_env? ? "rake.bat" : 'rake'<br />
  in_root { run("#{sudo} #{rake_cmd} #{command} RAILS_ENV=#{env}", false) }<br />
end<br />
</code></p>
<p>Another thing that I was able to fix is the &#8220;Sudo&#8221; option, works great on UNIX systems but not so great in Windows. I haven&#8217;t been able to test it but I&#8217;m pretty sure this will work on a UNIX system without any issues.</p>
<p>All worked out great till I ran <code>run "cucumber features -n"</code> and got the exact same error! Lucky there was a .bat version of cucmber command so I was able to easily fix it by calling <code>run "cucumber#{win_env? ? '.bat': ''} features -n"</code></p>
<p>One more small issue I found in Windows when making a template was in the git command. When doing a commit you need to use double quotes inside the commit message otherwise you get an <code>error: pathspec 'commit'' did not match any file(s) known to git.</code></p>
<p>If you&#8217;re interested in downloading my template, you can download it from <a href="http://blog.anlek.com/wp-content/uploads/2009/04/base_template.rb">here</a></p>
<p>If you really want to see the power of template system I recommend you read the template_runner.rb in the rails folder. Enjoy and have fun with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/04/rails-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git branch and status info in prompt (on Windows)</title>
		<link>http://blog.anlek.com/2009/02/git-branch-and-status-info-in-prompt-on-windows/</link>
		<comments>http://blog.anlek.com/2009/02/git-branch-and-status-info-in-prompt-on-windows/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 07:21:56 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=47</guid>
		<description><![CDATA[I found this great article on Intridea Development Blog on how to put git status in your prompt window. It&#8217;s an amazingly useful addon as I often forget what branch I&#8217;m on in my project or if I changed anything. The problem is that it&#8217;s written for OSX/Linux users. So I&#8217;d like to show you [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_53" class="wp-caption alignleft" style="width: 543px"><a href="http://blog.anlek.com/wp-content/uploads/2009/02/git_bash1.jpg"><img src="http://blog.anlek.com/wp-content/uploads/2009/02/git_bash1.jpg" alt="Git Bash with Git Branch and Status" title="Git Bash with Git Branch and Status" width="533" height="213" class="size-full wp-image-53" /></a><p class="wp-caption-text">Git Bash with Branch and Status Info</p></div>
<p>I found this great article on <a href="http://www.intridea.com/posts/git-status-in-your-prompt" target="_blank">Intridea Development Blog</a> on how to put git status in your prompt window. It&#8217;s an amazingly useful addon as I often forget what branch I&#8217;m on in my project or if I changed anything. The problem is that it&#8217;s written for OSX/Linux users. So I&#8217;d like to show you what you need to do to get this same functionality in Git Bash on Windows. (Git Bash using <a href="http://code.google.com/p/msysgit/" target="_blank">MSysGit</a>)</p>
<p>To make this addon work with Git Bash you need to create your BASH settings file. To do this go to your <a href="http://en.wikipedia.org/wiki/Home_directory">home directory</a> and create a file called &#8216;.bashrc&#8217;<br/><br />
<em>Because Windows Explorer will not let you create a file without a name (only an extension) we need to use Git Bash (or command prompt): Open Git Bash (by default it will be in the home directory) and type in &#8220;touch .bashrc&#8221;</em>
</p>
<p>
  Inside your .bashrc file type this: (copied from <a href="http://www.intridea.com/posts/git-status-in-your-prompt" target="_blank">Intridea Development Blog</a>):<br />
<code><br />
function parse_git_dirty {<br />
  [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] &#038;&#038; echo "*"<br />
}<br />
function parse_git_branch {<br />
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"<br />
} <br/><br />
export PS1='\u:\[\033[0;32m\]\w\[\033[0;33m\]$(parse_git_branch)\[\e[0m\]: '<br />
</code></p>
<p>Now open a new Git Bash window and you should see your new prompt. Keep in mind it will not show up in folders that aren&#8217;t git repositories and it will slow down your prompt a bit because it has to check the status of your Git repository every time you hit ENTER.</p>
<p><strong>Update:</strong> It seems the new version of <a href="http://code.google.com/p/msysgit/">msysGit</a> comes with this feature built in</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/02/git-branch-and-status-info-in-prompt-on-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Everything You Know About CSS Is Wrong Review</title>
		<link>http://blog.anlek.com/2009/02/everything-you-know-about-css-is-wrong-review/</link>
		<comments>http://blog.anlek.com/2009/02/everything-you-know-about-css-is-wrong-review/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 06:19:39 +0000</pubDate>
		<dc:creator>andrew.kalek</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://blog.anlek.com/?p=39</guid>
		<description><![CDATA[Internet Explorer 8 being release soon and Microsoft putting in the work to make IE8 pass the Acid 2 test, SitePoint decided to write about the new way to do visual layout using CSS tables that are both easy or reliable across the the major browsers. The name of the book is Everything You Know [...]]]></description>
			<content:encoded><![CDATA[<p>Internet Explorer 8 being release soon and Microsoft putting in the work to make IE8 pass the <a href="http://en.wikipedia.org/wiki/Acid2" target="_blank">Acid 2 test</a>, <a title="SitePoint" href="http://www.sitepoint.com" target="_blank">SitePoint</a> decided to write about the new way to do visual layout using CSS tables that are both easy or reliable across the the major browsers. The name of the book is <a href="http://www.sitepoint.com/books/csswrong1/" target="_blank">Everything You Know About CSS Is Wrong</a> by Rachel Andrew and Kevin Yank, published by <a href="http://www.sitepoint.com/" target="_blank">SitePoint</a> and available now.</p>
<p><strong>The Book</strong></p>
<p>The book comes in at 111 pages long and is as beautiful as <a href="http://www.sitepoint.com/books/design1/" target="_blank">The Principles of Beautiful Web Design</a> which is very stunning (visually). Now I own a few books from SitePoint and find that their CSS code is <span style="text-decoration: underline;">very</span> clean and very well written but was slightly disappointed with this book. I bought this book without reading other reviews, I only watched the video on <a href="http://www.youtube.com/watch?v=FSFYSzbDEKE" target="_blank">YouTube</a> published by SitePoint about the book and as dry as this video is it got me interested enough to get the book.<br />
I was able to read the book in just two sittings. The book is very simple and is aimed for both novice and experts.</p>
<p><strong>My Issues</strong></p>
<p>My issue with the book is that if you&#8217;re new to CSS, you don&#8217;t know anything, therefore your knowledge can&#8217;t be wrong (playing off the title). I believe there is just a bit too much hand holding. I read <a href="http://www.sitepoint.com/books/rails1/" target="_blank">Build Your Own Ruby on Rails Web Applications</a> and thought that even though the book isn&#8217;t design to cover CSS, it had one of the best and cleanest CSS in any book I have ever read (which isn&#8217;t a whole lot). While the CSS in this book was not as clean as I was hoping.</p>
<p>One of the biggest disappointments of this book is that it covers only one subject, which is table layout using CSS. Even though they managed to stretch it out over 111 pages, it really could have been written in much much less. It really feels like a missing chapter from <a title="The Art &amp; Science of CSS" href="http://www.sitepoint.com/books/cssdesign1/" target="_blank">The Art &amp; Science Of CSS</a>.</p>
<p><strong>Conclusion</strong></p>
<p>All in all, I think that table layout in CSS is the way of the future and if you want to learn it step by step than this book is for you. The book also covers how to make a layout for IE 7 (or less) which you won&#8217;t find easily online. If you want to save yourself a few dollars, I found a great post from <a href="http://www.digital-web.com/articles/everything_you_know_about_CSS_Is_wrong/" target="_blank">Digital Web Magazine</a> that pretty much summarizes the book perfectly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.anlek.com/2009/02/everything-you-know-about-css-is-wrong-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
