为Spreecommerce创建新表

时间:2013-07-04 01:46:16

标签: ruby-on-rails ruby ruby-on-rails-3 spree

我正在尝试为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 但总是显示错误

0 个答案:

没有答案