Привет, я точно следовал шагам по созданию демо-приложения для Rubys в Windows. но когда я пытаюсь сгенерировать таблицы с помощью команды scaffold,
rails generate scaffold User name:string email:string
Я получил следующие ошибки:
C:/Users/YoYo/Ruby_Projects/demo_app/config/environments/development.rb:1:in `<t
op (required)>': undefined method `configure' for #<DemoApp::Application:0x00000
00534bc00> (NoMethodError)
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/act
ive_support/dependencies.rb:229:in `require'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/act
ive_support/dependencies.rb:229:in `block in require'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/act
ive_support/dependencies.rb:214:in `load_dependency'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-4.0.5/lib/act
ive_support/dependencies.rb:229:in `require'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/en
gine.rb:591:in `block (2 levels) in <class:Engine>'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/en
gine.rb:590:in `each'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/en
gine.rb:590:in `block in <class:Engine>'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/in
itializable.rb:30:in `instance_exec'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/in
itializable.rb:30:in `run'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/in
itializable.rb:55:in `block in run_initializers'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in
each_strongly_connected_component'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in
each_strongly_connected_component_from'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connec
ted_component_from'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strong
ly_connected_component_from'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/in
itializable.rb:44:in `each'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/in
itializable.rb:44:in `tsort_each_child'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connec
ted_component_from'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strong
ly_connected_component'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:180:in `each'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connec
ted_component'
from D:/Ruby200-x64/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/in
itializable.rb:54:in `run_initializers'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/ap
plication.rb:215:in `initialize!'
from C:/Users/YoYo/Ruby_Projects/demo_app/config/environment.rb:5:in `<t
op (required)>'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/ap
plication.rb:189:in `require'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/ap
plication.rb:189:in `require_environment!'
from D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-4.0.5/lib/rails/co
mmands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Кто-нибудь знает, как решить?
demo_app/config/environments/development.rb
файла должна содержатьDemoApp::Application.configure
. Опубликуйте свойdevelopment.rb
файл. - person Pavan   schedule 19.05.2014