Miał ktoś z was kiedys cos podobnego?? dzieki za odpowiedz
rake db:migrate
rake aborted!
undefined local variable or method `XXX’ for main:Object
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Miał ktoś z was kiedys cos podobnego?? dzieki za odpowiedz
rake db:migrate
rake aborted!
undefined local variable or method `XXX’ for main:Object
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
pokaż kod migracji, bez tego ciężko cokolwiek powiedzieć.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined local variable or method xxx' for main:Object /home/rafal/Pulpit/Konf/Konf/config/routes.rb:1 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in
load’
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in load' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in
load_dependency’
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:596:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:225:in
load_dependency’
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/dependencies.rb:235:in load' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:127:in
reload_routes!’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:127:in each' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:127:in
reload_routes!’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:120:in routes_reloader' /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/file_update_checker.rb:32:in
call’
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/active_support/file_update_checker.rb:32:in execute_if_updated' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application/finisher.rb:51 /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application/finisher.rb:52:in
call’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application/finisher.rb:52
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25:in instance_exec' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:25:in
run’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:50:in run_initializers' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49:in
each’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/initializable.rb:49:in run_initializers' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:134:in
initialize!’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77:in send' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:77:in
method_missing’
/home/rafal/Pulpit/Konf/Konf/config/environment.rb:5
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:103:in require' /usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:103:in
require_environment!’
/usr/lib/ruby/gems/1.8/gems/railties-3.0.9/lib/rails/application.rb:218:in initialize_tasks' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in
call’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in
each’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in
invoke_with_call_chain’
/usr/lib/ruby/1.8/monitor.rb:242:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in
invoke_with_call_chain’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in
each’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in
invoke_with_call_chain’
/usr/lib/ruby/1.8/monitor.rb:242:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in
invoke_with_call_chain’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in
invoke_task’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in
each’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in
standard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in
run’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in
run’
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
/usr/bin/rake:19:in `load’
/usr/bin/rake:19
Tasks: TOP => db:migrate => environment
O to Ci chodzilo?
Nie, pokazałeś stacktrace, a nie kod pliku migracji która się wykrzacza.
Problem w tym ze niewiem ktora sie wykrzacza bazy tylko w mysql tworzy 2 development i test sa one obie puste
Stacktrace pokazuje Ci błąd w config/routes.rb w pierwszej linijce. Sprawdź co tam masz, migracje pewnie są ok.
XXX::Application.routes.draw do
Wkleiłeś to czy przepisałeś? Nie masz przypadkiem spacji po ‘XXX’ (piszesz serwis porno?).
Nie mam spacji:) i serwis porno tez to nei jest:P