Problème d'upload en production

Salut,

J’ai une action qui permet d’uploader une image afin de la stocker
dans un modèle, ça marche parfaitement en environnement de
développement par contre une fois passé en production ça ne fonctionne
plus quelqu’un a une idée ?

2008/8/7 adiates [email protected]:

Salut,

J’ai une action qui permet d’uploader une image afin de la stocker
dans un modèle, ça marche parfaitement en environnement de
développement par contre une fois passé en production ça ne fonctionne
plus quelqu’un a une idée ?

c’est un peu vague tout ca.

  • Sur la même machine ?
  • que dise les logs ?


Cyril M.
http://blog.shingara.fr

bonjour,

tu peux voir
ICIhttp://groups.google.co.ma/group/railsfrance/browse_thread/thread/f70b7b27bf55d4cf?hl=fr#

Le 07/08/08, adiates [email protected] a écrit :

Oui désolé pour le manque d’informations :

  • Oui c’est sur la même machine c’est juste lancé en environnement
    production.
  • Au niveau des logs :

En environnement de dev (lorsque que ça marche) :

Processing ProduitController#enregistrer_ajout_illustration (for
192.168.1.20 at 2008-08-07 03:41:44) [POST]
Session ID: a757a413463bbd6369cfc619c735c507
Parameters: {“photo”=>{“photo”=>#StringIO:0xb67ca248},
“commit”=>“ajouter”, “action”=>“enregistrer_ajout_illustration”,
“controller”=>“produit”, “produit”=>“7”}
SQL (0.000540) BEGIN
Produit Columns (0.002998) SHOW FIELDS FROM produits
Produit Load (0.001590) SELECT * FROM produits WHERE
(produits.id = 7)
Photo Columns (0.010139) SHOW FIELDS FROM photos
SQL (0.000956) INSERT INTO photos (content_type, name,
master, illustrable_type, thumb, illustrable_id,
description, data) VALUES(‘image/jpeg’, ‘Sanstitre.jpg’, 0, NULL,
x’ffd8ffe000104a46494600010101006000600000ffdb004300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242e2720222c231c1c2837292c30313434341f27393d38323c2e333432ffc0000b080002000201011100ffc40014000100000000000000000000000000000007ffc40014100100000000000000000000000000000000ffda0008010100003f007f7fffd9’,
NULL, NULL,
x’ffd8ffe000104a46494600010101006000600000ffdb004300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242e2720222c231c1c2837292c30313434341f27393d38323c2e333432ffc0000b080002000201011100ffc40014000100000000000000000000000000000007ffc40014100100000000000000000000000000000000ffda0008010100003f007f7fffd9’)
Photo Load (0.002444) SELECT * FROM photos WHERE
(photos.illustrable_id = 7 AND photos.illustrable_type = ‘Produit’)
Photo Update (0.024007) UPDATE photos SET master = 0, data =
x’ffd8ffe000104a46494600010101006000600000ffdb004300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242e2720222c231c1c2837292c30313434341f27393d38323c2e333432ffc0000b080002000201011100ffc40014000100000000000000000000000000000007ffc40014100100000000000000000000000000000000ffda0008010100003f007f7fffd9’,
content_type = ‘image/jpeg’, description = NULL, illustrable_id
= 7, thumb =
x’ffd8ffe000104a46494600010101006000600000ffdb004300080606070605080707070909080a0c140d0c0b0b0c1912130f141d1a1f1e1d1a1c1c20242e2720222c231c1c2837292c30313434341f27393d38323c2e333432ffc0000b080002000201011100ffc40014000100000000000000000000000000000007ffc40014100100000000000000000000000000000000ffda0008010100003f007f7fffd9’,
illustrable_type = ‘Produit’, name = ‘Sanstitre.jpg’ WHERE id =
17
Redirected to http://192.168.1.22:3000/produit/illustration/7
SQL (0.024882) COMMIT
Completed in 0.27398 (3 reqs/sec) | DB: 0.08457 (30%) | 302 Found
[http://192.168.1.22/produit/enregistrer_ajout_illustration]
User Columns (0.002136) SHOW FIELDS FROM users
Fournisseur Columns (0.002817) SHOW FIELDS FROM fournisseurs
Livre Columns (0.002916) SHOW FIELDS FROM produits

Processing ProduitController#illustration (for 192.168.1.20 at
2008-08-07 03:41:45) [GET]
Session ID: a757a413463bbd6369cfc619c735c507
Parameters: {“action”=>“illustration”, “id”=>“7”,
“controller”=>“produit”}
Produit Columns (0.010209) SHOW FIELDS FROM produits
Produit Load (0.001545) SELECT * FROM produits WHERE
(produits.id = 7)
Rendering layoutfalse within layouts/popup
Rendering produit/illustration
Photo Load (0.019734) SELECT * FROM photos WHERE
(photos.illustrable_id = 7 AND photos.illustrable_type = ‘Produit’)
Photo Columns (0.002773) SHOW FIELDS FROM photos
Completed in 0.10655 (9 reqs/sec) | Rendering: 0.06201 (58%) | DB:
0.04213 (39%) | 200 OK [http://192.168.1.22/produit/illustration/7]
User Columns (0.002350) SHOW FIELDS FROM users
Fournisseur Columns (0.002544) SHOW FIELDS FROM fournisseurs
Livre Columns (0.010100) SHOW FIELDS FROM produits

Processing ProduitController#montrer_image (for 192.168.1.20 at
2008-08-07 03:41:46) [GET]


En production :

“photo”=>{“photo”=>#StringIO:0xb70e6e1c}

Processing ProduitController#afficher_produit (for 192.168.1.20 at
2008-08-07 03:36:39) [GET]
Session ID: a757a413463bbd6369cfc619c735c507
Parameters: {“action”=>“afficher_produit”, “id”=>“1”,
“controller”=>“produit”}
Rendering within layouts/ela
Rendering produit/afficher_produit
Completed in 0.47878 (2 reqs/sec) | Rendering: 0.29286 (61%) | DB:
0.09224 (19%) | 200 OK [http://192.168.1.22/produit/afficher_produit/
1]

Processing ProduitController#illustration (for 192.168.1.20 at
2008-08-07 03:36:44) [GET]
Session ID: a757a413463bbd6369cfc619c735c507
Parameters: {“action”=>“illustration”, “id”=>“1”,
“controller”=>“produit”}
Rendering layoutfalse within layouts/popup
Rendering produit/illustration
Completed in 0.09590 (10 reqs/sec) | Rendering: 0.06302 (65%) | DB:
0.03813 (39%) | 200 OK [http://192.168.1.22/produit/illustration/1]
/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsL
DBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/
2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAACAAIDASIAAhEBAxEB/8QA
HwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUF
BAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1
dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXG
x8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEB
AQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAEC
AxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRom
JygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU
1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigD//
2Q==

Processing ProduitController#enregistrer_ajout_illustration (for
192.168.1.20 at 2008-08-07 03:36:53) [POST]
Session ID: a757a413463bbd6369cfc619c735c507
Parameters: {“photo”=>{“photo”=>#StringIO:0xb6799f30},
“commit”=>“ajouter”, “action”=>“enregistrer_ajout_illustration”,
“controller”=>“produit”, “produit”=>“1”}
Rendering within layouts/ela

ActionController::MissingTemplate (Missing template /home/eladmin/
hayah/app/views/produit/enregistrer_ajout_illustration.rhtml):
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
base.rb:1211:in assert_existence_of_template_file' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ base.rb:810:inrender_file’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
base.rb:717:in render_with_no_layout' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ layout.rb:247:inrender_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
benchmarking.rb:50:in render' /usr/lib/ruby/1.8/benchmark.rb:293:inmeasure’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
benchmarking.rb:50:in render' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ base.rb:1102:inperform_action_without_filters’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
filters.rb:696:in call_filters' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ filters.rb:688:inperform_action_without_benchmark’
/var/lib/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’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
benchmarking.rb:66:in perform_action_without_rescue' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ rescue.rb:83:inperform_action’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
base.rb:435:in send' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ base.rb:435:inprocess_without_filters’
/var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/
filters.rb:684:in process_without_session_management_support' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ session_management.rb:114:insass_old_process’
/var/lib/gems/1.8/gems/haml-1.8.2/lib/sass/plugin/rails.rb:19:in
process' /var/lib/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/ base.rb:334:inprocess’
/var/lib/gems/1.8/gems/rails-1.2.6/lib/dispatcher.rb:41:in
dispatch' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb: 76:inprocess’
/var/lib/gems/1.8/gems/mongrel-1.1.5/bin/…/lib/mongrel/rails.rb:
74:in synchronize' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb: 74:inprocess’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in
process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:ineach’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in
process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in
initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:innew’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:ininitialize’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:
282:in run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb: 281:ineach’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:
281:in run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:inrun’
/var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in
run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:488:inload’
/var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:488:in load' /var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:342:innew_constants_in’
/var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:488:in load' /var/lib/gems/1.8/gems/rails-1.2.6/lib/commands/servers/mongrel.rb: 60 /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in require' /var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:495:inrequire’
/var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/
dependencies.rb:342:in new_constants_in' /var/lib/gems/1.8/gems/activesupport-1.4.4/lib/active_support/ dependencies.rb:495:inrequire’
/var/lib/gems/1.8/gems/rails-1.2.6/lib/commands/server.rb:39
/usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

Merci,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs