There is so much going on at Xtreme Labs that we’ve officially decided that we needed two blogs.
Recently we agreed that the old kindergarten mantra of “Sharing is good,” needs to be reinstated in our daily grown-up lives. With mobile experts on every platform we are dedicating our developers to sharing their tricks, tips and shortcuts with other developers. The amount of talent and the diverse areas of interest within our company allows us to create a plethora of credible resources for other developers.
It is at this point in time that I would like to introduce our new Tech Blog that will be used by the engineers, designers and product builders here at Xtreme Labs. It is here that we will talk about what we come across as we build, design and ship the latest things in mobile and tech at the Labs.
Here is a sneak peak at some of the first blogs that are going out:
• Parsing JSON Data Efficiently on Android: JsonReader
• iOS Libraries for Productive Programming
• 7 Tools in an Advanced Android Development Workflow
• Common iOS Gotchas
Be sure to check out the thought waves that are being emitted from the new Xtreme Labs Tech Blog here: http://tech.xtremelabs.com/
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:
undefined method `merge' for #<JSON::Pure::Generator::State:0x102181890> (NoMethodError)
The selenium driver inside the jasmine gem is loading
json_pureunless it can find an already loaded
json_pure was hacked by rails for other reasons, but it breaks
JSON.generate. Madness ensues.
To fix this, you need to use something other than
json_pure, at least in your test suite. The fix, fortunately, is pretty simple. Add the following line to your
gem "json", "1.4.6"
This will load the
json 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.
This was maddeningly painful to pinpoint. I’m not sure if there’s a long term solution to the problem either. You need a
JSON library, but so do many others. Monkey patching the class seems really handy, but is prone to break behaviors.
Ask for Help
- Double-entry/ledger based accounting in Rails (i.e. Quickbooks in Rails for free)
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?
One suggestion was to look at the code that Wesabe open sourced code when they closed their doors.
- Error message when opening Rubymine “Invalid Git Root”
This is likely because the project included a submodule that wasn’t configured correctly, fix this in under Rubymine’s version control preferences.
- Test 404 handling (e.g.
rescue_from ActiveRecord::RecordNotFound, :with => :render_record_not_found) with Cucumber by temporarily setting
ActionController::Base.allow_rescue = true. This is usually set to
JSON.pretty_generate hates Rails 3
This should work in most modern browsers. Follow the Mozilla docs, NOT the various blog posts about this.