Rake aborted! Object is not missing constant LoginEngine!


#1

Hello James. a question. because I have east error. stick the code
therefore you help me. thanks. dummies

javier@dummies:~/rails_app/martina$ script/generate plugin_migration
create db/migrate
create db/migrate/001_login_engine_to_version_1.rb
javier@dummies:~/rails_app/martina$ rake db:migrate
(in /home/javier/rails_app/martina)
== LoginEngineToVersion1: migrating

== InitialSchema: migrating

rake aborted!
Object is not missing constant LoginEngine!

(See full trace by running task with --trace)
javier@dummies:~/rails_app/martina$ script/generate plugin_migration
exists db/migrate
create db/migrate/001_login_engine_to_version_1.rb
javier@dummies:~/rails_app/martina$ rake db:migrate
(in /home/javier/rails_app/martina)
== LoginEngineToVersion1: migrating

rake aborted!
undefined method `vendor’ for Rails:Module

(See full trace by running task with --trace)
javier@dummies:~/rails_app/martina$ rake db:migrate
(in /home/javier/rails_app/martina)
== LoginEngineToVersion1: migrating

== InitialSchema: migrating

rake aborted!
Object is not missing constant LoginEngine!

(See full trace by running task with --trace)
javier@dummies:~/rails_app/martina$ rake db:migrate --trace
(in /home/javier/rails_app/martina)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== LoginEngineToVersion1: migrating

== InitialSchema: migrating

rake aborted!
Object is not missing constant LoginEngine!
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:240:in
load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in
const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:470:insend’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:470:in
const_missing' /home/javier/rails_app/martina/config/../vendor/plugins/login_engine/db/migrate/001_initial_schema.rb:3:inreal_up’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:in
send' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:335:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:ineach’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:297:inup’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:288:in
migrate' /home/javier/rails_app/martina/config/../vendor/plugins/engines/lib/engines/plugin_migrator.rb:18:inmigrate_plugin’
/home/javier/rails_app/martina/config/…/vendor/plugins/engines/lib/engines/plugin.rb:212:in
migrate' ./db/migrate//001_login_engine_to_version_1.rb:3:inreal_up’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:in
send' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:335:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:ineach’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:297:inup’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:288:in
migrate' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/tasks/databases.rake:4 /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:incall’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:ininvoke’
/usr/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:instandard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/usr/bin/rake:16:in `load’
/usr/bin/rake:16
javier@dummies:~/rails_app/martina$

################the end###################


#2

That’s a funny message, Object is NOT missing constant LoginEngine.
Should it be missing it? I would expect an error to happen when it IS
missing, or the error to say Object exists when it shouldn’t:
LoginEngine.

Anyways, your message got me to read a bit about what plugin_migration
does. My understanding is that it will copy all engine migrations (I’m
assuming, because it doesn’t take a parameter, so it does all?) to your
local migration. That seems like a pretty nutty thing, frankly, because
what if you later add a migration to the engine, then does it copy them
all over again? I guess it could be smart enough to copy just the new
ones. But, even so why not just use the engine migration rake tasks
that plugins provide, that seems much cleaner? I must not be
understanding this plugin_migration generator right, and/or you are not
using it right.

So, to answer your question… I don’t know :S Can you paste the code
in 001_login_engine_to_version_1.rb? That might help.

By the way, it seems that login engine is officially abandoned
(http://rails-engines.org/news/2007/01/23/farewell-login_engine-/).
Maybe it’s because it’s legacy code you get the error?

-Andrew

javier barcena wrote:

Hello James. a question. because I have east error. stick the code
therefore you help me. thanks. dummies

javier@dummies:~/rails_app/martina$ script/generate plugin_migration
create db/migrate
create db/migrate/001_login_engine_to_version_1.rb
javier@dummies:~/rails_app/martina$ rake db:migrate
(in /home/javier/rails_app/martina)
== LoginEngineToVersion1: migrating

== InitialSchema: migrating

rake aborted!
Object is not missing constant LoginEngine!

(See full trace by running task with --trace)
javier@dummies:~/rails_app/martina$ script/generate plugin_migration
exists db/migrate
create db/migrate/001_login_engine_to_version_1.rb
javier@dummies:~/rails_app/martina$ rake db:migrate
(in /home/javier/rails_app/martina)
== LoginEngineToVersion1: migrating

rake aborted!
undefined method `vendor’ for Rails:Module

(See full trace by running task with --trace)
javier@dummies:~/rails_app/martina$ rake db:migrate
(in /home/javier/rails_app/martina)
== LoginEngineToVersion1: migrating

== InitialSchema: migrating

rake aborted!
Object is not missing constant LoginEngine!

(See full trace by running task with --trace)
javier@dummies:~/rails_app/martina$ rake db:migrate --trace
(in /home/javier/rails_app/martina)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== LoginEngineToVersion1: migrating

== InitialSchema: migrating

rake aborted!
Object is not missing constant LoginEngine!
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:240:in
load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in
const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:470:insend’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:470:in
const_missing' /home/javier/rails_app/martina/config/../vendor/plugins/login_engine/db/migrate/001_initial_schema.rb:3:inreal_up’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:in
send' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:335:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:ineach’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:297:inup’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:288:in
migrate' /home/javier/rails_app/martina/config/../vendor/plugins/engines/lib/engines/plugin_migrator.rb:18:inmigrate_plugin’
/home/javier/rails_app/martina/config/…/vendor/plugins/engines/lib/engines/plugin.rb:212:in
migrate' ./db/migrate//001_login_engine_to_version_1.rb:3:inreal_up’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:in
send' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:212:inmigrate’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:335:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:ineach’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:330:in
migrate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:297:inup’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/migration.rb:288:in
migrate' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/tasks/databases.rake:4 /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:incall’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in execute' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:ininvoke’
/usr/lib/ruby/1.8/thread.rb:135:in synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:ininvoke’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:ineach’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:instandard_exception_handling’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:inrun’
/usr/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
/usr/bin/rake:16:in `load’
/usr/bin/rake:16
javier@dummies:~/rails_app/martina$

################the end###################