# Asset Manager Extension Issues

**URL:** <https://www.ruby-forum.com/t/asset-manager-extension-issues/82386>\
**Category:** Radiant CMS\
**Created:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386 "2007-01-19T16:30:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/1 "2007-01-19T16:30:01Z")

</div>

Hello-

I’m hoping someone can point out what I’m doing wrong with the Asset  
Manager…

I installed Radiant on Dreamhost and all went well.

I installed the acts\_as\_attchment plugin and it still looked good.

I checked the gems and rmagick (1.10.1) is installed.

When I click on the ‘Images’ tab from the admin I get this error in  
the production.log:

LoadError (Expected  
…/config/…/vendor/extensions/assets/app/models/asset.rb to define  
Asset):  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:250:in  
`load\_missing\_constant’

When I fire up the console in production mode and try to create a new  
Asset  
a = Asset.new  
I get:

NameError: uninitialized constant  
Technoweenie::ActsAsAttachment::ActMethods::InstanceMethods from  
./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:264:in  
`load\_missing\_constant’

Any suggestions on what to try? The full stack traces are below.

Thanks-  
Michael

FULL ERRORS:

LoadError (Expected  
…/config/…/vendor/extensions/assets/app/models/asset.rb to define  
Asset):  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:250:in  
`load_missing_constant' /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in`const\_missing’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:465:in  
`const_missing' /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:261:in`load\_missing\_constant’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:453:in  
`const_missing' /vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:261:in`load\_missing\_constant’  
/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:469:in  
`const_missing' /vendor/extensions/assets/app/controllers/admin/asset_controller.rb:11:in`index’  
/vendor/rails/actionpack/lib/action\_controller/base.rb:1095:in  
`send' /vendor/rails/actionpack/lib/action_controller/base.rb:1095:in`perform\_action\_without\_filters’  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:632:in  
`call_filter' /vendor/rails/actionpack/lib/action_controller/filters.rb:638:in`call\_filter’  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:438:in  
`call' /vendor/rails/actionpack/lib/action_controller/filters.rb:637:in`call\_filter’  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:638:in  
`call_filter' /vendor/rails/actionpack/lib/action_controller/filters.rb:438:in`call’  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:637:in  
`call_filter' /vendor/rails/actionpack/lib/action_controller/filters.rb:638:in`call\_filter’  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:438:in  
`call' /vendor/rails/actionpack/lib/action_controller/filters.rb:637:in`call\_filter’  
/vendor/rails/actionpack/lib/action\_controller/filters.rb:619:in  
`perform_action_without_benchmark' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in`perform\_action\_without\_rescue’  
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure' /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in`perform\_action\_without\_rescue’  
/vendor/rails/actionpack/lib/action\_controller/rescue.rb:83:in  
`perform_action' /vendor/rails/actionpack/lib/action_controller/base.rb:430:in`send’  
/vendor/rails/actionpack/lib/action\_controller/base.rb:430:in  
`process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:624:in`process\_without\_session\_management\_support’  
/vendor/rails/actionpack/lib/action\_controller/session\_management.rb:114:in  
`process' /vendor/rails/actionpack/lib/action_controller/base.rb:330:in`process’  
/vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch' /vendor/rails/railties/lib/fcgi_handler.rb:168:in`process\_request’  
/vendor/rails/railties/lib/fcgi\_handler.rb:143:in  
`process_each_request!' /vendor/rails/railties/lib/fcgi_handler.rb:109:in`with\_signal\_handler’  
/vendor/rails/railties/lib/fcgi\_handler.rb:142:in  
`process_each_request!' /usr/lib/ruby/1.8/fcgi.rb:600:in`each\_cgi’  
/usr/lib/ruby/1.8/fcgi.rb:597:in `each' /usr/lib/ruby/1.8/fcgi.rb:597:in`each\_cgi’  
/vendor/rails/railties/lib/fcgi\_handler.rb:141:in  
`process_each_request!' /vendor/rails/railties/lib/fcgi_handler.rb:55:in`process!’  
/vendor/rails/railties/lib/fcgi\_handler.rb:25:in `process!’  
dispatch.fcgi:24

NameError: uninitialized constant  
Technoweenie::ActsAsAttachment::ActMethods::InstanceMethods  
from  
./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:264:in  
`load_missing_constant' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:453:in`const\_missing’  
from  
./script/…/config/…/config/…/vendor/plugins/acts\_as\_attachment/lib/technoweenie/acts\_as\_attachment.rb:51:in  
`acts_as_attachment' from ./script/../config/../config/../vendor/extensions/assets/app/models/asset.rb:7 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in`require\_\_’  
from  
/usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:18:in  
`require' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in`require’  
from  
./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:343:in  
`new_constants_in' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:496:in`require’  
from  
./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:105:in  
`require_or_load' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:249:in`load\_missing\_constant’  
from  
./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:453:in  
`const_missing' from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:465:in`const\_missing’  
from (irb):1

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 19, 2007, 5:34pm UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/2 "2007-01-19T17:34:19Z")

</div>

Yes, I have the table:

