Ruby on rails 3.2 无法使用社区引擎gem上载照片
我正在研究一种使用。我使用的是ruby 1.9.3和rails 3.2.8 当我试图上传个人资料照片时,我得到以下错误-Ruby on rails 3.2 无法使用社区引擎gem上载照片,ruby-on-rails-3.2,paperclip,ruby-1.9.3,photo-upload,communityengine,Ruby On Rails 3.2,Paperclip,Ruby 1.9.3,Photo Upload,Communityengine,我正在研究一种使用。我使用的是ruby 1.9.3和rails 3.2.8 当我试图上传个人资料照片时,我得到以下错误- can't convert Configatron::Store to Array (Configatron::Store#to_ary gives Configatron::Store). configatron (3.0.1) lib/configatron/store.rb:81:in `method_missing' 应用程序跟踪给出了以下错误- can't co
can't convert Configatron::Store to Array (Configatron::Store#to_ary gives Configatron::Store).
configatron (3.0.1) lib/configatron/store.rb:81:in `method_missing'
应用程序跟踪给出了以下错误-
can't convert Configatron::Store to Array (Configatron::Store#to_ary gives Configatron::Store).
configatron (3.0.1) lib/configatron/store.rb:81:in `method_missing'
下面给出了作为我正在尝试的照片上传的一部分传递的参数-
{"utf8"=>"✓",
"_method"=>"put",
"authenticity_token"=>"mLZMbkUHoupgAZyJKFS4Zif0s3MTGZQowY4Rt4ugUJo=",
"user"=>{"avatar_attributes"=>{"photo"=>#<ActionDispatch::Http::UploadedFile:0xafc4d38 @original_filename="img_0875.jpg",
@content_type="image/jpeg",
@headers="Content-Disposition: form-data; name=\"user[avatar_attributes][photo]\"; filename=\"img_0875.jpg\"\r\nContent-Type: image/jpeg\r\n",
@tempfile=#<File:/tmp/RackMultipart20140307-19979-1r5bo7u>>,
"user_id"=>3},
"zip"=>"",
"birthday(1i)"=>"1982",
"birthday(2i)"=>"3",
"birthday(3i)"=>"7",
"description"=>""},
"country_id"=>"",
"tag_list"=>"",
"commit"=>"Save Changes",
"id"=>"chris"}
我不确定到底出了什么问题。如果我能得到一些关于如何让照片上传功能正常工作的建议,那就太好了。我也遇到了同样的问题。更新社区中configatron和回形针的版本。gemspec为我解决了这个问题
请尝试将configatron设置为~>2.0,将回形针设置为~>4.1.1。很抱歉回复太晚,谢谢您的回答,我只需查找代码,然后尝试您的更改,看看是否有效。