我尝试在irb中创建用户模型的User实例。但它给了我这个错误
1.9.3p194 :001 > u = User.new
NameError: uninitialized constant User
from (irb):1
from /home/darshana/.rvm/rubies/ruby-1.9.3-p194/bin/irb:16:in `<main>'
任何帮助?
答案 0 :(得分:3)
irb不为您加载导轨。
尝试bundle exec rails console