I decided to try out the latest edge Rails and I started getting this error: !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. /!\ FAILSAFE /!\ Mon Jul 28 22:58:38 -0600 2008 Status: 500 Internal Server Error dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not…
Month: July 2008
Outsourcing My Religion
I got up at 6:30 am this morning so that I could serve in what is know as a ‘calling’ in my church. I have done this for two years now. Anyone that knows me knows that I don’t get up at 6:30. Sometimes I stay up and work until 6:30, but I don’t get…
acts_as_state_machine – state is always nil
If you are using the acts_as_state_machine plugin to manage the state of your object keep this in mind: If you are going to have an object like an order or something similar that likely has a field state_id to relate in a geographic state then you need to be sure to rename the column that…
Shoulda Doesn’t like ‘Status’
One of the models in a project I am working on right now ends in ‘status’. Rails handles that just find but in my tests I started noticing an odd error: test: Lookup should belong_to lookup_status. (LookupTest): NameError: uninitialized constant LookupStatu </pre> The Shoulda test looks like this: should_belong_to :lookup_status </pre> Nothing to complicated there….
Tip for Testing Email with Ruby on Rails and Shoulda
Shoulda comes with a great method for testing email called ‘assert_sent_email’. (If you try it and get a method missing error update Shoulda. Not that anyone wouldn’t know to just do that). No matter what you use to test email as long as you are in test mode your emails will be placed into an…
Shoulda, assert_sent_email and Unreal Users
I have been banging my head against a problem in my testing. Using the UI everything worked as expected, but my tests were failing when I tried to see if emails were being sent in a specific case. Here’s the test I was trying to run using Shoulda: context “reset password for user that has…
Secrets and Inspirations
I have an embarrassing secret. I love cycling (not the embarassing secret unless you count running around in skin tight shorts as embarassing). No, the big secret is that when I am all alone on the bike I can’t help but feel the desire to chase down every other cyclist on the road. I will…
iPhone Apps, meh..
I was pretty excited to see the new app store show up on iTunes. As a faithful fan of everything Apple I was looking forward to this big event. Now? Meh, I could take it or leave it. I just spent half an hour browsing through the applications. I downloaded some because they are there,…
ActiveSalesforce and Ruby on Rails > 2.1
We have to do an integration with Saleforce for a Rails project we are working on. I keep getting this error: The :dependent option expects either :destroy or :delete (:nullify) I posted to the Salesforce forums and didn’t get any response so I did some more investigation. Turns out there is a bug and a…
Checkbox list in Ruby on Rails using HABTM
Checkboxes are one of those things that look easy and should be easy, but they aren’t always easy. I needed a solution that could create a checkbox list of languages that a user speaks. So I don’t forget here’s how to do it: The migrations are important. You have to be sure to exclude the…