On all of my Rails 2.1.2 projects (released today), whenever I try to
generate anything, I get the result “undefined method `empty?’ for
/_generator$/:Regexp”.
mbp15:~> cd example
mbp15:~/example> ./script/generate model my_model name:string
undefined method empty?' for /_generator$/:Regexp mbp15:~/example> ./script/generate migration my_first_migration undefined methodempty?’ for /_generator$/:Regexp
mbp15:~/example>
I’m having the same problem. I’m on a Gentoo box with Ruby 1.8.6 and
all the latest patches. Pratik’s suggestion did nothing (actually my
rubygems was already up-to-date).
I’m downgrading to 2.1.1 if no quick solution comes up soon.