I’ve been working on a number of gems that are basically packaged Ruby on Rails engine plugins. It turns out that turning gems into plugins is pretty easy to do. However, testing them can be a pain. Here are a few things I came up with. After looking at how Clearance handles tests I’ve decided…
A copy of ApplicationController has been removed from the module tree but is still active! And can’t dup NilClass
If you’ve been working on Rails 2.3 engines (the new stuff that comes with Rails 2.3 not the old engine plugin) and you start running into either of these errors: A copy of ApplicationController has been removed from the module tree but is still active! Or can’t dup NilClass Don’t go find a new job…
Disguise your Rails Application
I spent quite a while trying to figure out how to theme my Ruby on Rails applications. Turns out after you build a piece of software people want to use it to do other stuff. Go figure. I really like how simple it is to skin a WordPress site so I stole borrowed some ideas….
Stupid WTF! ActionView::MissingTemplate Exception: Missing template users/_user.erb
If you’ve spent much time working with Ruby on Rails and more especially if you’ve done anything with json you might have run across errors like this: ActionView::MissingTemplate Exception: Missing template users/_user.erb </pre> I was having this problem and doing a lot of cursing which is common when I stay up and write code until…
Ruby gems and “Couldn’t get release_id, upload failed?”
I’ve been experimenting with Ruby gems over the past few weeks. I use a couple of other gems to make the process easier including rubyforge, jeweler and newgem. Jeweler has a rake task ‘rubyforge:release’ that uploads your gem for you. The problem was that it would timeout and give me “Couldn’t get release_id, upload failed?”….
newgem
I’ve been using newgem to build Babelphish (translation helper thing). The docs from the ruby forge site are a bit out of date. If you use newgem to build anything be sure to look at this post from Dr Nic and pay attention to the options you can pass in. In particular I noticed that…
Babelphish – yml Translation Made Simple
You’ve just finished version one of your most excellent, million dollar application. You’ve built it the right way. All of your application’ strings live in the en.yml file neatly tucked into the locales directory patiently waiting for the day when you hit it big, go international and hire a expensive fancy firm to translate your…
None Of Us Is As Dumb As All Of Us
If you are accustomed to working in an office you’ll be familiar with the myriad of conference calls, meetings and ‘brainstorming’ events that waste most people’s days. While most people assume that the most effective method of coming up with new ideas is to gather everyone close to a whiteboard and lock the doors the…
Authorize.net – User authentication failed due to invalid authentication values
So you’ve worked hard to integrate your website with authorize.net and now you’re ready to turn it on and make the big bucks. You run your first real transaction and get: User authentication failed due to invalid authentication values. code=”E00007″ or This account has not been given the permission(s) required for this request. or E00007…
CMS Lite Gem
A pretty common problem when developing a Rails application or any web application for that matter is how to deal with content. I’ve often run into situations where the content development team is familiar with html and can produce reasonable content markup. Since you are going to go to all the effort and spend all…