我有一个很好的小型rails角度应用程序,在本地运行良好,但现在我正在尝试部署到heroku,我遇到了一些问题。也就是说,当我尝试发出POST请求(通过ajax)时,我回来并将内部服务器错误作为响应({“status”:“500”,“error”:“Internal Server Error”})。这真的让我发疯,似乎它阻止了我想要进入我的数据库的信息,我已经尝试过对其他一些SO线程的建议,似乎没有任何工作。令人困惑,因为它在本地主机上完美运行。活动的heroku日志在这里:
2014-09-23T04:30:37.497826+00:00 app[web.1]: => Booting WEBrick
2014-09-23T04:30:37.497831+00:00 app[web.1]: => Rails 4.1.4 application starting in production on http://0.0.0.0:9878
2014-09-23T04:30:37.497833+00:00 app[web.1]: => Run `rails server -h` for more startup options
2014-09-23T04:30:37.497835+00:00 app[web.1]: => Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
2014-09-23T04:30:37.497836+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-09-23T04:30:37.497838+00:00 app[web.1]: I, [2014-09-23T04:27:51.885672 #2] INFO -- : Started GET "/" for 184.73.44.87 at 2014-09-23 04:27:51 +0000
2014-09-23T04:30:37.497840+00:00 app[web.1]: I, [2014-09-23T04:27:51.988811 #2] INFO -- : Processing by PagesController#index as */*
2014-09-23T04:30:37.497841+00:00 app[web.1]: I, [2014-09-23T04:27:52.039041 #2] INFO -- : Redirected to http://hidden-lowlands-5596.herokuapp.com/users/sign_in
2014-09-23T04:30:37.497843+00:00 app[web.1]: I, [2014-09-23T04:27:52.039888 #2] INFO -- : Completed 302 Found in 51ms (ActiveRecord: 0.0ms)
2014-09-23T04:30:37.497845+00:00 app[web.1]: I, [2014-09-23T04:27:52.072805 #2] INFO -- : Started GET "/users/sign_in" for 184.73.44.87 at 2014-09-23 04:27:52 +0000
2014-09-23T04:30:37.497846+00:00 app[web.1]: I, [2014-09-23T04:27:52.077594 #2] INFO -- : Processing by Devise::SessionsController#new as */*
2014-09-23T04:30:37.497848+00:00 app[web.1]: I, [2014-09-23T04:27:52.128662 #2] INFO -- : Rendered devise/sessions/new.html.erb within layouts/application (14.9ms)
2014-09-23T04:30:37.497849+00:00 app[web.1]: I, [2014-09-23T04:27:52.180470 #2] INFO -- : Completed 200 OK in 103ms (Views: 70.2ms | ActiveRecord: 13.0ms)
2014-09-23T04:30:37.497851+00:00 app[web.1]: I, [2014-09-23T04:29:23.691686 #2] INFO -- : Started GET "/" for 24.6.253.209 at 2014-09-23 04:29:23 +0000
2014-09-23T04:30:37.497852+00:00 app[web.1]: I, [2014-09-23T04:29:23.695622 #2] INFO -- : Processing by PagesController#index as HTML
2014-09-23T04:30:37.497854+00:00 app[web.1]: D, [2014-09-23T04:29:23.701573 #2] DEBUG -- : User Load (2.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497855+00:00 app[web.1]: I, [2014-09-23T04:29:23.706305 #2] INFO -- : Rendered pages/index.html within layouts/application (1.3ms)
2014-09-23T04:30:37.497857+00:00 app[web.1]: I, [2014-09-23T04:29:23.707351 #2] INFO -- : Completed 200 OK in 12ms (Views: 5.0ms | ActiveRecord: 2.4ms)
2014-09-23T04:30:37.497858+00:00 app[web.1]: I, [2014-09-23T04:29:25.125810 #2] INFO -- : Started GET "/articles" for 24.6.253.209 at 2014-09-23 04:29:25 +0000
2014-09-23T04:30:37.497860+00:00 app[web.1]: I, [2014-09-23T04:29:25.130961 #2] INFO -- : Processing by ArticlesController#index as JSON
2014-09-23T04:30:37.497863+00:00 app[web.1]: D, [2014-09-23T04:29:25.133835 #2] DEBUG -- : User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497864+00:00 app[web.1]: D, [2014-09-23T04:29:25.159063 #2] DEBUG -- : Feed Load (1.8ms) SELECT "feeds".* FROM "feeds" INNER JOIN "subscriptions" ON "feeds"."id" = "subscriptions"."feed_id" WHERE "subscriptions"."user_id" = $1 [["user_id", 1]]
2014-09-23T04:30:37.523076+00:00 heroku[router]: at=info method=GET path="/feeds" host=hidden-lowlands-5596.herokuapp.com request_id=f4e81159-eb5a-4115-9f35-3f666527d781 fwd="24.6.253.209" dyno=web.1 connect=1ms service=35ms status=304 bytes=1028
2014-09-23T04:30:37.497865+00:00 app[web.1]: D, [2014-09-23T04:29:25.179293 #2] DEBUG -- : Article Load (1.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 10]]
2014-09-23T04:30:37.497867+00:00 app[web.1]: D, [2014-09-23T04:29:25.184538 #2] DEBUG -- : Article Load (4.7ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 11]]
2014-09-23T04:30:37.497869+00:00 app[web.1]: D, [2014-09-23T04:29:25.186052 #2] DEBUG -- : Article Load (1.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 12]]
2014-09-23T04:30:37.497878+00:00 app[web.1]: D, [2014-09-23T04:29:25.187533 #2] DEBUG -- : Article Load (1.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 13]]
2014-09-23T04:30:37.497879+00:00 app[web.1]: D, [2014-09-23T04:29:25.188925 #2] DEBUG -- : Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 14]]
2014-09-23T04:30:37.497881+00:00 app[web.1]: D, [2014-09-23T04:29:25.190294 #2] DEBUG -- : Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 15]]
2014-09-23T04:30:37.497882+00:00 app[web.1]: D, [2014-09-23T04:29:25.192010 #2] DEBUG -- : Article Load (1.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 16]]
2014-09-23T04:30:37.497884+00:00 app[web.1]: D, [2014-09-23T04:29:25.193307 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 17]]
2014-09-23T04:30:37.497885+00:00 app[web.1]: D, [2014-09-23T04:29:25.194673 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 18]]
2014-09-23T04:30:37.497891+00:00 app[web.1]: D, [2014-09-23T04:29:25.196031 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 19]]
2014-09-23T04:30:37.497892+00:00 app[web.1]: D, [2014-09-23T04:29:25.199035 #2] DEBUG -- : Article Load (2.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 20]]
2014-09-23T04:30:37.497894+00:00 app[web.1]: I, [2014-09-23T04:29:25.199882 #2] INFO -- : Completed 200 OK in 69ms (Views: 0.3ms | ActiveRecord: 28.5ms)
2014-09-23T04:30:37.497895+00:00 app[web.1]: I, [2014-09-23T04:30:09.983278 #2] INFO -- : Started GET "/" for 24.6.253.209 at 2014-09-23 04:30:09 +0000
2014-09-23T04:30:37.497897+00:00 app[web.1]: I, [2014-09-23T04:30:09.987649 #2] INFO -- : Processing by PagesController#index as HTML
2014-09-23T04:30:37.497898+00:00 app[web.1]: D, [2014-09-23T04:30:09.990690 #2] DEBUG -- : User Load (1.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497900+00:00 app[web.1]: I, [2014-09-23T04:30:09.993971 #2] INFO -- : Rendered pages/index.html within layouts/application (0.5ms)
2014-09-23T04:30:37.497901+00:00 app[web.1]: I, [2014-09-23T04:30:09.994855 #2] INFO -- : Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 1.3ms)
2014-09-23T04:30:37.497902+00:00 app[web.1]: I, [2014-09-23T04:30:10.918573 #2] INFO -- : Started GET "/articles" for 24.6.253.209 at 2014-09-23 04:30:10 +0000
2014-09-23T04:30:37.497904+00:00 app[web.1]: I, [2014-09-23T04:30:10.922422 #2] INFO -- : Processing by ArticlesController#index as JSON
2014-09-23T04:30:37.497905+00:00 app[web.1]: D, [2014-09-23T04:30:10.925552 #2] DEBUG -- : User Load (1.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:37.497907+00:00 app[web.1]: D, [2014-09-23T04:30:10.929624 #2] DEBUG -- : Feed Load (1.5ms) SELECT "feeds".* FROM "feeds" INNER JOIN "subscriptions" ON "feeds"."id" = "subscriptions"."feed_id" WHERE "subscriptions"."user_id" = $1 [["user_id", 1]]
2014-09-23T04:30:37.497909+00:00 app[web.1]: D, [2014-09-23T04:30:10.936177 #2] DEBUG -- : Article Load (1.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 10]]
2014-09-23T04:30:37.497910+00:00 app[web.1]: D, [2014-09-23T04:30:10.937606 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 11]]
2014-09-23T04:30:37.497912+00:00 app[web.1]: D, [2014-09-23T04:30:10.939658 #2] DEBUG -- : Article Load (1.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 12]]
2014-09-23T04:30:37.497913+00:00 app[web.1]: D, [2014-09-23T04:30:10.941542 #2] DEBUG -- : Article Load (1.5ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 13]]
2014-09-23T04:30:37.497932+00:00 app[web.1]: D, [2014-09-23T04:30:10.943625 #2] DEBUG -- : Article Load (1.6ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 14]]
2014-09-23T04:30:37.497933+00:00 app[web.1]: D, [2014-09-23T04:30:10.944958 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 15]]
2014-09-23T04:30:37.497935+00:00 app[web.1]: D, [2014-09-23T04:30:10.946202 #2] DEBUG -- : Article Load (0.8ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 16]]
2014-09-23T04:30:37.497936+00:00 app[web.1]: D, [2014-09-23T04:30:10.947584 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 17]]
2014-09-23T04:30:37.497938+00:00 app[web.1]: D, [2014-09-23T04:30:10.949194 #2] DEBUG -- : Article Load (1.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 18]]
2014-09-23T04:30:37.497940+00:00 app[web.1]: D, [2014-09-23T04:30:10.950493 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 19]]
2014-09-23T04:30:37.497941+00:00 app[web.1]: D, [2014-09-23T04:30:10.951773 #2] DEBUG -- : Article Load (0.9ms) SELECT "articles".* FROM "articles" WHERE "articles"."feed_id" = $1 [["feed_id", 20]]
2014-09-23T04:30:37.497943+00:00 app[web.1]: I, [2014-09-23T04:30:10.952334 #2] INFO -- : Completed 200 OK in 30ms (Views: 0.2ms | ActiveRecord: 15.1ms)
2014-09-23T04:30:37.497944+00:00 app[web.1]: I, [2014-09-23T04:30:31.985603 #2] INFO -- : Started POST "/feeds/search" for 24.6.253.209 at 2014-09-23 04:30:31 +0000
2014-09-23T04:30:37.497946+00:00 app[web.1]: I, [2014-09-23T04:30:31.993881 #2] INFO -- : Processing by FeedsController#search as JSON
2014-09-23T04:30:37.497947+00:00 app[web.1]: I, [2014-09-23T04:30:31.993977 #2] INFO -- : Parameters: {"url"=>"q", "feed"=>{"url"=>"q"}}
2014-09-23T04:30:37.497952+00:00 app[web.1]: I, [2014-09-23T04:30:32.186407 #2] INFO -- : Completed 200 OK in 192ms (Views: 0.5ms | ActiveRecord: 0.0ms)
2014-09-23T04:30:37.497954+00:00 app[web.1]: I, [2014-09-23T04:30:37.487812 #2] INFO -- : Started GET "/feeds" for 24.6.253.209 at 2014-09-23 04:30:37 +0000
2014-09-23T04:30:37.497955+00:00 app[web.1]: I, [2014-09-23T04:30:37.497710 #2] INFO -- : Processing by FeedsController#index as JSON
2014-09-23T04:30:38.601702+00:00 app[web.1]: D, [2014-09-23T04:30:37.508654 #2] DEBUG -- : User Load (1.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:38.601707+00:00 app[web.1]: D, [2014-09-23T04:30:37.512314 #2] DEBUG -- : Feed Load (1.5ms) SELECT "feeds".* FROM "feeds" INNER JOIN "subscriptions" ON "feeds"."id" = "subscriptions"."feed_id" WHERE "subscriptions"."user_id" = $1 [["user_id", 1]]
2014-09-23T04:30:38.601709+00:00 app[web.1]: I, [2014-09-23T04:30:37.517631 #2] INFO -- : Completed 200 OK in 20ms (Views: 6.1ms | ActiveRecord: 2.9ms)
2014-09-23T04:30:38.601711+00:00 app[web.1]: I, [2014-09-23T04:30:37.779048 #2] INFO -- : Started POST "/feeds/create" for 24.6.253.209 at 2014-09-23 04:30:37 +0000
2014-09-23T04:30:38.601713+00:00 app[web.1]: I, [2014-09-23T04:30:37.802768 #2] INFO -- : Processing by FeedsController#create as JSON
2014-09-23T04:30:38.601715+00:00 app[web.1]: I, [2014-09-23T04:30:37.802879 #2] INFO -- : Parameters: {"url"=>"feed/http://www.questionablecontent.net/QCRSS.xml", "feed"=>{"url"=>"feed/http://www.questionablecontent.net/QCRSS.xml"}}
2014-09-23T04:30:38.601717+00:00 app[web.1]: D, [2014-09-23T04:30:37.977191 #2] DEBUG -- : Feed Load (8.1ms) SELECT "feeds".* FROM "feeds" WHERE "feeds"."feedly_feed_id" IS NULL LIMIT 1
2014-09-23T04:30:38.601719+00:00 app[web.1]: D, [2014-09-23T04:30:37.981727 #2] DEBUG -- : (2.8ms) BEGIN
2014-09-23T04:30:38.601721+00:00 app[web.1]: D, [2014-09-23T04:30:37.994355 #2] DEBUG -- : Feed Exists (9.1ms) SELECT 1 AS one FROM "feeds" WHERE "feeds"."feedly_feed_id" = 'feed/http://www.questionablecontent.net/QCRSS.xml' LIMIT 1
2014-09-23T04:30:38.601723+00:00 app[web.1]: D, [2014-09-23T04:30:38.006709 #2] DEBUG -- : SQL (1.7ms) INSERT INTO "feeds" ("created_at", "description", "feedly_feed_id", "name", "num_subscribers", "topics", "updated_at", "url") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id" [["created_at", "2014-09-23 04:30:37.994655"], ["description", "Deathmøle Jacques' head takes up the bottom half of the panel, with his words taking up the top half. He is not concerned about the life of his friend."], ["feedly_feed_id", "feed/http://www.questionablecontent.net/QCRSS.xml"], ["name", "QC RSS"], ["num_subscribers", 50874], ["topics", "comics,webcomics,web comics,fun,humor"], ["updated_at", "2014-09-23 04:30:37.994655"], ["url", "http://www.questionablecontent.net"]]
2014-09-23T04:30:38.601741+00:00 app[web.1]: D, [2014-09-23T04:30:38.011917 #2] DEBUG -- : (4.7ms) COMMIT
2014-09-23T04:30:38.601743+00:00 app[web.1]: D, [2014-09-23T04:30:38.016273 #2] DEBUG -- : User Load (3.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
2014-09-23T04:30:38.601744+00:00 app[web.1]: D, [2014-09-23T04:30:38.019696 #2] DEBUG -- : (1.9ms) BEGIN
2014-09-23T04:30:38.601746+00:00 app[web.1]: D, [2014-09-23T04:30:38.083515 #2] DEBUG -- : SQL (2.8ms) INSERT INTO "subscriptions" ("created_at", "feed_id", "updated_at", "user_id") VALUES ($1, $2, $3, $4) RETURNING "id" [["created_at", "2014-09-23 04:30:38.049168"], ["feed_id", 21], ["updated_at", "2014-09-23 04:30:38.049168"], ["user_id", 1]]
2014-09-23T04:30:38.601747+00:00 app[web.1]: D, [2014-09-23T04:30:38.093502 #2] DEBUG -- : (7.6ms) COMMIT
2014-09-23T04:30:38.601749+00:00 app[web.1]: D, [2014-09-23T04:30:38.396551 #2] DEBUG -- : Feed Load (9.5ms) SELECT "feeds".* FROM "feeds" WHERE "feeds"."feedly_feed_id" = 'feed/http://www.questionablecontent.net/QCRSS.xml' LIMIT 1
2014-09-23T04:30:38.601751+00:00 app[web.1]: #<Article id: nil, feed_id: nil, canonical_url: nil, site_url: nil, visual_url: nil, visual_height: nil, visual_width: nil, author: nil, title: nil, keywords: nil, summary: nil, feedly_id: nil, published: nil, fb_share_count: nil, fb_like_count: nil, fb_comment_count: nil, twitter_count: nil, reddit_score: nil, reddit_comment_count: nil, created_at: nil, updated_at: nil, calculated_rank: nil>
2014-09-23T04:30:38.773050+00:00 heroku[router]: at=info method=POST path="/feeds/create" host=hidden-lowlands-5596.herokuapp.com request_id=9c3683ee-dabc-4e34-bfb0-c309dc547596 fwd="24.6.253.209" dyno=web.1 connect=289ms service=1018ms status=500 bytes=330
我真的很难过这个,任何帮助都会非常感激。谢谢:))