High Priority Problem , when uploading image


#1

i m uploading an image and found following error , plz n e buddi help me
out ,
thxxxxxx in advace ,
my rails version is 2.2.2
and ruby version is 1.8.7
and i m using attachment_fu + mini_magick

the error is

Processing AdvertController#picture (for 127.0.0.1 at 2009-03-10
18:12:04) [POST]
Session ID: 16244113122f7096dbfc3daf1b4cb25a
Parameters: {“commit”=>“upload image”, “action”=>“picture”,
“count”=>“1”, “controller”=>“advert”,
“picture”=>{“uploaded_data”=>#StringIO:0xb69ce814}}

NoMethodError (undefined method []' for #<Enumerable::Enumerator:0xb677ce08>): /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/string/access.rb:43:infirst’
/home/hamid/rails/arabibay/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:70:in
has_attachment' /home/hamid/rails/arabibay/app/models/picture.rb:6 /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:203:inload_without_new_constant_marking’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:203:in
load_file' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:innew_constants_in’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:202:in
load_file' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:94:inrequire_or_load’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:248:in
load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:452:inconst_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:464:in
const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:470:insend’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:470:in
const_missing' /home/hamid/rails/arabibay/app/controllers/advert_controller.rb:201:inpicture’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:1101:in
send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:1101:inperform_action_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:696:in
call_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:688:inperform_action_without_benchmark’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:66:in
perform_action_without_rescue' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/rescue.rb:83:inperform_action’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:435:in
send' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:435:inprocess_without_filters’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:684:in
process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/session_management.rb:114:inprocess’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:334:in
process' /usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:41:indispatch’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/rails.rb:76:in
process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:74:insynchronize’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/rails.rb:74:in
process' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:inprocess_client’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:inprocess_client’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:ininitialize’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:innew’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in
run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in
each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in
run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:inrun’
/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:488:in
load' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:488:inload’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in
new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:488:inload’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/servers/mongrel.rb:60
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:innew_constants_in’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in
require' /usr/lib/ruby/gems/1.8/gems/rails-1.2.6/lib/commands/server.rb:39 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
script/server:3


#2

The trace suggests an problem in advert_controller.rb line 201. Have you
had
a look there?

2009/3/10 Hamid R. removed_email_address@domain.invalid


#3

Could we get a look at the picture model? looks like it has issues at
line 6


#4

Freddy A. wrote:

Could we get a look at the picture model? looks like it has issues at
line 6

dear fellow , the problem is not with model or controller , as the code
i have of application is running fine on another system , :s , i think
its a problem with plugin :frowning:


#5

On Mar 11, 9:28 am, Hamid R. removed_email_address@domain.invalid
wrote:

Freddy A. wrote:

Could we get a look at the picture model? looks like it has issues at
line 6

dear fellow , the problem is not with model or controller , as the code
i have of application is running fine on another system , :s , i think
its a problem with plugin :frowning:

Well the plugin code is also the same on both systems. You claim to be
running rails 2.2.2 yet the stack trace clearly shows you are running
rails 1.2.6, which isn’t compatible with ruby 1.8.7.

Fred