我执行了重置数据库的命令后,试图创建新的用户 name: "Example User 1", email: "[email protected]",出现以下错误
C:\Users\pcjjdy\Desktop\ruby\lab6\mytwitter>rails console
DL is deprecated, please use Fiddle
Loading development environment (Rails 4.0.0)
irb(main):002:0>User.create(name: "Example User 1", email: "[email protected]",password: "secret", password_confirmation: "secret")
NameError: uninitialized constant User
from (irb):1
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands/console.rb:90:in `start'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands/console.rb:9:in `start'
from C:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/railties-4.0.0
/lib/rails/commands.rb:64:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
<rial.org",password: "secret",password_confirmation: "secret")
网上有人说是 gemfire 问题,也有人说是 application.rb 的问题。我尝试过但都无效。求指教