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)block in ‘
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/engine.rb:519:in >
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/initializable.rb:30:ininstance_exec'run’
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:inblock in run_initializers'each’
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:inrun_initializers'initialize!’
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/application.rb:96:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/railtie/configurable.rb:30:inmethod_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:inrequire'require_environment!’
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties->3.1.1/lib/rails/application.rb:83:in
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1/lib/rails/commands.rb:22:in ><top (required)>'require’
from script/rails:6:in
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