walls.corpus

By Nathan L. Walls

  • Sunset, Jan. 2, 2021/Williams Township
  • On Bougher Hill/Williams Township
  • Sunrise, Dec. 19, 2020/Williams Township
  • Sunset, Dec. 27, 2020

Rails 3 – Solving NoMethodError -- undefined method for Markdown

I just switched an app from Rails 3.0.0.beta4 to Rails 3.0.0 and while poking around the app, I started getting the following error:

FooController raised exception: NoMethodError -- undefined method `markdown' for …

It took a bit of hunting through the Rails project history, but I found the relevant commit. In short, text helpers for Textile and Markdown were removed from Rails 3.0.0.

What wasn’t so obvious from actionpack/CHANGELOG was why the change was made.

Thankfully, there is a gem to add the helper methods back in. Give Formatize a look. Adding it to your Gemfile should resolve any NoMethodError exceptions