All posts in 'Rails'

Preparing for Rails 2.3.9


As much as i wish to upgrade my Rails 2.3.x application Daily Fratze to the newest tag of the Rails 2.3.x branch, i cannot. First there was the epic fail of release 2.3.6, that broke all HTML Helpers and forced the Rails XSS protection upon us. This release was immediately followed by 2.3.7 and 2.3.8. […]

Read the complete article »

How to change the image assets path in Rails


I found no other way to change the path of “images” in a Rails application than monkey patching the AssetTagHelper like so: module ActionView module Helpers #:nodoc: module AssetTagHelper def image_path(source) compute_public_path(source, ‘static_images’) end alias_method :path_to_image, :image_path # aliased to avoid conflicts with an image_path named route end end endmodule ActionView module Helpers #:nodoc: module […]

Read the complete article »

Redcloth / Textilize :hard_breaks is broken in Rails 2.3.4


The default behavior for quite a long time was :hard_breaks in the textilize helper method in rails. Hard Breaks means: All line breaks are turned into <br />’s. Somebody changed the textilize helper in “actionpack-2.3.4/lib/action_view/helpers/text_helper.rb” in 2.3.4 and added the ability to pass some options but broke the default behavior here: def textilize(text, *options) options […]

Read the complete article »

Phusion Passenger and memcache-client revisited


The last Passenger update brought some good explanation off the problems regarding Passenger and memcache-client (see here). Smart spawning of Passenger processes creates shared file descriptors. As the connections to memcached are sockets they are shared as well so data on them gets corrupted which is explained very nicely in the Passenger documentation: Example 1: […]

Read the complete article »