# Rake migration error

**URL:** <https://www.ruby-forum.com/t/rake-migration-error/170181>\
**Category:** Rails\
**Created:** [June 13, 2009, 10:34am UTC](https://www.ruby-forum.com/t/rake-migration-error/170181 "2009-06-13T10:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtolj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@dtolj](https://www.ruby-forum.com/u/dtolj)\
**Post date:** [June 13, 2009, 10:34am UTC](https://www.ruby-forum.com/t/rake-migration-error/170181/1 "2009-06-13T10:34:21Z")

</div>

Hi,  
I am constantly getting an error when I use the rake command to do a  
migration or even use drop, this happened after I installed some  
plugins such as paperclip and seed-fu.

The error is:  
rake aborted!  
uninitialized constant PKG\_NAME  
/var/www/html/quote/Rakefile:10

The Rakefile looks like this:

# Add your own tasks in files placed in lib/tasks ending in .rake,

# for example lib/tasks/capistrano.rake, and they will automatically

be available to Rake.

require(File.join(File.dirname( **FILE** ), ‘config’, ‘boot’))

require ‘rake’  
require ‘rake/testtask’  
require ‘rake/rdoctask’

require ‘tasks/rails’ \<==Line 10

I also ran with trace option and see:

(in /var/www/html/quote)  
rake aborted!  
uninitialized constant PKG\_NAME  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/  
active\_support/dependencies.rb:443:in `load_missing_constant' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:80:in`const\_missing’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/  
active\_support/dependencies.rb:92:in `const_missing' /var/www/html/quote/vendor/plugins/addressable/tasks/gem.rake:5 /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:422:in`initialize’  
/var/www/html/quote/vendor/plugins/addressable/tasks/gem.rake:4:in  
`new' /var/www/html/quote/vendor/plugins/addressable/tasks/gem.rake:4 /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1878:in`in\_namespace’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:910:in  
`namespace' /var/www/html/quote/vendor/plugins/addressable/tasks/gem.rake:3 /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:145:in`load\_without\_new\_constant\_marking’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/  
active\_support/dependencies.rb:145:in `load' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:521:in`new\_constants\_in’  
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/  
active\_support/dependencies.rb:145:in `load' /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/rails.rb:7 /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/rails.rb:7:in`each’  
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/rails.rb:7  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in  
`gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in`require’  
/var/www/html/quote/Rakefile:10  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2379:in  
`load' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2379:in`raw\_load\_rakefile’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2013:in  
`load_rakefile' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2064:in`standard\_exception\_handling’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2012:in  
`load_rakefile' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1996:in`run’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2064:in  
`standard_exception_handling' /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1994:in`run’  
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.6/bin/rake:31  
/usr/local/bin/rake:19:in `load’  
/usr/local/bin/rake:19

---

<div class="post-metadata">

**Author:** ![dtolj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@dtolj](https://www.ruby-forum.com/u/dtolj)\
**Post date:** [June 13, 2009, 1:41pm UTC](https://www.ruby-forum.com/t/rake-migration-error/170181/2 "2009-06-13T13:41:55Z")

</div>

Look for where this PKG\_NAME constant is being used and why it isn’t  
initialized.

- 

Maurício Linhares  
[http://codeshooter.wordpress.com/](http://codeshooter.wordpress.com/) | [http://twitter.com/mauriciojr](http://twitter.com/mauriciojr)

---

<div class="post-metadata">

**Author:** ![dtolj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@dtolj](https://www.ruby-forum.com/u/dtolj)\
**Post date:** [June 13, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/rake-migration-error/170181/3 "2009-06-13T18:49:58Z")

</div>

It seems to be referencing the addressable plugin, after I removed it,  
rake worked fine.

On Jun 13, 7:41 am, Maurício Linhares [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
