Todd S.
2006-Aug-12 06:16 UTC
[Rails] form problem on deployment. Not sure how to debug this.
I wish I could be more clean in the subject but I honestly don''t know
what to point at for the problem.
I am trying to deploy a rails app to my external host (dreamhost).
It works great in development on my machine but when It gets into
production on dreamhost Data seems to be missing when I try and submit
the form.
Here''s what it looks like when it works...
Processing StatsController#new (for 127.0.0.1 at 2006-08-11 22:25:25)
[POST]
Session ID: e5a8904dd66379df002779de8a2afcd8
Parameters: {"commit"=>"Save",
"date"=>{"month"=>"8",
"day"=>"11",
"year"=>"2006"}, "action"=>"new",
"controller"=>"stats",
"stat"=>{"height_in"=>"",
"weight_lbs"=>"", "weight_oz"=>"",
"height_ft"=>""}}
User Load (0.022084) SELECT * FROM users WHERE (users.id = 1) LIMIT
1
Biostat Load (0.000808) SELECT * FROM biostats WHERE (date =
''2006-8-11'') LIMIT 1
Biostat Load (0.000980) SELECT * FROM biostats WHERE (date =
''2006-8-11'') LIMIT 1
Biostat Columns (0.000503) SHOW FIELDS FROM biostats
SQL (0.002079) BEGIN
Biostat Update (0.024918) UPDATE biostats SET `date` =
''2006-08-11'',
`height` = 0.0, `weight` = 0.0 WHERE id = 8
SQL (0.049138) COMMIT
Biostat Load (0.001343) SELECT * FROM biostats ORDER BY date
SQL (0.000597) SELECT count(*) AS count_all FROM biostats
Biostat Load (0.000851) SELECT * FROM biostats ORDER BY date LIMIT 1
Photo Columns (0.024376) SHOW FIELDS FROM photos
SQL (0.000631) SELECT count(*) AS count_all FROM photos
Photo Load (0.001020) SELECT * FROM photos ORDER BY RAND() LIMIT 1
Rendered stats/_statRow (0.00547)
Rendered stats/_statRow (0.00321)
Completed in 0.24754 (4 reqs/sec) | DB: 0.12933 (52%) | 200 OK
[http://localhost/stats/new]
_______
but on dreamhost I get this...
Processing StatsController#index (for xx.xx.xx.xxx at 2006-08-11
22:52:17) [GET]
Session ID: 5bb650876cc6ebfd8fbe1605f8fee520
Parameters: {"action"=>"index",
"controller"=>"stats"}
Rendering layoutfalseactionlist within layouts/application
Rendering stats/list
Completed in 0.02947 (33 reqs/sec) | Rendering: 0.01738 (58%) | DB:
0.00941 (31%) | 200 OK
____
Where do I even start to look for the problem?
--
Posted via http://www.ruby-forum.com/.
Surendra Singhi
2006-Aug-12 07:35 UTC
[Rails] Re: form problem on deployment. Not sure how to debug this.
"Todd S." <tgate@mypublic.net> writes:> I wish I could be more clean in the subject but I honestly don''t know > what to point at for the problem. > > I am trying to deploy a rails app to my external host (dreamhost). > > It works great in development on my machine but when It gets into > production on dreamhost Data seems to be missing when I try and submit > the form. > > Here''s what it looks like when it works... > > Processing StatsController#new (for 127.0.0.1 at 2006-08-11 22:25:25) > [POST] > Session ID: e5a8904dd66379df002779de8a2afcd8 > Parameters: {"commit"=>"Save", "date"=>{"month"=>"8", "day"=>"11", > "year"=>"2006"}, "action"=>"new", "controller"=>"stats", > "stat"=>{"height_in"=>"", "weight_lbs"=>"", "weight_oz"=>"", > "height_ft"=>""}} > User Load (0.022084) SELECT * FROM users WHERE (users.id = 1) LIMIT > 1 > Biostat Load (0.000808) SELECT * FROM biostats WHERE (date = > ''2006-8-11'') LIMIT 1 > Biostat Load (0.000980) SELECT * FROM biostats WHERE (date = > ''2006-8-11'') LIMIT 1 > Biostat Columns (0.000503) SHOW FIELDS FROM biostats > SQL (0.002079) BEGIN > Biostat Update (0.024918) UPDATE biostats SET `date` = ''2006-08-11'', > `height` = 0.0, `weight` = 0.0 WHERE id = 8 > SQL (0.049138) COMMIT > Biostat Load (0.001343) SELECT * FROM biostats ORDER BY date > SQL (0.000597) SELECT count(*) AS count_all FROM biostats > Biostat Load (0.000851) SELECT * FROM biostats ORDER BY date LIMIT 1 > Photo Columns (0.024376) SHOW FIELDS FROM photos > SQL (0.000631) SELECT count(*) AS count_all FROM photos > Photo Load (0.001020) SELECT * FROM photos ORDER BY RAND() LIMIT 1 > Rendered stats/_statRow (0.00547) > Rendered stats/_statRow (0.00321) > Completed in 0.24754 (4 reqs/sec) | DB: 0.12933 (52%) | 200 OK > [http://localhost/stats/new] > > _______ > but on dreamhost I get this... > > Processing StatsController#index (for xx.xx.xx.xxx at 2006-08-11 > 22:52:17) [GET] > Session ID: 5bb650876cc6ebfd8fbe1605f8fee520 > Parameters: {"action"=>"index", "controller"=>"stats"} > Rendering layoutfalseactionlist within layouts/application > Rendering stats/list > Completed in 0.02947 (33 reqs/sec) | Rendering: 0.01738 (58%) | DB: > 0.00941 (31%) | 200 OK >The two actions are different, on production it is index and in development it is new. -- Surendra Singhi http://ssinghi.kreeti.com, http://www.kreeti.com Read my blog at: http://cuttingtheredtape.blogspot.com/ ,---- | "War is Peace! Freedom is Slavery! Ignorance is Strength!" | -- Orwell, 1984, 1948 `----
Todd S.
2006-Aug-12 15:22 UTC
[Rails] Re: form problem on deployment. Not sure how to debug this.
I''ve boiled this down to at least the fact that, on dreamhost, the params are not being set/submitted through the form_remote_tag block. Any ideas why? -- Posted via http://www.ruby-forum.com/.
Al Evans
2006-Aug-12 15:45 UTC
[Rails] Re: form problem on deployment. Not sure how to debug this.
Todd S. wrote:> > Processing StatsController#new (for 127.0.0.1 at 2006-08-11 22:25:25) > [POST] > > _______ > but on dreamhost I get this... > > Processing StatsController#index (for xx.xx.xx.xxx at 2006-08-11 > 22:52:17) [GET]It looks to me like the first thing you need to find out is why you are getting routed to "index" instead of "new". You might try setting your app to production environment on your local machine, and see if the same thing happens. (There should be a line at the top of environment.rb that you can uncomment to force production environment.) --Al Evans -- Posted via http://www.ruby-forum.com/.