hook38
hook38

Reputation: 3907

Ruby on rails Completed 500 Internal Server Error in xxms

I am new to Ror, and I need some help.

I am developing this RoR project. Everything was working. Then I changed a few pages, which involving adding and removing fields using migration. Changed many html.erb pages. Tested it locally, and it runs fine. But when I push it to the testing server, in one of the page, it keep saying Completed 500 Internal Server Error in xxms (and nothing else). Below is the complete stack trace:

Started GET "/participants" for 128.250.7.101 at 2013-08-09 15:46:00 +1000

Processing by ParticipantsController#index as HTML User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]

Participant Load (0.4ms) SELECT "participants".* FROM "participants" ORDER BY clinical_centre_id

Participant Load (0.2ms) SELECT "participants".* FROM "participants" WHERE "participants"."user_id" = 1

ClinicalCentre Load (0.2ms) SELECT "clinical_centres".* FROM "clinical_centres" WHERE "clinical_centres"."id" = 16 LIMIT 1

Mother Load (0.6ms) SELECT "mothers".* FROM "mothers" WHERE "mothers"."participant_id" = 1 LIMIT 1

Father Load (0.4ms) SELECT "fathers".* FROM "fathers" WHERE "fathers"."participant_id" = 1 LIMIT 1

Proband Load (0.5ms) SELECT "probands".* FROM "probands" WHERE "probands"."participant_id" = 1 LIMIT 1

T1 Load (1.1ms) SELECT "t1s".* FROM "t1s" WHERE "t1s"."participant_id" = 1 LIMIT 1

T2 Load (1.0ms) SELECT "t2s".* FROM "t2s" WHERE "t2s"."participant_id" = 1 LIMIT 1

T3 Load (1.4ms) SELECT "t3s".* FROM "t3s" WHERE "t3s"."participant_id" = 1 LIMIT 1

Rendered participants/index.html.erb within layouts/application (24.4ms)

Completed 500 Internal Server Error in 32ms

I know the database was loading fine, because in one of the other page which load data from the database, it was running with no error. I've compared the sqlite3 and the schema.rb files between the local and server, and they were the same.

One thing I noticed is that Rails.env.capitalize displayed "Test" locally, whereas on the server, it said "Development". apache2's error.log and access.log displayed nothing.

Need help, or ideas on how to find out more. Thank you.

Upvotes: 1

Views: 2665

Answers (1)

hook38
hook38

Reputation: 3907

Found it, instead of using

sudo service apache2 restart

I started my RoR server using

rails s -e test

And it showed an error during compile. Apparently I defined a collection in a model containing a degree(°) sign.

Upvotes: 1

Related Questions