User.pins在Rails控制台中给我错误

时间:2014-11-05 16:38:47

标签: ruby-on-rails

我在Rails控制台上遇到错误。当我输入user.pins时,我收到一个错误。下面是我得到的控制台中的文本。感谢任何帮助,谢谢!

2.1.2 :008 > user.pins
NoMethodError: undefined method pins' for #<User:0x007fa029493808>
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/activemodel-4.1.6/lib/active_model/attribute_methods.rb:435:inmethod_missing'
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.6/lib/active_record/attribute_methods.rb:211:in method_missing'
from (irb):8
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/railties-4.1.6/lib/rails/commands/console.rb:90:instart'
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/railties-4.1.6/lib/rails/commands/console.rb:9:in start'
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:69:inconsole'
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in run_command!'
from /Users/jovanhernandez/.rvm/gems/ruby-2.1.2/gems/railties-4.1.6/lib/rails/commands.rb:17:in'
from bin/rails:8:in require'
from bin/rails:8:in'

0 个答案:

没有答案