I've been trying to follow Ruby on Rails 3 Tutorial by Michael Hartl 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)
--
How do I get rake to work?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Walter Lee Davis at Jun 21, 2012 at 4:36 pm

    On Jun 21, 2012, at 12:32 PM, n/a n/a wrote:

    I've been trying to follow Ruby on Rails 3 Tutorial by Michael Hartl 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)
    --
    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.

    Walter

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • N/a n/a at Jun 21, 2012 at 5:00 pm
    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.

    Walter

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Walter Lee Davis at Jun 21, 2012 at 5:06 pm
    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.

    Walter
    On Jun 21, 2012, at 1:00 PM, n/a n/a wrote:

    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.

    Walter

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • Fearless Fool at Jun 21, 2012 at 5:12 pm

    Walter Davis wrote in post #1065560:
    What version of rake, what version of Ruby, what version of Rails? Also,
    what version of Gem? ...
    Walter's right. This is just a hunch, but you might try:

    gem update --system

    and see if that helps.

    - ff

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • One Two at Jun 21, 2012 at 6:00 pm

    Walter Davis wrote in post #1065560:
    Triple check that the version of Rails in your tutorial matches
    the version installed on your computer.
    I got it working. I found a sample gem file at
    https://raw.github.com/railstutorial/sample_app_2nd_ed/master/Gemfile
    for the tutorial that I am using and this made it work. Thanks for the
    help.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
  • N/a n/a at Jun 21, 2012 at 5:26 pm
    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.

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 21, '12 at 4:32p
activeJun 21, '12 at 6:00p
posts7
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

N/a n/a: 5 posts Walter Lee Davis: 2 posts

People

Translate

site design / logo © 2021 Grokbase