<?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>Sara Trice</title>
	<atom:link href="http://saratrice.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://saratrice.com</link>
	<description>Just a programmin&#039;, bellydancin&#039;, cake bakin&#039; kinda girl</description>
	<lastBuildDate>Tue, 17 Jan 2012 23:07:03 +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>Quickie: How to add a blank option to options_from_collection_for_select</title>
		<link>http://saratrice.com/2011/12/28/quickie-how-to-add-a-blank-option-to-options_from_collection_for_select/</link>
		<comments>http://saratrice.com/2011/12/28/quickie-how-to-add-a-blank-option-to-options_from_collection_for_select/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 20:52:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=259</guid>
		<description><![CDATA[&#60;%= select_tag "some_select", ("&#60;option&#62;&#60;/option&#62;" + options_from_collection_for_select(@foo, "id", "item")).html_safe %&#62;]]></description>
			<content:encoded><![CDATA[<pre>&lt;%= select_tag "some_select", ("&lt;option&gt;&lt;/option&gt;" + options_from_collection_for_select(@foo, "id", "item")).html_safe %&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/12/28/quickie-how-to-add-a-blank-option-to-options_from_collection_for_select/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using javan/whenever on Engine Yard Cloud</title>
		<link>http://saratrice.com/2011/09/28/using-javanwhenever-on-engine-yard/</link>
		<comments>http://saratrice.com/2011/09/28/using-javanwhenever-on-engine-yard/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 19:31:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=252</guid>
		<description><![CDATA[Things I wish I&#8217;d have known: 1. It does not matter if whenever is in your gemfile, you have to SSH to your EY server and install whenever as such: sudo gem install whenever 2. It will probably complain that you don&#8217;t have i18n installed, so: sudo gem install i18n EDIT: You will have to [...]]]></description>
			<content:encoded><![CDATA[<p>Things I wish I&#8217;d have known:<br />
1. It does not matter if whenever is in your gemfile, you have to SSH to your EY server and install whenever as such: sudo gem install whenever<br />
2. It will probably complain that you don&#8217;t have i18n installed, so: sudo gem install i18n</p>
<p>EDIT: You will have to repeat the two steps above ANYTIME you restart your EY instance!</p>
<p>3. If you want your crontab updated on deploy, make a file named deploy/before_restart.rb and stick this in it (make sure you replace &#8216;yourAppNameHere&#8217;, derp):</p>
<pre>@rails_env = node[:environment][:framework_env]
run "cd #{release_path}; whenever --set environment=#{@rails_env}; whenever --update-crontab 'yourAppNameHere'"</pre>
<p>This is called a &#8216;deploy hook&#8217; and <a href="http://docs.engineyard.com/use-deploy-hooks-with-engine-yard-appcloud.html" target="_blank">here&#8217;s more info</a>.</p>
<p>I found the idea for this in <a href="http://webcache.googleusercontent.com/search?q=cache:ppp5Xh-9FocJ:community.engineyard.com/discussions/questions/786-gems-not-installing+%22%40rails_env+%3D+node%5B:environment%5D%5B:framework_env%5D%22&amp;cd=10&amp;hl=en&amp;ct=clnk&amp;gl=us" target="_blank">an old EY forum post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/09/28/using-javanwhenever-on-engine-yard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Illinois Home Bakeries &#8211; for farmer&#8217;s markets only</title>
		<link>http://saratrice.com/2011/09/09/illinois-home-bakeries-for-farmers-markets-only/</link>
		<comments>http://saratrice.com/2011/09/09/illinois-home-bakeries-for-farmers-markets-only/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 03:24:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[cakes]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=250</guid>
		<description><![CDATA[Interesting tidbit about a new law that is being passed. IL Senate Bill 840 allows for &#8220;Cottage food operations&#8221; (i.e. you can use your home kitchen), with several stipulations, if and only if you are selling goods at a farmers&#8217; market. So if I wanted to sell my cakes at a farmer&#8217;s market and got [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting tidbit about a new law that is being passed. IL Senate Bill 840 allows for &#8220;Cottage food operations&#8221; (i.e. you can use your home kitchen), with several stipulations, if and <strong>only </strong>if you are selling goods at a farmers&#8217; market. So if I wanted to sell my cakes at a farmer&#8217;s market and got the appropriate paperwork, I could, but I still couldn&#8217;t sell them to individuals specifically out of my home. I&#8217;d <strong>have </strong>to have a table at a farmer&#8217;s market. Which is pretty much useless to me. Oh well, it&#8217;s a step in the right direction.</p>
<p><a href="http://www.news-gazette.com/news/politics-and-government/2011-08-25/new-law-settles-dispute-public-health-officials.html" target="_blank">Article from the News-Gazette<br />
</a><a href="http://www.ilstewards.org/blog/8509" target="_blank">Article from the IL Stewardship Alliance<br />
</a><a href="http://ilga.gov/legislation/billstatus.asp?DocNum=840&amp;GAID=11&amp;GA=97&amp;DocTypeID=SB&amp;LegID=55671&amp;SessionID=84" target="_blank">Senate bill 840 </a></p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/09/09/illinois-home-bakeries-for-farmers-markets-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jsTree: adding Expand All and Collapse All buttons</title>
		<link>http://saratrice.com/2011/05/04/jstree-adding-expand-all-and-collapse-all-buttons/</link>
		<comments>http://saratrice.com/2011/05/04/jstree-adding-expand-all-and-collapse-all-buttons/#comments</comments>
		<pubDate>Wed, 04 May 2011 19:50:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=240</guid>
		<description><![CDATA[The documentation for jsTree is thorough, but not particularly easy to read. If you are looking for an easy way to add &#8220;Expand All&#8221; and &#8220;Collapse All&#8221; buttons, here&#8217;s one way: &#60;input type="button" value="Collapse All" onclick="$('#tree_container_id').jstree('close_all');"&#62; &#60;input type="button" value="Expand All" onclick="$('#tree_container_id').jstree('open_all');"&#62; where &#8216;#tree_container_id&#8217; is, of course, the ID of the container node for your tree.]]></description>
			<content:encoded><![CDATA[<p>The documentation for jsTree is thorough, but not particularly easy to read. If you are looking for an easy way to add &#8220;Expand All&#8221; and &#8220;Collapse All&#8221; buttons, here&#8217;s one way:</p>
<p><code>&lt;input type="button" value="Collapse All" onclick="$('#tree_container_id').jstree('close_all');"&gt;<br />
&lt;input type="button" value="Expand All" onclick="$('#tree_container_id').jstree('open_all');"&gt;<br />
</code></p>
<p>where &#8216;#tree_container_id&#8217; is, of course, the ID of the container node for your tree.</p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/05/04/jstree-adding-expand-all-and-collapse-all-buttons/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Uploadify: changing scriptData with dropdowns</title>
		<link>http://saratrice.com/2011/04/11/uploadify-changing-scriptdata-with-dropdowns/</link>
		<comments>http://saratrice.com/2011/04/11/uploadify-changing-scriptdata-with-dropdowns/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 20:26:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=227</guid>
		<description><![CDATA[Uploadify is a pretty awesome jQuery/flash uploader. It&#8217;s made even more awesome by the stuff you can do with it on the fly. For example, if you want to pass a variable chosen from a dropdown via the uploader, you can use uploadifySettings() to do so. Some people appear to have problems with this part, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.uploadify.com" target="_blank">Uploadify</a> is a pretty awesome jQuery/flash uploader. It&#8217;s made even more awesome by the stuff you can do with it on the fly.</p>
<p>For example, if you want to pass a variable chosen from a dropdown via the uploader, you can use <a href="http://www.uploadify.com/documentation/methods/uploadifysettings/" target="_blank">uploadifySettings()</a> to do so. Some people appear to have problems with this part, so here&#8217;s how I did it. (I&#8217;m not going to show you all the settings, since the <a href="http://www.uploadify.com/documentation/">docs</a> give you a pretty good idea how to set it up. )</p>
<p>Say you have a dropdown in your form with the id of &#8216;upload_type&#8217;:<br />
<code><br />
&lt;select id="upload_type" name="upload_type"&gt;<br />
&lt;option&gt;&lt;/option&gt;<br />
&lt;option value="1"&gt;First type&lt;/option&gt;<br />
&lt;option value="2"&gt;Second type&lt;/option&gt;<br />
&lt;/select&gt;<br />
</code></p>
<p>In your jQuery $(document).ready function (but outside the $(&#8216;#upload&#8217;).uploadify function), put something like this:<br />
<code><br />
$('#upload_type').change(function() {<br />
var type_val = $(this).val();<br />
$('#upload').uploadifySettings("scriptData", {"upload_type" : type_val});<br />
});<br />
</code><br />
Which means &#8220;Whenever the form field identified with &#8216;upload_type&#8217; changes, update the &#8216;upload_type&#8217; variable in scriptData if it exists; if it does not already exist in scriptData, add it.&#8221;</p>
<p>Note: I&#8217;ve only tried this in Uploadify 2.1.4.</p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/04/11/uploadify-changing-scriptdata-with-dropdowns/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Music industry shifts to being a service? Good news, bad news&#8230;</title>
		<link>http://saratrice.com/2011/03/23/music-industry-shifts-to-being-a-service-good-news-bad-news/</link>
		<comments>http://saratrice.com/2011/03/23/music-industry-shifts-to-being-a-service-good-news-bad-news/#comments</comments>
		<pubDate>Wed, 23 Mar 2011 18:01:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ramblings]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=223</guid>
		<description><![CDATA[Here&#8217;s an interesting read from Ars Technica: Did file-sharing cause recording industry collapse? Economists say no The most interesting paragraph I see in this article is this one: So what is emerging is an increasingly &#8220;ephemeral&#8221; global music culture based not upon the purchasing of discrete physical packages of music, but on the discovery and [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an interesting read from Ars Technica:</p>
<p><a href="http://arstechnica.com/tech-policy/news/2011/03/is-file-sharing-the-global-future.ars" target="_blank">Did file-sharing cause recording industry collapse? Economists say no</a></p>
<p>The most interesting paragraph I see in this article is this one:</p>
<blockquote><p>So what is emerging is an increasingly &#8220;ephemeral&#8221; global music culture based not upon the purchasing of discrete physical packages of music, but on the discovery and subsequent promotion of musicians through file sharing. The big winner in this model is not the digital music file seller, but the touring band, whose music is easily discoverable on the &#8216;Net. As with so much of the rest of the emerging world economy, the shift is away from buying things and towards purchasing services—in this case tickets to concerts and related activities.</p></blockquote>
<p>So I have to wonder &#8211; to my friends (and my husband) who count on selling merch at their unpaid performances &#8211; is this a game changer? Will musicians from now on be ultimately unable to make a living unless they go on the road &#8211; and stay there?</p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/03/23/music-industry-shifts-to-being-a-service-good-news-bad-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing CKEditor in Ruby on Rails with Cucumber/Capybara</title>
		<link>http://saratrice.com/2011/03/09/testing-ckeditor-in-ruby-on-rails-with-cucumbercapybara/</link>
		<comments>http://saratrice.com/2011/03/09/testing-ckeditor-in-ruby-on-rails-with-cucumbercapybara/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 00:25:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=215</guid>
		<description><![CDATA[I have a textarea with the id of &#8220;request_details&#8221;, made into a CKEditor instance by jQuery: $(&#8216;#request_details&#8217;).ckeditor(); (Check this page if you need some help getting CKEditor to work with jQuery, it&#8217;s dead simple) Feature looks like this:  And I fill in "Here are some details" in the CKEditor instance "request_details" Step looks like this: [...]]]></description>
			<content:encoded><![CDATA[<p>I have a textarea with the id of &#8220;request_details&#8221;, made into a CKEditor instance by jQuery: $(&#8216;#request_details&#8217;).ckeditor();</p>
<p>(Check <a href="http://ckeditor.com/blog/CKEditor_for_jQuery" target="_blank">this page</a> if you need some help getting CKEditor to work with jQuery, it&#8217;s dead simple)</p>
<p>Feature looks like this:  <code>And I fill in "Here are some details" in the CKEditor instance "request_details"</code></p>
<p>Step looks like this:</p>
<p style="padding-left: 30px;"><code>When /^I fill in "([^"]*)" in the CKEditor instance "([^"]*)"$/ do |value, input_id|<br />
browser = page.driver.browser<br />
browser.execute_script("CKEDITOR.instances['#{input_id}'].setData('#{value}');")<br />
end</code></p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/03/09/testing-ckeditor-in-ruby-on-rails-with-cucumbercapybara/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My least favorite phrase</title>
		<link>http://saratrice.com/2011/02/23/my-least-favorite-phrase/</link>
		<comments>http://saratrice.com/2011/02/23/my-least-favorite-phrase/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 21:52:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ramblings]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=213</guid>
		<description><![CDATA[I&#8217;ve decided on my least favorite phrase in the English language: &#8220;Can&#8217;t you just&#8230;?&#8221; Why is this my least favorite phrase? Because: It&#8217;s always in conjunction with a task that the questioner does not understand, but assumes should not be difficult at all; it is inherently second-guessing the person being asked, which is insulting; and, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided on my least favorite phrase in the English language:</p>
<p><strong>&#8220;Can&#8217;t you just&#8230;?&#8221;</strong></p>
<p>Why is this my least favorite phrase? Because:</p>
<ol>
<li>It&#8217;s always in conjunction with a task that the questioner does not understand, but assumes should not be difficult at all;</li>
<li>it is inherently second-guessing the person being asked, which is insulting;</li>
<li>and, rather than asking if something is possible, as in &#8220;Can you?&#8221; or &#8220;Could you?&#8221;, the speaker is really saying, &#8220;This must be possible, and if you can&#8217;t do it, you&#8217;re an idiot.&#8221;</li>
</ol>
<p>If you don&#8217;t understand how the system works, or what is involved with doing a task, please, ask if something is possible. Don&#8217;t demean the craftsman or browbeat them into doing whatever it is you want. A resentful craftsman is not on your side, and will not go out of his/her way to help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/02/23/my-least-favorite-phrase/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using mysql2 on Windows</title>
		<link>http://saratrice.com/2011/02/19/using-mysql2-on-windows/</link>
		<comments>http://saratrice.com/2011/02/19/using-mysql2-on-windows/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 04:25:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=211</guid>
		<description><![CDATA[Another edition of Sara uses Rails on Windows! *muppety fanfare* Trying to get mysql2 to run on Windows is a bit of a pain. I used the lovely installer from Railsinstaller.org and then created an app with : rails new testapp -d mysql and then bundled. By default this installs the mysql2 gem. There are [...]]]></description>
			<content:encoded><![CDATA[<p>Another edition of Sara uses Rails on Windows! *muppety fanfare*</p>
<p>Trying to get mysql2 to run on Windows is a bit of a pain. I used the lovely installer from <a href="http://railsinstaller.org/" target="_blank">Railsinstaller.org</a> and then created an app with :</p>
<blockquote><p>rails new testapp -d mysql</p></blockquote>
<p>and then bundled.</p>
<p>By default this installs the mysql2 gem. There are some gotchas, and hopefully this will help:</p>
<ol>
<li>You have to install mysql first (derp!). Go <a href="http://dev.mysql.com/downloads/mysql/" target="_blank">here</a> and pick either the 32 or 64 bit MSI installer, and use <a href="http://allaboutruby.wordpress.com/2006/01/09/installing-rails-on-windows-step-by-step-tutorial/" target="_blank">this guide</a> to pick your options during the install (section II). I know, it&#8217;s an old guide, but it works fine. And it has pictures!</li>
<li>You may get this error: &#8220;%1 is not a valid Win32 application.&#8221; This means you need to go <a href="http://www.mysql.com/downloads/connector/c" target="_blank">here</a> and get libmysql.dll, and copy it into <strong>c:\RailsInstaller\Ruby1.8.7\bin</strong>. Get the right version or your migrations will fail when you try to add indexes &#8211; the MySQL 5.5.9 64-bit version of libmysql.dll will NOT work! I got this version and it worked just fine: mysql-connector-c-noinstall-6.0.2-win32-vs2005.zip (you don&#8217;t need the MSI installer for this one, just grab a zippy file).</li>
<li>Next error you may get is &#8220;rbreadline.rb:4404: uninitialized constant RbReadline::Encoding (NameError)&#8221;. Thanks to <a href="http://tom.net.nz/2010/09/installing-diaspora-on-windows/" target="_blank">this blog post</a> I found the answer is to go into <strong>c:\RailsInstaller\Ruby1.8.7\lib\ruby\site_ruby\1.8\rbreadline.rb</strong>, and comment out line 4404.</li>
</ol>
<p>There you go! Rake away!</p>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/02/19/using-mysql2-on-windows/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Github, https, and you</title>
		<link>http://saratrice.com/2011/02/15/github-https-and-you/</link>
		<comments>http://saratrice.com/2011/02/15/github-https-and-you/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 01:25:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://saratrice.com/?p=209</guid>
		<description><![CDATA[Banged my head against this for a while. Starting a new rails project, trying to get rails.js from github, but it&#8217;s failing every time: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) So (after a lot of googling) I opened up gems/jquery-rails-0.2.7/lib/generators/jquery/install/install_generator.rb and added this just after the beginning of the [...]]]></description>
			<content:encoded><![CDATA[<p>Banged my head against this for a while. Starting a new rails project, trying to get rails.js from github, but it&#8217;s failing every time:</p>
<blockquote><p>SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)</p></blockquote>
<p>So (after a lot of googling) I opened up gems/jquery-rails-0.2.7/lib/generators/jquery/install/install_generator.rb and added this just after the beginning of the InstallGenerator class (&#8220;class InstallGenerator &lt; ::Rails::Generators::Base&#8221;) :</p>
<blockquote>
<div id="_mcePaste">require &#8216;openssl&#8217;</div>
<div id="_mcePaste">OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE</div>
</blockquote>
<div>All fixed! Pulled down the file with no hiccups.</div>
]]></content:encoded>
			<wfw:commentRss>http://saratrice.com/2011/02/15/github-https-and-you/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

