Error when generating Ruby on Rails scaffold

I am new to Ruby on Rails and I'm trying to go through a beginner's tutorial on how to produce a basic rails application. When trying to generate a scaffold, I get the following error:

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 run' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/initializable.rb:55: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 each' 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 initialize!' from 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!' from 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' from script/rails:6:in `'

I have the Ruby 1.9.2 and Rails 3.1.1 versions installed on a PC running windows 7 64bit. The command I'm running is the following:

rails generate scaffold Scaff_test string:title

I am running this from the command prompt while being at the directory of the rails application that I have previously created. Any help would be greatly appreciated!


The error is related to routing. As part of generating required files, it will try to update the routes.rb ( which is under config/routes.rb ).

Please check it out if the file exists and if so check the file permission of the routes.rb

链接地址: http://www.djcxy.com/p/57896.html

上一篇: p194,Rails 3.2.3,Mac Lion调试器

下一篇: 生成Ruby on Rails脚手架时出错