If you upgrade to Rails 2.2.2 and start getting “The binding argument of #concat is no longer needed” then wherever you do something like this: concat(content, block.binding) </pre> change it to this: concat(content) </pre> The ‘block.binding’ argument is no longer needed which is nice because who really wanted to type that over and over again…
Category: Ruby On Rails
ERROR: While executing gem (ArgumentError) Illformed requirement
I like to use to deploy my applications because of its simplicity. The other nice thing is that they give you free developer space so if you are just getting an application up and running or just need to show it to a client you can do so without having to pay a bunch of…
Using Shoulda to test login – should_require_login
I’ve had my problems with shoulda, but one very powerful component of the testing framework is the ability to create macros. Here’s one that checks to make sure a user has to be logged in to access an action. Put it into test/shoulda_macros/authentication.rb. (You can name the file anything you want I just thought authentication.rb…
Luvfoo – Open Source Ruby on Rails Social Network Platform
For lack of a better place to put this right now I am posting the roadmap for the Ruby on Rails social network we are building here. There has been quite a lot of interest in the project and quite a bit of willingness to contribute for which I am grateful. There are some features…
Teachers Without Borders
During the day and lately most of the night I work as a Fellow for Teachers Without Borders at Utah State University. (funded by Cisco). What I actually do bores most people and causes my wife to roll her eyes and tune out anytime someone asks what I do. It’s a long story and involves…
Open Any Document in Google Docs Via a Url
We are looking at ways to integrate the new Teachers Without Borders site with Google docs. Turns out that you can open: documents – .pdf, .doc, .txt, .html, .rtf and .odt spreadsheets – .xls, .csv, .ods presentations – .ppt By feeding the file url to this google url: http://docs.google.com/?DocAction=updoc&formsubmitted=true&uploadURL=DOCUMENT_URL Here’s an example if you needed…
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…
Using Starling, Workling with Ruby on Rails
For the project we are working on for Teachers Without Borders we need a reliable asynchronous way to process tasks. There are a myriad of ways to do this and if you aren’t careful you’ll spend weeks second guessing yourself while investigate every possible option. Not that I would know that from experience. We chose…
Install Native MySQL Gem – Edge Rails Stopped Including It
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…
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…