rake db中的错误:在rails上的ruby中创建命令

时间:2013-02-27 09:08:11

标签: ruby-on-rails ruby rake bundler activesupport

当我输入命令rake db:create时,终端上显示以下错误

rake aborted!
cannot load such file -- active_support/core_ext/class/inheritable_attributes
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/gems/supermodel-0.1.4/lib/supermodel.rb:5:in `<top (required)>'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385@global/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
/home/shashikant/railsproject/online_exams_system/config/application.rb:7:in `<top (required)>'
/home/shashikant/railsproject/online_exams_system/Rakefile:5:in `require'
/home/shashikant/railsproject/online_exams_system/Rakefile:5:in `<top (required)>'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `eval'
/home/shashikant/.rvm/gems/ruby-1.9.3-p385/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

1 个答案:

答案 0 :(得分:0)

我得到的答案只是下载文件“inheritable_attributes.rb”形式github,并且在你在指定目录中添加文件并运行命令rake db:migrate

之后将显示其他文件名