ruby on rails - Cant find the error in Heroku Logs -


i doing 1 month rails course , stucked in 1 point.

i have app in heroku: http://arcane-shelf-3404.herokuapp.com/

but when upload image, give me error.

help me find error. thanks!

here log:

←[36m2014-06-02t06:19:47.681565+00:00 app[web.1]:←[0m command :: convert '/tmp/f 85a2368337734c012dda7e3c61bfb8920140602-2-1s8hujo.png[0]' -auto-orient -resize " 100x100>" '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1s8hujo20140602-2-1rj ixun' ←[36m2014-06-02t06:19:47.955359+00:00 app[web.1]:←[0m command :: file -b --mime '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1s8hujo20140602-2-1rjixun' ←[36m2014-06-02t06:19:48.191298+00:00 app[web.1]:←[0m completed 500 internal ser ver error in 2818ms ←[33m2014-06-02t06:19:48.276690+00:00 heroku[router]:←[0m at=info method=post pa th=/pins host=arcane-shelf-3404.herokuapp.com request_id=aa625159-c846-4e33-b931 -be0ed643437a fwd="190.114.248.109" dyno=web.1 connect=1ms service=3937ms status =500 bytes=1754 ←[36m2014-06-02t06:19:48.211023+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:19:48.176176+00:00 app[web.1]:←[0m [paperclip] saving /pins/i mages/000/000/003/original/gdt05_camera_lens3.png ←[36m2014-06-02t06:19:48.211031+00:00 app[web.1]:←[0m   app/controllers/pins_con troller.rb:22:in `create' ←[36m2014-06-02t06:19:48.211028+00:00 app[web.1]:←[0m argumenterror (missing req uired :bucket option): ←[36m2014-06-02t06:19:48.211032+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:19:48.211033+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:21:06.259776+00:00 heroku[web.1]:←[0m state changed t o starting ←[36m2014-06-02t06:21:10.133404+00:00 app[web.1]:←[0m [2014-06-02 06:21:10] fata l signalexception: sigterm ←[36m2014-06-02t06:21:10.133409+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l ib/ruby/2.0.0/webrick/server.rb:170:in `select' ←[36m2014-06-02t06:21:10.133414+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l ib/ruby/2.0.0/webrick/server.rb:160:in `start' ←[36m2014-06-02t06:21:10.133433+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in `run' ←[36m2014-06-02t06:21:10.133411+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l ib/ruby/2.0.0/webrick/server.rb:170:in `block in start' ←[36m2014-06-02t06:21:10.133435+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/rack-1.5.2/lib/rack/server.rb:264:in `start' ←[36m2014-06-02t06:21:10.133436+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/railties-4.1.1/lib/rails/commands/server.rb:69:in `start' ←[36m2014-06-02t06:21:10.133444+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>' ←[36m2014-06-02t06:21:10.133446+00:00 app[web.1]:←[0m   bin/rails:4:in `require'  ←[36m2014-06-02t06:21:10.133412+00:00 app[web.1]:←[0m   /app/vendor/ruby-2.0.0/l ib/ruby/2.0.0/webrick/server.rb:32:in `start' ←[36m2014-06-02t06:21:10.133448+00:00 app[web.1]:←[0m   bin/rails:4:in `<main>' ←[36m2014-06-02t06:21:10.133493+00:00 app[web.1]:←[0m [2014-06-02 06:21:10] info   going shutdown ... ←[36m2014-06-02t06:21:10.133442+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `server' ←[36m2014-06-02t06:21:10.133655+00:00 app[web.1]:←[0m [2014-06-02 06:21:10] info   webrick::httpserver#start done. ←[36m2014-06-02t06:21:10.133706+00:00 app[web.1]:←[0m exiting ←[36m2014-06-02t06:21:10.133443+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_comman d!' ←[36m2014-06-02t06:21:10.133440+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:76:in `tap' ←[36m2014-06-02t06:21:10.133438+00:00 app[web.1]:←[0m   /app/vendor/bundle/ruby/ 2.0.0/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:81:in `block in s erver' ←[36m2014-06-02t06:21:10.346377+00:00 heroku[web.1]:←[0m starting process c ommand `bin/rails server -p 50269 -e production` ←[36m2014-06-02t06:21:09.495879+00:00 heroku[web.1]:←[0m stopping processes sigterm ←[36m2014-06-02t06:21:11.476607+00:00 heroku[web.1]:←[0m process exited sta tus 143 ←[36m2014-06-02t06:21:17.901730+00:00 heroku[web.1]:←[0m state changed star ting ←[36m2014-06-02t06:21:17.802200+00:00 app[web.1]:←[0m [2014-06-02 06:21:17] info   webrick 1.3.1 ←[36m2014-06-02t06:21:17.802319+00:00 app[web.1]:←[0m [2014-06-02 06:21:17] info   ruby 2.0.0 (2014-05-08) [x86_64-linux] ←[36m2014-06-02t06:21:17.802903+00:00 app[web.1]:←[0m [2014-06-02 06:21:17] info   webrick::httpserver#start: pid=2 port=50269 ←[36m2014-06-02t06:21:19.273758+00:00 app[web.1]:←[0m => rails 4.1.1 application  starting in production on http://0.0.0.0:50269 ←[36m2014-06-02t06:21:19.273760+00:00 app[web.1]:←[0m => run `rails server -h` f or more startup options ←[36m2014-06-02t06:21:19.273751+00:00 app[web.1]:←[0m => booting webrick ←[36m2014-06-02t06:21:19.273762+00:00 app[web.1]:←[0m => notice: server liste ning on interfaces (0.0.0.0). consider using 127.0.0.1 (--binding option) ←[36m2014-06-02t06:21:19.273763+00:00 app[web.1]:←[0m => ctrl-c shutdown serv er ←[36m2014-06-02t06:21:19.273765+00:00 app[web.1]:←[0m started post "/pins" 1 90.114.248.109 @ 2014-06-02 06:21:19 +0000 ←[36m2014-06-02t06:21:19.379258+00:00 app[web.1]:←[0m processing pinscontroll er#create html ←[36m2014-06-02t06:21:19.379355+00:00 app[web.1]:←[0m   parameters: {"utf8"=>"?? ?", "authenticity_token"=>"emnpdvv9kk1sz/kcl9x21w+6mfepm8/d+qfelqvmxxm=", "pin"= >{"image"=>#<actiondispatch::http::uploadedfile:0x007fbb4ee7c4d8 @tempfile=#<tem pfile:/tmp/rackmultipart20140602-2-1hvrs94>, @original_filename="gdt05_camera le ns3.png", @content_type="image/png", @headers="content-disposition: form-data; n ame=\"pin[image]\"; filename=\"gdt05_camera lens3.png\"\r\ncontent-type: image/p ng\r\n">, "description"=>"asdadad"}, "commit"=>"create pin"} ←[36m2014-06-02t06:21:19.466196+00:00 app[web.1]:←[0m command :: identify -forma t '%wx%h,%[exif:orientation]' '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1 lj566b.png[0]' 2>/dev/null ←[36m2014-06-02t06:21:19.707875+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' ←[36m2014-06-02t06:21:19.525316+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' ←[36m2014-06-02t06:21:19.593996+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' ←[36m2014-06-02t06:21:19.831975+00:00 app[web.1]:←[0m command :: convert '/tmp/f 85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' -auto-orient -resize " 300x300>" '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b20140602-2-qn5 wzi' ←[36m2014-06-02t06:21:20.409313+00:00 app[web.1]:←[0m command :: file -b --mime '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b20140602-2-qn5wzi' ←[36m2014-06-02t06:21:20.654060+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' ←[36m2014-06-02t06:21:20.542819+00:00 app[web.1]:←[0m command :: identify -forma t '%wx%h,%[exif:orientation]' '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1 lj566b.png[0]' 2>/dev/null ←[36m2014-06-02t06:21:20.767431+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' ←[36m2014-06-02t06:21:20.842459+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' ←[36m2014-06-02t06:21:20.913966+00:00 app[web.1]:←[0m command :: convert '/tmp/f 85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b.png[0]' -auto-orient -resize " 100x100>" '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b20140602-2-kzm tux' ←[36m2014-06-02t06:21:21.199779+00:00 app[web.1]:←[0m command :: file -b --mime '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-1lj566b20140602-2-kzmtux' ←[36m2014-06-02t06:21:21.366506+00:00 app[web.1]:←[0m [paperclip] saving /pins/i mages/000/000/004/original/gdt05_camera_lens3.png ←[33m2014-06-02t06:21:23.087200+00:00 heroku[router]:←[0m at=info method=post pa th=/pins host=arcane-shelf-3404.herokuapp.com request_id=4161c089-c9d8-4111-90bf -4f4d43c3ec06 fwd="190.114.248.109" dyno=web.1 connect=5ms service=4078ms status =500 bytes=1754 ←[36m2014-06-02t06:21:22.992585+00:00 app[web.1]:←[0m completed 500 internal ser ver error in 3583ms ←[36m2014-06-02t06:21:22.994508+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:21:22.994513+00:00 app[web.1]:←[0m   app/controllers/pins_con troller.rb:22:in `create' ←[36m2014-06-02t06:21:22.994517+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:21:22.994511+00:00 app[web.1]:←[0m argumenterror (missing req uired :bucket option): ←[36m2014-06-02t06:21:22.994515+00:00 app[web.1]:←[0m ←[33m2014-06-02t06:21:23.557093+00:00 heroku[router]:←[0m at=info method=get pat h=/favicon.ico host=arcane-shelf-3404.herokuapp.com request_id=7362fd76-f3a3-43c c-9e15-9dc5b67c7646 fwd="190.114.248.109" dyno=web.1 connect=1ms service=12ms st atus=304 bytes=133 ←[33m2014-06-02t06:21:27.043612+00:00 heroku[router]:←[0m at=info method=get pat h=/ host=arcane-shelf-3404.herokuapp.com request_id=fa665a0f-e648-46c7-91e1-90dc b9f707c9 fwd="190.114.248.109" dyno=web.1 connect=1ms service=91ms status=200 tes=2820 ←[36m2014-06-02t06:21:26.958962+00:00 app[web.1]:←[0m started "/" 190.11 4.248.109 @ 2014-06-02 06:21:26 +0000 ←[36m2014-06-02t06:21:27.011097+00:00 app[web.1]:←[0m   rendered pins/index.html .erb within layouts/application (20.0ms) ←[36m2014-06-02t06:21:27.031399+00:00 app[web.1]:←[0m completed 200 ok in 58ms ( views: 45.2ms | activerecord: 6.9ms) ←[36m2014-06-02t06:21:26.973229+00:00 app[web.1]:←[0m processing pinscontroll er#index html ←[36m2014-06-02t06:21:27.028535+00:00 app[web.1]:←[0m   rendered layouts/_header .html.erb (9.7ms) ←[33m2014-06-02t06:21:28.866584+00:00 heroku[router]:←[0m at=info method=get pat h=/pins/new host=arcane-shelf-3404.herokuapp.com request_id=0a7fdeb0-f980-4238-a 0d2-ea2144baccea fwd="190.114.248.109" dyno=web.1 connect=1ms service=134ms stat us=304 bytes=887 ←[36m2014-06-02t06:21:28.743259+00:00 app[web.1]:←[0m started "/pins/new" fo r 190.114.248.109 @ 2014-06-02 06:21:28 +0000 ←[36m2014-06-02t06:21:28.835827+00:00 app[web.1]:←[0m   rendered pins/_form.html .erb (34.4ms) ←[36m2014-06-02t06:21:28.857782+00:00 app[web.1]:←[0m   rendered layouts/_header .html.erb (16.6ms) ←[36m2014-06-02t06:21:28.749705+00:00 app[web.1]:←[0m processing pinscontroll er#new html ←[36m2014-06-02t06:21:28.839410+00:00 app[web.1]:←[0m   rendered pins/new.html.e rb within layouts/application (43.5ms) ←[36m2014-06-02t06:21:28.858300+00:00 app[web.1]:←[0m completed 200 ok in 109ms (views: 68.2ms | activerecord: 1.5ms) ←[36m2014-06-02t06:21:33.993156+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' ←[36m2014-06-02t06:21:33.822304+00:00 app[web.1]:←[0m started post "/pins" 1 90.114.248.109 @ 2014-06-02 06:21:33 +0000 ←[36m2014-06-02t06:21:33.826962+00:00 app[web.1]:←[0m processing pinscontroll er#create html ←[36m2014-06-02t06:21:33.827030+00:00 app[web.1]:←[0m   parameters: {"utf8"=>"?? ?", "authenticity_token"=>"emnpdvv9kk1sz/kcl9x21w+6mfepm8/d+qfelqvmxxm=", "pin"= >{"image"=>#<actiondispatch::http::uploadedfile:0x007fbb4badc498 @tempfile=#<tem pfile:/tmp/rackmultipart20140602-2-3jyqo2>, @original_filename="gdt05_camera len s3.png", @content_type="image/png", @headers="content-disposition: form-data; na me=\"pin[image]\"; filename=\"gdt05_camera lens3.png\"\r\ncontent-type: image/pn g\r\n">, "description"=>"asdadasdasda"}, "commit"=>"create pin"} ←[36m2014-06-02t06:21:33.869769+00:00 app[web.1]:←[0m command :: identify -forma t '%wx%h,%[exif:orientation]' '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-z zqfd6.png[0]' 2>/dev/null ←[36m2014-06-02t06:21:34.091066+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' ←[36m2014-06-02t06:21:34.194753+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' ←[36m2014-06-02t06:21:34.387242+00:00 app[web.1]:←[0m command :: convert '/tmp/f 85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' -auto-orient -resize "3 00x300>" '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd620140602-2-w9apg o' ←[36m2014-06-02t06:21:34.936114+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' ←[36m2014-06-02t06:21:34.714299+00:00 app[web.1]:←[0m command :: file -b --mime '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd620140602-2-w9apgo' ←[36m2014-06-02t06:21:34.798542+00:00 app[web.1]:←[0m command :: identify -forma t '%wx%h,%[exif:orientation]' '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-z zqfd6.png[0]' 2>/dev/null ←[36m2014-06-02t06:21:35.007664+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' ←[36m2014-06-02t06:21:35.083964+00:00 app[web.1]:←[0m command :: identify -forma t %m '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' ←[36m2014-06-02t06:21:35.155921+00:00 app[web.1]:←[0m command :: convert '/tmp/f 85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd6.png[0]' -auto-orient -resize "1 00x100>" '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd620140602-2-tcs6x q' ←[36m2014-06-02t06:21:35.336235+00:00 app[web.1]:←[0m command :: file -b --mime '/tmp/f85a2368337734c012dda7e3c61bfb8920140602-2-zzqfd620140602-2-tcs6xq' ←[36m2014-06-02t06:21:35.400880+00:00 app[web.1]:←[0m completed 500 internal ser ver error in 1574ms ←[33m2014-06-02t06:21:35.408004+00:00 heroku[router]:←[0m at=info method=post pa th=/pins host=arcane-shelf-3404.herokuapp.com request_id=806524e8-55f9-4415-b36c -ff49090c6bda fwd="190.114.248.109" dyno=web.1 connect=1ms service=1986ms status =500 bytes=1754 ←[36m2014-06-02t06:21:35.406124+00:00 app[web.1]:←[0m argumenterror (missing req uired :bucket option): ←[36m2014-06-02t06:21:35.406127+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:21:35.406118+00:00 app[web.1]:←[0m ←[36m2014-06-02t06:21:35.397496+00:00 app[web.1]:←[0m [paperclip] saving /pins/i mages/000/000/005/original/gdt05_camera_lens3.png ←[36m2014-06-02t06:21:35.406126+00:00 app[web.1]:←[0m   app/controllers/pins_con troller.rb:22:in `create' ←[36m2014-06-02t06:21:35.406128+00:00 app[web.1]:←[0m 

argumenterror (missing required :bucket option):

that's error, , it's defined paperclip problem.

the issue you're trying use s3 connectivity in paperclip, have not defined bucket option (which required)


fix

there 2 ways fix problem:

1) model

as defined in paperclip docs, can set bucket option in model:

#app/models/your_model.rb has_attached_file :image,         :styles => { :medium => "x300", :thumb => "x100" },         :storage => :s3,         :bucket => '******',         :s3_credentials => s3_credentials 

2) config

a far more robust way use config files of system fix it. way use production.rb file define bucket once:

#config/environments/production.rb .... paperclip::attachment.default_options.merge!({     storage: :s3,     s3_credentials: {       access_key_id: env['aws_access_key_id'],       secret_access_key: env['aws_secret_access_key']     },     bucket: env['s3_bucket_name'] }) 

as may able tell; both of these our current codebase, should work. issue may have config script might need tweaking. if comment, i'll help


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -