Tag Archives: ruby

undefined method `load_yaml’ for Gem:Module

If you get this error: undefined method `load_yaml’ for Gem:Module just restart Apache.

Simple git setup for new git users

I recently set out to learn more about git, the new content manager for source code. “New”, as in much younger than Subversion, and a hell of a lot younger than CVS! No one I know personally uses git yet, but I see the Ruby on Rails community starting to use it a bit, so I decided I had [...]

How To Deploy Rails Using mod_rails On Apache

I’ve just spent my afternoon evaluating mod_rails. I must say I am very, very impressed so far. The install is fairly simple. Here’s how I did mine: First I installed the “passenger” gem: gem install passenger Next, I used passenger to build a mod_rails module for Apache: passenger-install-apache2-module At the end of the mod_rails build process, [...]

Ruby on Rails form_tag

Consider the api definition for form_tag: This form_tag: Produces this: which is probably not what you want. Try this instead: and you’ll get this: You have to establish when your first hash of parameters ends, otherwise form_tag will assume your :action and your :multipart option are a single hash, when :multipart really needs to go [...]

Ruby on Rails link_to

If you need to add a css class to a link_to(), do this: <%= link_to ‘Admin Home’, { :controller => ‘home’, :action => ‘index’ }, :class => ‘selected’ %> not this: <%= link_to ‘Admin Home’, :controller => ‘home’, :action => ‘index’, :class => ‘selected’ %>