my work, life, and ideas

Posts Tagged ‘Rails’

Rails 2.3.3 to 2.3.5 and Jruby 1.4 Upgrade Notes

Rails upgrade notes:

1.) Rails now has seeding functionality and along with it comes a new task, db:seed. If you use the seed_fu gem be aware that your db:seed call that worked with the gem is now executing the Rails version of db:seed. You will need to call rake db:seed_fu to get the gem version to work.

2.) ActiveSupport::JSON::ParseError no longer exists, so be sure to use ActiveSupport::JSON.parse_error.

3.) Update your rspec and rspec-rails gems to 1.3.x.

4.) Update your rack gem from 1.0.0 to 1.0.1

5.) Rails 2.3.5 works with the RailsXss plugin, in Rails 3 escaping content in erb will default, but if you want to ensure your site isn’t at risk of XSS, make sure you do this install.

Jruby upgrade notes:

If you are using Jruby < 1.4 and you use the net/http library, you better upgrade soon. We were having all sorts of problems with threading and exorbitantly long running requests. There were several bug fixes around the open and read timeout functionality in Jruby 1.4. Now network requests will timeout properly according to your open and read timeout settings.


magic_meta_methods

A while back I wrote a plugin for Rails that serializes text and data structures into a singular column called magic_meta_methods on an ActiveRecord. The plugin then makes the data readable and writable through meta-programmed methods and allows the user to save the ActiveRecord just as they would if they were modifying regular attributes. I’ve found this particularly useful for when there isn’t a need to store data that has to be queried or when you want to keep a data structure in tact like an array or hash. By reducing the number of columns and clutter on the table, you can keep the migrations to a minimum. As always I like to hear what the community thinks about it, or what types of improvements would make it more useful.


Rails Lectures at Depaul

Depaul University Logo

Last semester at Depaul University I had the opportunity to give 2 lectures on Ruby on Rails. The topics were “Rails Hosting & Deployment” and “Rails Security”. It was an awesome experience and really rewarding to talk about something that I am passionate about. A big thanks to Igor Polevoy who introduced and recommended me to the Depaul staff.

Here is a copy of the PowerPoint I used on the lecture forĀ Rails Hosting & Deployment.