I love Ember.js. I hate typing and I especially hate typing code that a machine could build. I got really tired of reading a Rails schema to build new Ember.js models so I create a rake task for it. I make no guarantees that this code will work for you or that it won’t delete…
Category: Ruby On Rails
jQuery ajax request yields statusText: No Transport
If you write code you hate Internet Explorer. You get everything just right in Chrome, Firefox, Safari – any other browser really and then everything falls apart in Internet Explorer. We use CORS in some of the work with do at Open Tapestry. It works really well for letting the client figure out which service…
Getting this: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Setting up a new Mac is always a joy. You forget how many configuration errors you solved long ago. Here’s one I just ran into. I started getting this error when doing OAuth with Facebook on my local machine: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed </pre> I had already installed…
Customizing Views for a Multi-Tenant Application Using Ruby on Rails Custom Resolvers
Like so many other internet startups, OER Glue is a multi-tenant application. The process of hosting many of clients using a single piece of software presents a number of challenges and one of the largest has been customizing the look for each customer. I’ve tried solving this a number of different ways over the years…
Get jQuery Working With Ruby on Rails 3
I thought I had fixed everything and made ready for Rails 3 in my applications. Turns out I was wrong. My wife tells me I’m wrong all the time so I didn’t feel to bad. The first sign was that something bad had happened was that all my delete links stopped working. I found a…
Exception Handling in Ruby – a Little Surprise
I’ve got a rake task that includes a section where I do something like this: begin # Do some things rescue => ex puts “Error: #{ex}” end </pre> I know that typically you want to be specific about the errors that you catch, but in this case I just want to move on. The things…
Shoulda used RSpec
I’ve been updating the muck gems to work with Rails 3. The change is significant and painful but in a good way. For the most part the change consists of deleting all the code you used to hack into the Rails framework and adding subclass of ‘::Rails::Engine’. I’ll try to put together a detailed post…
Uploadify onComplete Wouldn’t Fire Until I Swore – A Lot
I’ve been trying to get Uploadify to work inside my <a href=”http://github.com/jbasdf/uploader”Uploadify>uploader gem</a>. Things went pretty well until I combined that with the muck-contents gem and tried to do multiple file uploads from within a plugin I’d written for the TinyMCE editor. At that point things got ugly. If you do much research on Uploadify…
jQuery Ajax requests are ‘html’ not ‘js’
I like jQuery. I use it in all my Rails projects these days. One thing I’ve struggled with for the longest time is that for some reason all my jQuery ajax requests come through as html not as js. I thought adding something like this to application.js would fix the problem: // In application.js jQuery.ajaxSetup({…
ActiveRecord::StatementInvalid: Mysql::Error: Got error 139 from storage engine
I ran into a ‘fun’ error with an application I’ve been working on. Everything was running fine and then one day hoptoad started filling up with exceptions like this: ActiveRecord::StatementInvalid: Mysql::Error: Got error 139 from storage engine I hate errors like that. Lucky for me there’s Google: http://forums.mysql.com/read.php?22,63584,166521#msg-166521 http://bugs.mysql.com/bug.php?id=10035 Turns out that each row in…