I seem to be getting 2 errors,
Attachment_fu properties are not set
S3 is complaining ( Im not using it)
S3:
Processing ApplicationController#index (for 127.0.0.1 at 2010-05-31
16:49:10) [GET]
NameError (undefined local variable or method attachment_options' for #<Class:0x105870a40>): searchlogic (2.4.11) lib/searchlogic/named_scopes/conditions.rb: 88:in
method_missing’
searchlogic (2.4.11) lib/searchlogic/named_scopes/
association_conditions.rb:19:in method_missing' searchlogic (2.4.11) lib/searchlogic/named_scopes/ association_ordering.rb:27:in
method_missing’
searchlogic (2.4.11) lib/searchlogic/named_scopes/ordering.rb:30:in
method_missing' searchlogic (2.4.11) lib/searchlogic/named_scopes/or_conditions.rb: 28:in
method_missing’
app/models/photo.rb:15
/Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:
206:in const_missing' app/controllers/taggable_sweeper.rb:2 /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb: 206:in
const_missing’
app/controllers/users_controller.rb:5
/Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:
206:in const_missing' lib/flash_session_cookie_middleware.rb:14:in
call’
haml (3.0.4) rails/./lib/sass/plugin/rack.rb:41:in call' -e:1:in
load’
-e:1
Rendered rescues/_trace (50.5ms)
Rendered rescues/_request_and_response (1.1ms)
Rendering rescues/layout (internal_server_error)
Attachment_FU error:
Mon May 31 16:51:21 +0200 2010: Read error: #<NameError: undefined
local variable or method attachment_options' for #<Class: 0x105c0c780>> /Library/Ruby/Gems/1.8/gems/searchlogic-2.4.11/lib/searchlogic/ named_scopes/conditions.rb:88:in
method_missing’
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.11/lib/searchlogic/
named_scopes/association_conditions.rb:19:in method_missing' /Library/Ruby/Gems/1.8/gems/searchlogic-2.4.11/lib/searchlogic/ named_scopes/association_ordering.rb:27:in
method_missing’
/Library/Ruby/Gems/1.8/gems/searchlogic-2.4.11/lib/searchlogic/
named_scopes/ordering.rb:30:in method_missing' /Library/Ruby/Gems/1.8/gems/searchlogic-2.4.11/lib/searchlogic/ named_scopes/or_conditions.rb:28:in
method_missing’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/
base.rb:1959:in method_missing' /Users/pascal/Desktop/Actus/apache2/rubydocs/portal/app/models/ photo.rb:15 /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:380:in
load_without_new_constant_marking’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:380:in load_file' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:521:in
new_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:379:in load_file' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:259:in
require_or_load’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:425:in load_missing_constant' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:80:in
const_missing_not_from_s3_library’
/Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:
206:in const_missing' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:92:in
const_missing’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:98:in send' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:98:in
const_missing’
/Users/pascal/Desktop/Actus/apache2/rubydocs/portal/app/controllers/
taggable_sweeper.rb:2
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:380:in load_without_new_constant_marking' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:380:in
load_file’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:521:in new_constants_in' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:379:in
load_file’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:259:in require_or_load' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ dependencies.rb:425:in
load_missing_constant’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:80:in const_missing_not_from_s3_library' /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb: 206:in
const_missing’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
dependencies.rb:92:in const_missing' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ inflector.rb:361:in
constantize’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
inflector.rb:360:in each' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ inflector.rb:360:in
constantize’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
core_ext/string/inflections.rb:162:in constantize' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/ observer.rb:38:in
instantiate_observers’
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/
observer.rb:36:in each' /Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/ observer.rb:36:in
instantiate_observers’
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:15:in define_dispatcher_callbacks' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:182:in
call’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
callbacks.rb:182:in evaluate_method' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:166:in
call’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
callbacks.rb:90:in run' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:90:in
each’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
callbacks.rb:90:in send' /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/ callbacks.rb:90:in
run’
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/
callbacks.rb:276:in run_callbacks' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:51:in
send’
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
dispatcher.rb:51:in run_prepare_callbacks' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:56:in
reload_application’
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/
reloader.rb:33:in run' /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller/ dispatcher.rb:108:in
call’
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in
call' /Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in
call’
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in each' /Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
call’
/Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:
17:in call' /Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb: 13:in
call’
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in
call' /Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb: 64:in
process’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in process_client' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
each’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in process_client' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
run’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in initialize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
new’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in run' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
initialize’
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/
gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in new' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
run’
/Library/Ruby/Gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:
34:in run' /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:111 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
gem_original_require’
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' /Users/pascal/Desktop/Actus/apache2/rubydocs/portal/script/server:3 -e:1:in
load’
-e:1
Anyone has an working example for an attachment_fu initializer which
gets it settings from application.yml?
I have like this code which is not correct:
def prepare_options_for_attachment_fu(options)
attachment_fu_options = options.symbolize_keys.merge(
{:storage => options[‘storage’].to_sym,
:max_size => options[‘max_size’].to_i.megabytes,
:processor => (options[‘processor’] &&
options[‘processor’].to_sym)
})
end
Searched google for some tutorial with examples already, how can I
hook this code, modified so it works into my app so the attachment_fu
options are set?
Please help im so stuck on this, kind regards