我正在尝试为 Spreecommerce 创建一个新表,但总是给我一个错误。
:006 > create_table(:Company)
NoMethodError: undefined method `create_table' for main:Object
from (irb):6
from /home/iron/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands/console.rb:47:in `start'
from /home/iron/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands/console.rb:8:in `start'
from /home/iron/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.2.13/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
我正在尝试使用命令create_table(:Company)
和命令rails generate model Company name:string history:string
但总是显示错误