Rails 3.0.0.beta2 problem with Rails::Generators::GeneratedAttribute

So I am trying to use the rails3 branch of Nifty Generators by Ryan Bates. Now I've used this gem before with beta1 and its worked, but after upgrading to beta2 I've been getting a very wierd error.

lib/generators/nifty/scaffold/scaffold_generator.rb:35:in `block in initialize': uninitialized constant Rails::Generators::GeneratedAttribute (NameError)

The peice of code where this happens:

args_for_c_m.each do |arg|
  if arg == '!'
    options[:invert] = true
  elsif arg.include?(':')
    @model_attributes << Rails::Generators::GeneratedAttribute.new(*arg.split(':'))
    @controller_actions << arg
    @controller_actions << 'create' if arg == 'new'
    @controller_actions << 'update' if arg == 'edit'

Now I've seen GeneratedAttribute used in many gems before, so I'm confused on why its breaking. I'm not sure, but I think this has to do with beta2.

So my question is this a Rails problem of something on my end? If it is on my end any ideas what I have may done wrong?

Thank you.


Probably either a beta2 bug or rails doesn't load that module automatically anymore. Try adding

require 'rails/generators/generated_attribute'

Need Your Help

Trying to run lein repl and could not transfer artifact org.clojure:tools.nrepl:pom:0.2.3 from/to central

windows clojure leiningen

I have installed leiningen in windows xp with lein.bat and running lein self-install.

How do I debug a crash when I run my garbage-collected app in Rosetta?

cocoa garbage-collection crash gdb rosetta

I have a Universal app which is targeting 10.5 and which uses garbage collection. I am building for ppc, i386 and x86_64.