生成Ruby on Rails脚手架时出错
我是Ruby on Rails的新手,我正在尝试通过初学者的教程来了解如何生成基本的rails应用程序。 试图生成脚手架时,出现以下错误:
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:466:in routes': no >such file to load -- action_dispatch/routing/route_set (LoadError) from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:519:in >
block in'from C:/ Ruby192 / lib / ruby / gems / 1.9.1 / gems / railties-> 3.1.1 / lib / rails / initializable.rb:30:in instance_exec' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/initializable.rb:30:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-> 3.1.1 / lib / rails / initializable.rb :55:在block in run_initializers' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/initializable.rb:54:in
中的block in run_initializers' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/initializable.rb:54:in
每个'from C:/ Ruby192 / lib / ruby / gems / 1.9.1 / gems / railties-> 3.1.1 / lib / rails / initializable.rb:54:in run_initializers' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/application.rb:96:in
初始化!' 从C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-> 3.1.1 / lib / rails / railtie / configurable.rb:30:in method_missing' from C:/Users/Spi/Documents/Komodo Projects/movielib/config/environment.rb:5:in >
'from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-> 3.1.1 / lib / rails / application.rb:83 :in require' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/application.rb:83:in
require_environment!' 从C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:22:in> <top (required)>' from script/rails:6:in
'require'从脚本/导轨:6:在''
我在运行Windows 7 64bit的PC上安装了Ruby 1.9.2和Rails 3.1.1版本。 我正在运行的命令如下:
rails generate scaffold Scaff_test string:title
我在命令提示符下运行这个命令,同时处于我之前创建的rails应用程序的目录中。 任何帮助将不胜感激!
该错误与路由有关。 作为生成所需文件的一部分,它将尝试更新routes.rb(位于config / routes.rb下)。
请检查文件是否存在,如果有,请检查routes.rb的文件权限
链接地址: http://www.djcxy.com/p/57895.html