<?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>Pivotal Labs &#187; json</title>
	<atom:link href="http://pivotallabs.com/tag/json/feed/" rel="self" type="application/rss+xml" />
	<link>http://pivotallabs.com</link>
	<description>Agility Developed</description>
	<lastBuildDate>Fri, 24 May 2013 21:58:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>rails 3.0.2 + jasmine 1.0.1.1 + json_pure == dll_hell.rb</title>
		<link>http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/</link>
		<comments>http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 21:42:00 +0000</pubDate>
		<dc:creator>Ken Mayer</dc:creator>
				<category><![CDATA[Labs]]></category>
		<category><![CDATA[jasmine]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/</guid>
		<description><![CDATA[<p><p>The 3.0.2 update to rails made a change in active support that creates an interference pattern failure in the jasmine-gem. Not jasmine, itself, mind you, just the standalone server that runs the jasmine tests, and not the server, but just the report runner. Thus, your tests are all green, but the jasmine suite fails anyway. You might see this error:</p>

<pre><code>undefined method `merge' for #&#60;JSON::Pure::Generator::State:0x102181890&#62; &#40;NoMethodError&#41;
</code></pre>

<p>The selenium driver inside the jasmine gem is loading<code>json_pure</code>unless it can find an already loaded <code>JSON</code> class. <code>json_pure</code> was hacked by rails for other reasons, but it breaks <code>JSON.generate</code>. Madness ensues. </p>

<p>To fix this, you need to use something other than <code>json_pure</code>, at least in your test suite. The fix, fortunately, is pretty simple. Add the following line to your <code>Gemfile</code></p>

<pre><code>gem "json", "1.4.6"
</code></pre>

<p>This will load the <code>json</code> gem built with native extensions. The version number is not necessary to fix this problem, but we try to lock down versions as a standard practice. </p>

<p>This was maddeningly painful to pinpoint. I'm not sure if there's a long term solution to the problem either. You need a <code>JSON</code> library, but so do many others. Monkey patching the class seems really handy, but is prone to break behaviors.</p> <a href="http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/">rails 3.0.2 + jasmine 1.0.1.1 + json_pure == dll_hell.rb</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>The 3.0.2 update to rails made a change in active support that creates an interference pattern failure in the jasmine-gem. Not jasmine, itself, mind you, just the standalone server that runs the jasmine tests, and not the server, but just the report runner. Thus, your tests are all green, but the jasmine suite fails anyway. You might see this error:</p>
<pre><code>undefined method `merge' for #&lt;JSON::Pure::Generator::State:0x102181890&gt; &#40;NoMethodError&#41;
</code></pre>
<p>The selenium driver inside the jasmine gem is loading<code>json_pure</code>unless it can find an already loaded <code>JSON</code> class. <code>json_pure</code> was hacked by rails for other reasons, but it breaks <code>JSON.generate</code>. Madness ensues. </p>
<p>To fix this, you need to use something other than <code>json_pure</code>, at least in your test suite. The fix, fortunately, is pretty simple. Add the following line to your <code>Gemfile</code></p>
<pre><code>gem "json", "1.4.6"
</code></pre>
<p>This will load the <code>json</code> gem built with native extensions. The version number is not necessary to fix this problem, but we try to lock down versions as a standard practice. </p>
<p>This was maddeningly painful to pinpoint. I&#8217;m not sure if there&#8217;s a long term solution to the problem either. You need a <code>JSON</code> library, but so do many others. Monkey patching the class seems really handy, but is prone to break behaviors.</p>
<p>The post <a href="http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/">rails 3.0.2 + jasmine 1.0.1.1 + json_pure == dll_hell.rb</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/rails-3-0-2-jasmine-1-0-1-1-json-pure-dll-hell-rb/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Standup 08/04/2010: Accounting on Rails anybody?</title>
		<link>http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/</link>
		<comments>http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 15:09:00 +0000</pubDate>
		<dc:creator>Abhijit Hiremagalur</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails3]]></category>
		<category><![CDATA[rubymine]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/</guid>
		<description><![CDATA[<p><h2>Ask for Help</h2>

<ul>
<li>Double-entry/ledger based accounting in Rails &#40;i.e. Quickbooks in Rails for free&#41;</li>
</ul>

<blockquote>
Ideally would be tied in with user/role system where each accounting entry would be tied to a user, but also reconciled against a master account.

Recommendations?  Latest and greatest?
</blockquote>

<p>One suggestion was to look at the code that <a href="http://github.com/wesabe/mesabe">Wesabe open sourced code</a> when they <a href="https://www.wesabe.com/groups/222-wesabe-accounts-shutdown/discussions/5216-wesabe-open-source">closed their doors.</a></p>

<ul>
<li>Error message when opening Rubymine "Invalid Git Root"</li>
</ul>

<p>This is likely because the project included a submodule that wasn't configured correctly, fix this in under Rubymine's version control preferences.</p>

<p><img src="http://farm5.static.flickr.com/4081/4861648277_18894bb22c_z.jpg" alt="Add submodule screen in Rubymine" /></p>

<h2>Interesting Things</h2>

<ul>
<li><p>Test 404 handling &#40;e.g. <code>rescue_from ActiveRecord::RecordNotFound, :with =&#62; :render_record_not_found</code>&#41; with <a href="http://cukes.info/">Cucumber</a> by temporarily setting <code>ActionController::Base.allow_rescue = true</code>. This is usually set to <code>false</code> in <code>features/support/env.rb</code></p></li>
<li><p><code>JSON.pretty_generate</code> hates Rails 3 <code>Hash</code>es</p></li>
</ul>

<p><script src="http://gist.github.com/509182.js"> </script></p>

<ul>
<li>Use <a href="https://developer.mozilla.org/en/DOM/window.postMessage">window.postMessage</a> to communicate between IFrames in a standard way</li>
</ul>

<p>This should work in most modern browsers. Follow the Mozilla docs, NOT the various blog posts about this.</p> <a href="http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/">Standup 08/04/2010: Accounting on Rails anybody?</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Ask for Help</h2>
<ul>
<li>Double-entry/ledger based accounting in Rails (i.e. Quickbooks in Rails for free)</li>
</ul>
<blockquote><p>Ideally would be tied in with user/role system where each accounting entry would be tied to a user, but also reconciled against a master account.</p>
<p>Recommendations? Latest and greatest?</p></blockquote>
<p>One suggestion was to look at the code that <a href="http://github.com/wesabe/mesabe">Wesabe open sourced code</a> when they <a href="https://www.wesabe.com/groups/222-wesabe-accounts-shutdown/discussions/5216-wesabe-open-source">closed their doors.</a></p>
<ul>
<li>Error message when opening Rubymine &#8220;Invalid Git Root&#8221;</li>
</ul>
<p>This is likely because the project included a submodule that wasn&#8217;t configured correctly, fix this in under Rubymine&#8217;s version control preferences.</p>
<p><img alt="Add submodule screen in Rubymine" src="http://farm5.static.flickr.com/4081/4861648277_18894bb22c_z.jpg" /></p>
<h2>Interesting Things</h2>
<ul>
<li>Test 404 handling (e.g. <code>rescue_from ActiveRecord::RecordNotFound, :with =&gt; :render_record_not_found</code>) with <a href="http://cukes.info/">Cucumber</a> by temporarily setting <code>ActionController::Base.allow_rescue = true</code>. This is usually set to <code>false</code> in <code>features/support/env.rb</code></li>
<li><code>JSON.pretty_generate</code> hates Rails 3 <code>Hash</code>es</li>
</ul>
<p>&nbsp;</p>
<ul>
<li>Use <a href="https://developer.mozilla.org/en/DOM/window.postMessage">window.postMessage</a> to communicate between IFrames in a standard way</li>
</ul>
<p>This should work in most modern browsers. Follow the Mozilla docs, NOT the various blog posts about this.</p>
<p>The post <a href="http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/">Standup 08/04/2010: Accounting on Rails anybody?</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-08-04-2010-accounting-on-rails-anybody/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Standup 3/24/2009: Browser History with Javascript and Page Based Json</title>
		<link>http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/</link>
		<comments>http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 21:36:00 +0000</pubDate>
		<dc:creator>Pivotal Labs</dc:creator>
				<category><![CDATA[Standup]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rubymine]]></category>

		<guid isPermaLink="false">http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/</guid>
		<description><![CDATA[<p><h2>Interesting Things</h2>

<ul>
<li><em>Browser History with Javascript and Page Based Json</em>: One of our projects solved the vexing problem of browser history for a page that has initial page provided json with subsequent ajax updates. A simple page back operation will display the originally downloaded data, not the updated data. The solution is to add a unique id for each page, and store these ids in a cookie. When an ajax request updates the page it removes its page id from the cookie. When you use the back button, each page checks to see if its unique id is in the cookie, and if it is not, it forces a reload.<br />
<a href="http://code.google.com/p/reallysimplehistory/">Really Simple History</a> was mentioned as another way to manage javascript/ajax history.</li>
<li><em>Rubymine Build 784 has the <a href="http://www.jetbrains.net/devnet/message/5234127#5234127">Weirdest. Bug. Ever.</a></em>: This may only be a problem if you work on a mac and you need to enter capital letters in rubymine dialogs like find and replace ;-&#41;. Many of us are fans of intellij/rubymine, but we wish they had a better test process. To be fair, rubymine is in <a href="http://www.jetbrains.net/confluence/display/RUBYDEV/RubyMine+EAP">public preview</a>, so expect the occasional bug or two.</li>
</ul> <a href="http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/">Standup 3/24/2009: Browser History with Javascript and Page Based Json</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></description>
				<content:encoded><![CDATA[<h2>Interesting Things</h2>
<ul>
<li><em>Browser History with Javascript and Page Based Json</em>: One of our projects solved the vexing problem of browser history for a page that has initial page provided json with subsequent ajax updates. A simple page back operation will display the originally downloaded data, not the updated data. The solution is to add a unique id for each page, and store these ids in a cookie. When an ajax request updates the page it removes its page id from the cookie. When you use the back button, each page checks to see if its unique id is in the cookie, and if it is not, it forces a reload.<br />
<a href="http://code.google.com/p/reallysimplehistory/">Really Simple History</a> was mentioned as another way to manage javascript/ajax history.</li>
<li><em>Rubymine Build 784 has the <a href="http://www.jetbrains.net/devnet/message/5234127#5234127">Weirdest. Bug. Ever.</a></em>: This may only be a problem if you work on a mac and you need to enter capital letters in rubymine dialogs like find and replace ;-&#41;. Many of us are fans of intellij/rubymine, but we wish they had a better test process. To be fair, rubymine is in <a href="http://www.jetbrains.net/confluence/display/RUBYDEV/RubyMine+EAP">public preview</a>, so expect the occasional bug or two.</li>
</ul>
<p>The post <a href="http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/">Standup 3/24/2009: Browser History with Javascript and Page Based Json</a> appeared first on <a href="http://pivotallabs.com">Pivotal Labs</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://pivotallabs.com/standup-3-24-2009-browser-history-with-javascript-and-page-based-json/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (Feed is rejected)
Page Caching using apc
Database Caching 4/16 queries in 0.013 seconds using apc
Object Caching 587/640 objects using apc

 Served from: pivotallabs.com @ 2013-05-25 11:44:57 by W3 Total Cache -->