Forum: Radiant CMS Asset Manager Extension Issues

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.
Michael J. (Guest)
on 2007-01-19 17:30
(Received via mailing list)
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
Todd McGrath (Guest)
on 2007-01-19 17:31
(Received via mailing list)
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>:

>
> 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
Michael J. (Guest)
on 2007-01-19 18:34
(Received via mailing list)
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.
Adam S. (Guest)
on 2007-01-20 04:26
(Received via mailing list)
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
Andrew K. (Guest)
on 2007-01-20 06:14
(Received via mailing list)
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
Michael J. (Guest)
on 2007-01-20 06:54
(Received via mailing list)
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
Michael J. (Guest)
on 2007-01-20 07:15
(Received via mailing list)
Adam you ROCK!

Thanks so much for that info, I'm now uploading assets.
This topic is locked and can not be replied to.