I’ve been trying to follow Ruby on Rails 3 Tutorial by Michael H. but
had a problem on page 199 when it asks me to enter “rake db:migrate”. I
got the following results:
rake aborted!
undefined method `mass_assignment_sanitizer=’ for
ActiveRecord::Base:Class
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I would try running bundle update to make sure you have all of your gems
properly installed. This sounds like a version mis-match between various
Rails modules.
I tried running bundle update but then I still got the same error on
rake db:migrate.
—Original message—
–
How do I get rake to work?
I would try running bundle update to make sure you have all of your gems
properly installed. This sounds like a version mis-match between various
Rails modules.
What version of rake, what version of Ruby, what version of Rails? Also,
what version of Gem? There’s lots of reasons why this might not work.
Are you using rvm? If so, make a new gemset and bundle install again
there. Triple check that the version of Rails in your tutorial matches
the version installed on your computer.
I am using Rails 3.1.0, Gem 1.8.24, and Ruby 1.9.3p194. I’ve edited the
gem file and changed versions of things to try to fix this and other
problems that I have. I think that in order to fix certain problems, I
might end up breaking something else. I tried “gem update --system” and
still had the same problem.