After tons of first-timer headache, I finally got my website deployed online, yay! :)
I can view the website just fine, but I cannot create/edit or delete any records. My research tells me that it has something to do with javascript handling the create/update/destroy requests, but I cannot find a solution. Maybe its not even related to javascript.
The error message given says "We're sorry, but something went wrong." check the logs.
My production log says:
admin@The-Origin-of-Foods:/home/rails/log$ tail production.log
I, [2015-03-22T11:31:48.832680 #25012] INFO -- : Completed 200 OK in 13ms (Views: 9.7ms | ActiveRecord: 0.7ms)
I, [2015-03-22T11:31:49.647607 #25012] INFO -- : Started GET "/foods" for 127.0.0.1 at 2015-03-22 11:31:49 -0400
I, [2015-03-22T11:31:49.648373 #25012] INFO -- : Processing by FoodsController#index as HTML
D, [2015-03-22T11:31:49.649507 #25012] DEBUG -- : Food Load (0.3ms) SELECT "foods".* FROM "foods"
D, [2015-03-22T11:31:49.650502 #25012] DEBUG -- : Food Load (0.3ms) SELECT "foods".* FROM "foods" ORDER BY name ASC
D, [2015-03-22T11:31:49.651289 #25012] DEBUG -- : CACHE (0.0ms) SELECT "foods".* FROM "foods"
I, [2015-03-22T11:31:49.652546 #25012] INFO -- : Rendered foods/index.html.erb within layouts/application (2.5ms)
I, [2015-03-22T11:31:49.653475 #25012] INFO -- : Completed 200 OK in 5ms (Views: 3.4ms | ActiveRecord: 0.6ms)
D, [2015-03-24T00:08:13.314031 #28981] DEBUG -- : ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
D, [2015-03-24T00:11:21.832413 #28999] DEBUG -- : ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
Actually, in all honesty I don't even know if my server is running in production. The time in the logs don't seem to match my local time or the page requests I send (eg. delete). How do I check what environment I am in? (The problem persists even when I start a production server locally on my laptop)
I am using DigitalOcean VPS with Nginx, Unicorn, Rails 4.2 and Ruby 2.1.3