# Migration error

**URL:** <https://www.ruby-forum.com/t/migration-error/151649>\
**Category:** Rails\
**Created:** [October 23, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/migration-error/151649 "2008-10-23T22:18:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kobrakai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8491ac/32.png) [@kobrakai](https://www.ruby-forum.com/u/kobrakai)\
**Post date:** [October 23, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/migration-error/151649/1 "2008-10-23T22:18:35Z")

</div>

Hi all

I’m getting an error when running rake db:migrate :-

rake aborted!  
uninitialized constant PKG\_NAME

I’m not sure what PKG\_NAME is refering to, has anyone else had this  
same issue or does anyone have an idea what could be causing this?

Hope someone can help.

Many thanks  
KK

---

<div class="post-metadata">

**Author:** ![kobrakai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8491ac/32.png) [@kobrakai](https://www.ruby-forum.com/u/kobrakai)\
**Post date:** [October 24, 2008, 12:20pm UTC](https://www.ruby-forum.com/t/migration-error/151649/2 "2008-10-24T12:20:56Z")

</div>

On Oct 23, 7:12 pm, KoBrAKai [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi all
> 
> I’m getting an error when running rake db:migrate :-
> 
> rake aborted!  
> uninitialized constant PKG\_NAME
> 
> I’m not sure what PKG\_NAME is refering to, has anyone else had this  
> same issue or does anyone have an idea what could be causing this?

What does the backtrace look like? Do you reference such a constant  
anywhere in your app?

Fred

---

<div class="post-metadata">

**Author:** ![kobrakai](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/8491ac/32.png) [@kobrakai](https://www.ruby-forum.com/u/kobrakai)\
**Post date:** [October 24, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/migration-error/151649/3 "2008-10-24T22:32:07Z")

</div>

Hi Fred

Thanks for responding.

If I run db:migrate --trace

rake aborted!  
uninitialized constant PKG\_NAME  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/  
dependencies.rb:270:in `load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:457:in`const\_missing’  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/  
dependencies.rb:469:in `const_missing' /mnt/home/userapps/4380/vendor/gems/uuidtools-1.0.4/tasks/gem.rake:5 /usr/local/lib/site_ruby/1.8/rubygems/specification.rb:443:in`initialize’  
/mnt/home/userapps/4380/vendor/gems/uuidtools-1.0.4/tasks/gem.rake:  
4:in `new' /mnt/home/userapps/4380/vendor/gems/uuidtools-1.0.4/tasks/gem.rake:4 /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1737:in`in\_namespace’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:821:in `namespace' /mnt/home/userapps/4380/vendor/gems/uuidtools-1.0.4/tasks/gem.rake:3 /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:493:in`load’  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/  
dependencies.rb:493:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:346:in`new\_constants\_in’  
/usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active\_support/  
dependencies.rb:493:in `load' /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/rails.rb:9 /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/rails.rb:9:in`each’  
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/rails.rb:9  
/usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in`require’  
/mnt/home/userapps/4380/Rakefile:10  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in `load' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:2149:in`raw\_load\_rakefile’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1897:in  
`load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in`standard\_exception\_handling’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1896:in  
`load_rakefile' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1880:in`run’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in  
`standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in`run’  
/usr/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31  
/usr/bin/rake:19:in `load’  
/usr/bin/rake:19

Any ideas?

Craig
