Testing in Rails with Subdomains

After implementing a subdomain feature for a multi-tenant Rails app, a couple of my integration and functional tests (in Test::Unit) broke. The test failed because my ApplicationController couldn’t find a subdomain. I needed to manually set the subdomain in my tests, but I couldn’t figure out how to do it. After digging around, I finally […]

Devise Error when Upgrading to Rails 3.2

I was following along with Ryan Bates’ Railscast #318, and when trying to launch the rails server, I was getting this error message: “…/gems/activerecord-3.2.0/lib/active_record/dynamic_matchers.rb:50:in `method_missing’: undefined method `devise’ for #<Class:0x9fefb60> (NoMethodError)”. After spending too much time on this, I finally found the solution in this devise Github ticket: Error after upgrade to Rails 3.2. The […]

Installing RVM

After running into a situation where I actually need to versions of Ruby (didn’t expect that to happen!), I decided to install RVM (Ruby Version Manager). It wouldn’t have been to hard, if I had read the instructions a little closer. I first installed RVM as a gem. Now, RVM isn’t a gem, so I’m […]