运行rake db:create --trace
时出现NotImplementedError,这是该命令的完整跟踪。
rake db:create --trace
rake aborted!
NotImplementedError
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railroady-1.1.1/tasks/railroady.rake:34:in `sed'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railroady-1.1.1/tasks/railroady.rake:47:in `block in <top (required)>'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/task_manager.rb:196:in `in_namespace'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/dsl_definition.rb:104:in `namespace'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railroady-1.1.1/tasks/railroady.rake:41:in `<top (required)>'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railroady-1.1.1/lib/railroady/railtie.rb:8:in `block in <class:Railtie>'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/railtie.rb:201:in `instance_exec'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/railtie.rb:201:in `block in run_tasks_blocks'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/railtie.rb:201:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/railtie.rb:201:in `run_tasks_blocks'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:243:in `block in run_tasks_blocks'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/engine/railties.rb:17:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/engine/railties.rb:17:in `each'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:243:in `run_tasks_blocks'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/engine.rb:446:in `load_tasks'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
C:/Users/ironsand/dev/tangocho/Rakefile:6:in `<top (required)>'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/rake_module.rb:25:in `load_rakefile'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:637:in `raw_load_rakefile'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:94:in `block in load_rakefile'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:93:in `load_rakefile'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:77:in `block in run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `load'
C:/RailsInstaller/Ruby1.9.3/bin/rake:23:in `<main>'
要修正错误,请按rake
,gem uninstall rake
重新安装gem install rake
。
我也试过rake.bat
。
我也用Railsinstaller3.0(Ruby2.0.0)
尝试了同样的事情。
但所有尝试都没有用。
如果我创建一个新的rails项目,那么rake db:create
可以正常工作。
我该怎么做才能解决此错误?
答案 0 :(得分:1)
恐怕我有坏消息。您尝试运行的项目取决于铁路宝石,这在很大程度上取决于系统sed命令。这个命令在Windows上不可用,所以我担心没有任何简单的解决方案。
有许多工具尝试向Windows添加sed命令,您可以随时尝试安装其中一个(Google'sed windows')并更改gem以便它知道如何调用它(使用哪些选项等)。
然而,最好的解决方案是告别Windows并转向Linux。有足够的谷歌搜索技巧,你永远不会回头。