mysql\> desc assets;  
±-------------±-------------±-----±----±--------±---------------+  
| Field | Type | Null | Key | Default | Extra |  
±-------------±-------------±-----±----±--------±---------------+  
| id | int(11) | NO | PRI | NULL | auto\_increment |  
| title | varchar(255) | YES | | NULL | |  
| content\_type | varchar(255) | YES | | NULL | |  
| filename | varchar(255) | YES | | NULL | |  
| size | int(11) | YES | | NULL | |  
| parent\_id | int(11) | YES | | NULL | |  
| thumbnail | varchar(255) | YES | | NULL | |  
| width | int(11) | YES | | NULL | |  
| height | int(11) | YES | | NULL | |  
| created\_at | datetime | YES | | NULL | |  
| created\_by | int(11) | YES | | NULL | |  
| updated\_at | datetime | YES | | NULL | |  
| updated\_by | int(11) | YES | | NULL | |  
| page\_id | int(11) | YES | | NULL | |  
±-------------±-------------±-----±----±--------±---------------+  
14 rows in set (0.01 sec)

And I have the ‘extensions\_meta’ table.

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/3 "2007-01-19T16:31:35Z")

</div>

Hi,  
Do you have an assets table in the db? Did you run ‘rake  
db:migrate:extensions’?

Todd

Quoting M. Jones [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> When I click on the ‘Images’ tab from the admin I get this error in  
> the production.log:
> 
> LoadError (Expected  
> …/config/…/vendor/extensions/assets/app/models/asset.rb to define  
> Asset):

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:250:in

> `load\_missing\_constant’
> 
> When I fire up the console in production mode and try to create a new Asset  
> a = Asset.new  
> I get:
> 
> NameError: uninitialized constant  
> Technoweenie::ActsAsAttachment::ActMethods::InstanceMethods from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:264:in

> FULL ERRORS:
> 
> LoadError (Expected  
> …/config/…/vendor/extensions/assets/app/models/asset.rb to define  
> Asset):

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:250:in

> `load\_missing\_constant’

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:453:in

> `const\_missing’

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:465:in

> `const\_missing’

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:261:in

> `load\_missing\_constant’

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:453:in

> `const\_missing’

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:261:in

> `load\_missing\_constant’

/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:469:in

> `call_filter' /vendor/rails/actionpack/lib/action_controller/filters.rb:438:in `call’  
> `perform_action' /vendor/rails/railties/lib/fcgi_handler.rb:168:in `process\_request’  
> /vendor/rails/railties/lib/fcgi\_handler.rb:55:in `process!’

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:264:in

> `load\_missing\_constant’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:453:in

> `const\_missing’  
> from

./script/…/config/…/config/…/vendor/plugins/acts\_as\_attachment/lib/technoweenie/acts\_as\_attachment.rb:51:in

> `acts\_as\_attachment’  
> from

./script/…/config/…/config/…/vendor/extensions/assets/app/models/asset.rb:7

> ```
> from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in
> 
> ```
> 
> `require__' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:18:in `require’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:496:in

> `require’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:343:in

> `new\_constants\_in’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:496:in

> `require’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:105:in

> `require\_or\_load’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:249:in

> `load\_missing\_constant’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:453:in

> `const\_missing’  
> from

./script/…/config/…/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:465:in

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 20, 2007, 3:26am UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/4 "2007-01-20T03:26:39Z")

</div>

What version of Rails is it running. Remember you have to freeze edge  
(although 1.2 is out now, so maybe you can just freeze 1.2).  
I also had trouble with acts\_as\_attachment, but it had to do with the  
changes to how modules are loaded in /vendor.  
I sent my updates to the maintainer Keith.

I modified the acts\_as\_attachment/init.rb and put the following lines  
at the top of the file:  
require ‘db\_file’  
require ‘technoweenie/acts\_as\_attachment’  
require ‘technoweenie/acts\_as\_attachment/class\_methods’  
require ‘technoweenie/acts\_as\_attachment/db\_file\_methods’  
require ‘technoweenie/acts\_as\_attachment/file\_system\_methods’  
require ‘technoweenie/acts\_as\_attachment/instance\_methods’

Note: I also integrated lightbox, so if you want a zip of my whole  
extensions dir I can email it to you…

HTH,  
Adam

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 20, 2007, 5:54am UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/5 "2007-01-20T05:54:52Z")

</div>

There has been alot of email about this, I’d suggest starting by  
digging through the archives a bit, I do remember a recent thread  
about how to migrate from trunk to mental and migration scripts.

In short the big difference is Extensions.

BTW: I bet alot of other people are gonna have the same questions you  
have, would you be willing to put together a wiki entry that answers  
these questions? I’m sure if you were willing to do this than some of  
the radiant guru’s would gladly give you some great copy!

Cheers-  
MJ

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 20, 2007, 5:14am UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/6 "2007-01-20T05:14:50Z")

</div>

Hello all!

Well, I’m back again. Been enjoying 0.5.2. Been watching the mailgroup  
for a bit. I know there is significantly newer versions of Radiant  
through svn. Doesn’t have to be in layman’s terms, I am just stumped at  
the difference between Trunk and Mental and would kind of like a summary  
of it. As well, will it be easy to port between the two when Mental goes  
live? (If it goes live)

Thanks all!  
Andrew

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [January 20, 2007, 6:15am UTC](https://www.ruby-forum.com/t/asset-manager-extension-issues/82386/7 "2007-01-20T06:15:53Z")

</div>

Adam you ROCK!

Thanks so much for that info, I’m now uploading assets.
