Forum: Rails Engines rake aborted! Object is not missing constant LoginEngine!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
02d2caa0eca64f3e01686db06c2b5b3e?d=identicon&s=25 javier barcena (Guest)
on 2007-05-21 06:32
(Received via mailing list)
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:in
`const_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:in
`send'
/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:in
`real_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:in
`migrate'
/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:in
`migrate'
/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:in
`each'
/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:in
`up'
/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:in
`migrate_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:in `real_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:in
`migrate'
/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:in
`migrate'
/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:in
`each'
/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:in
`up'
/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:in `call'
/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:in `each'
/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:in `invoke'
/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:in `invoke'
/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:in `each'
/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:in
`standard_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:in `run'
/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:in `run'
/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###################
Bfccdb1c41c334fec20e5ede3a7ccfcc?d=identicon&s=25 Andrew Roth (andrewroth)
on 2007-05-27 05:58
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-...).
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:in
> `const_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:in
> `send'
> 
/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:in
> `real_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:in
> `migrate'
> /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:in
> `migrate'
> /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:in
> `each'
> /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:in
> `up'
> /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:in
> `migrate_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:in `real_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:in
> `migrate'
> /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:in
> `migrate'
> /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:in
> `each'
> /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:in
> `up'
> /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:in `call'
> /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:in `each'
> /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:in `invoke'
> /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:in `invoke'
> /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:in `each'
> /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:in
> `standard_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:in `run'
> /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:in `run'
> /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###################
This topic is locked and can not be replied to.