我有管理命名空間,並在其中我有付款#索引和視頻#創建。它在本地運行良好,但我在heroku上遇到500錯誤。命名空間路由本地工作不在heroku
在這裏或任何地方沒有其他問題似乎增加了它。控制器都在正確的位置:controllers/admin/payments_controller.rb。
去添加視頻頁面沒有問題,但是當我嘗試去付款索引是當我得到500錯誤。我不能爲我的生活弄清楚如何解決這個問題。
完整的代碼在github.com/spq24 myflix是存儲庫。
Heroku的日誌(只是錯誤)
←[0m
2014-05-09T08:34:08.556795+00:00 app[web.1]: Completed 200 OK in 476ms (ActiveRe
cord: 13.9ms)
2014-05-09T08:34:08.556797+00:00 app[web.1]: Started POST "/stripe_events" for 5
4.241.31.99 at 2014-05-09 08:26:58 +0000
2014-05-09T08:34:08.556799+00:00 app[web.1]: Processing by StripeEvent::WebhookC
ontroller#event as XML
2014-05-09T08:34:08.556801+00:00 app[web.1]: Parameters: {"id"=>"evt_409epYVIC
VnzTg", "created"=>1399624016, "livemode"=>false, "type"=>"invoice.payment_succe
eded", "data"=>{"object"=>{"date"=>1399620212, "id"=>"in_408dksm8QdJW0R", "perio
d_start"=>1399015266, "period_end"=>1399620066, "lines"=>{"object"=>"list", "tot
al_count"=>1, "has_more"=>false, "url"=>"/v1/invoices/in_408dksm8QdJW0R/lines",
"data"=>[{"id"=>"sub_3xW0lNCigSZQYJ", "object"=>"line_item", "type"=>"subscripti
on", "livemode"=>false, "amount"=>999, "currency"=>"usd", "proration"=>false, "p
eriod"=>{"start"=>1399620066, "end"=>1402298466}, "quantity"=>1, "plan"=>{"inter
val"=>"month", "name"=>"Base Plan", "created"=>1398924680, "amount"=>999, "curre
ncy"=>"usd", "id"=>"1", "object"=>"plan", "livemode"=>false, "interval_count"=>1
, "trial_period_days"=>7, "metadata"=>{}, "statement_description"=>"MyFlix Plan"
}, "description"=>nil, "metadata"=>nil}]}, "subtotal"=>999, "total"=>999, "custo
mer"=>"cus_3xW0C9v1stVYlw", "object"=>"invoice", "attempted"=>true, "closed"=>tr
ue, "paid"=>true, "livemode"=>false, "attempt_count"=>1, "amount_due"=>999, "cur
rency"=>"usd", "starting_balance"=>0, "ending_balance"=>0, "next_payment_attempt
"=>nil, "charge"=>"ch_409eD9Ikc4x5co", "discount"=>nil, "application_fee"=>nil,
"subscription"=>"sub_3xW0lNCigSZQYJ", "metadata"=>{}, "description"=>nil}}, "obj
ect"=>"event", "pending_webhooks"=>1, "request"=>nil, "webhook"=>{"id"=>"evt_409
epYVICVnzTg", "created"=>1399624016, "livemode"=>false, "type"=>"invoice.payment
_succeeded", "data"=>{"object"=>{"date"=>1399620212, "id"=>"in_408dksm8QdJW0R",
"period_start"=>1399015266, "period_end"=>1399620066, "lines"=>{"object"=>"list"
, "total_count"=>1, "has_more"=>false, "url"=>"/v1/invoices/in_408dksm8QdJW0R/li
nes", "data"=>[{"id"=>"sub_3xW0lNCigSZQYJ", "object"=>"line_item", "type"=>"subs
cription", "livemode"=>false, "amount"=>999, "currency"=>"usd", "proration"=>fal
se, "period"=>{"start"=>1399620066, "end"=>1402298466}, "quantity"=>1, "plan"=>{
"interval"=>"month", "name"=>"Base Plan", "created"=>1398924680, "amount"=>999,
"currency"=>"usd", "id"=>"1", "object"=>"plan", "livemode"=>false, "interval_cou
nt"=>1, "trial_period_days"=>7, "metadata"=>{}, "statement_description"=>"MyFlix
Plan"}, "description"=>nil, "metadata"=>nil}]}, "subtotal"=>999, "total"=>999,
"customer"=>"cus_3xW0C9v1stVYlw", "object"=>"invoice", "attempted"=>true, "close
d"=>true, "paid"=>true, "livemode"=>false, "attempt_count"=>1, "amount_due"=>999
, "currency"=>"usd", "starting_balance"=>0, "ending_balance"=>0, "next_payment_a
ttempt"=>nil, "charge"=>"ch_409eD9Ikc4x5co", "discount"=>nil, "application_fee"=
>nil, "subscription"=>"sub_3xW0lNCigSZQYJ", "metadata"=>{}, "description"=>nil}}
, "object"=>"event", "pending_webhooks"=>1, "request"=>nil}}
2014-05-09T08:34:08.556804+00:00 app[web.1]: Completed 200 OK in 436ms (ActiveRe
cord: 0.0ms)
2014-05-09T08:34:08.556806+00:00 app[web.1]: Started POST "/stripe_events" for 5
4.241.31.99 at 2014-05-09 08:26:59 +0000
2014-05-09T08:34:08.556808+00:00 app[web.1]: Processing by StripeEvent::WebhookC
ontroller#event as XML
2014-05-09T08:34:08.556855+00:00 app[web.1]: Parameters: {"id"=>"evt_409e67VjH
kKnJR", "created"=>1399624016, "livemode"=>false, "type"=>"invoice.updated", "da
ta"=>{"object"=>{"date"=>1399620212, "id"=>"in_408dksm8QdJW0R", "period_start"=>
1399015266, "period_end"=>1399620066, "lines"=>{"object"=>"list", "total_count"=
>1, "has_more"=>false, "url"=>"/v1/invoices/in_408dksm8QdJW0R/lines", "data"=>[{
"id"=>"sub_3xW0lNCigSZQYJ", "object"=>"line_item", "type"=>"subscription", "live
mode"=>false, "amount"=>999, "currency"=>"usd", "proration"=>false, "period"=>{"
start"=>1399620066, "end"=>1402298466}, "quantity"=>1, "plan"=>{"interval"=>"mon
th", "name"=>"Base Plan", "created"=>1398924680, "amount"=>999, "currency"=>"usd
", "id"=>"1", "object"=>"plan", "livemode"=>false, "interval_count"=>1, "trial_p
eriod_days"=>7, "metadata"=>{}, "statement_description"=>"MyFlix Plan"}, "descri
ption"=>nil, "metadata"=>nil}]}, "subtotal"=>999, "total"=>999, "customer"=>"cus
_3xW0C9v1stVYlw", "object"=>"invoice", "attempted"=>true, "closed"=>true, "paid"
=>true, "livemode"=>false, "attempt_count"=>1, "amount_due"=>999, "currency"=>"u
sd", "starting_balance"=>0, "ending_balance"=>0, "next_payment_attempt"=>nil, "c
harge"=>"ch_409eD9Ikc4x5co", "discount"=>nil, "application_fee"=>nil, "subscript
ion"=>"sub_3xW0lNCigSZQYJ", "metadata"=>{}, "description"=>nil}, "previous_attri
butes"=>{"attempted"=>false, "closed"=>false, "paid"=>false, "ending_balance"=>n
il, "nex
t_payment_attempt"=>1399623812, "charge"=>nil}}, "object"=>"event", "pending_web
hooks"=>1, "request"=>nil, "webhook"=>{"id"=>"evt_409e67VjHkKnJR", "created"=>13
99624016, "livemode"=>false, "type"=>"invoice.updated", "data"=>{"object"=>{"dat
e"=>1399620212, "id"=>"in_408dksm8QdJW0R", "period_start"=>1399015266, "period_e
nd"=>1399620066, "lines"=>{"object"=>"list", "total_count"=>1, "has_more"=>false
, "url"=>"/v1/invoices/in_408dksm8QdJW0R/lines", "data"=>[{"id"=>"sub_3xW0lNCigS
ZQYJ", "object"=>"line_item", "type"=>"subscription", "livemode"=>false, "amount
"=>999, "currency"=>"usd", "proration"=>false, "period"=>{"start"=>1399620066, "
end"=>1402298466}, "quantity"=>1, "plan"=>{"interval"=>"month", "name"=>"Base Pl
an", "created"=>1398924680, "amount"=>999, "currency"=>"usd", "id"=>"1", "object
"=>"plan", "livemode"=>false, "interval_count"=>1, "trial_period_days"=>7, "meta
data"=>{}, "statement_description"=>"MyFlix Plan"}, "description"=>nil, "metadat
a"=>nil}]}, "subtotal"=>999, "total"=>999, "customer"=>"cus_3xW0C9v1stVYlw", "ob
ject"=>"invoice", "attempted"=>true, "closed"=>true, "paid"=>true, "livemode"=>f
alse, "attempt_count"=>1, "amount_due"=>999, "currency"=>"usd", "starting_balanc
e"=>0, "ending_balance"=>0, "next_payment_attempt"=>nil, "charge"=>"ch_409eD9Ikc
4x5co", "discount"=>nil, "application_fee"=>nil, "subscription"=>"sub_3xW0lNCigS
ZQYJ", "metadata"=>{}, "description"=>nil}, "previous_attributes"=>{"attempted"=
>false, "closed"=>false, "paid"=>false, "ending_balance"=>nil, "next_payment_att
empt"=>1399623812, "charge"=>nil}}, "object"=>"event", "pending_webhooks"=>1, "r
equest"=>nil}}
2014-05-09T08:34:08.556857+00:00 app[web.1]: Completed 200 OK in 442ms (ActiveRe
cord: 0.0ms)
2014-05-09T08:34:08.556875+00:00 app[web.1]: Started POST "/stripe_events" for 5
4.241.31.102 at 2014-05-09 08:34:08 +0000
2014-05-09T08:34:08.556876+00:00 app[web.1]: Processing by StripeEvent::WebhookC
ontroller#event as XML
2014-05-09T08:34:08.556902+00:00 app[web.1]: Parameters: {"id"=>"evt_409l928VP
v5pvF", "created"=>1399624447, "livemode"=>false, "type"=>"charge.succeeded", "d
ata"=>{"object"=>{"id"=>"ch_409lArPxSa6imL", "object"=>"charge", "created"=>1399
624447, "livemode"=>false, "paid"=>true, "amount"=>999, "currency"=>"usd", "refu
nded"=>false, "card"=>{"id"=>"card_3xW5t3PXtT1FEL", "object"=>"card", "last4"=>"
4242", "type"=>"Visa", "exp_month"=>5, "exp_year"=>2015, "fingerprint"=>"Bl5eHYk
yHwt3wjza", "customer"=>"cus_3xW6LimZ0sAnEf", "country"=>"US", "name"=>nil, "add
ress_line1"=>nil, "address_line2"=>nil, "address_city"=>nil, "address_state"=>ni
l, "address_zip"=>nil, "address_country"=>nil, "cvc_check"=>nil, "address_line1_
check"=>nil, "address_zip_check"=>nil}, "captured"=>true, "refunds"=>nil, "balan
ce_transaction"=>"txn_409l783a195ezY", "failure_message"=>nil, "failure_code"=>n
il, "amount_refunded"=>0, "customer"=>"cus_3xW6LimZ0sAnEf", "invoice"=>"in_408kd
mUx2HuUuo", "description"=>nil, "dispute"=>nil, "metadata"=>{}, "statement_descr
iption"=>"MyFlix Plan"}}, "object"=>"event", "pending_webhooks"=>1, "request"=>n
il, "webhook"=>{"id"=>"evt_409l928VPv5pvF", "created"=>1399624447, "livemode"=>f
alse, "type"=>"charge.succeeded", "data"=>{"object"=>{"id"=>"ch_409lArPxSa6imL",
"object"=>"charge", "created"=>1399624447, "livemode"=>false, "paid"=>true, "am
ount"=>999, "currency"=>"usd", "refunded"=>false, "card"=>{"id"=>"card_3xW5t3PXt
T1FEL", "object"=>"card", "last4"=>"4242", "type"=>"Visa", "exp_month"=>5, "exp_
year"=>2015, "fingerprint"=>"Bl5eHYkyHwt3wjza", "customer"=>"cus_3xW6LimZ0sAnEf"
, "country"=>"US", "name"=>nil, "address_line1"=>nil, "address_line2"=>nil, "add
ress_city"=>nil, "address_state"=>nil, "address_zip"=>nil, "address_country"=>ni
l, "cvc_check"=>nil, "address_line1_check"=>nil, "address_zip_check"=>nil}, "cap
tured"=>true, "refunds"=>nil, "balance_transaction"=>"txn_409l783a195ezY", "fail
ure_message"=>nil, "failure_code"=>nil, "amount_refunded"=>0, "customer"=>"cus_3
xW6LimZ0sAnEf", "invoice"=>"in_408kdmUx2HuUuo", "description"=>nil, "dispute"=>n
il, "metadata"=>{}, "statement_description"=>"MyFlix Plan"}}, "object"=>"event",
"pending_webhooks"=>1, "request"=>nil}}
2014-05-09T08:34:09.206927+00:00 heroku[router]: at=info method=POST path=/strip
e_events host=sleepy-ocean-5198.herokuapp.com request_id=27c6f84d-6c26-424e-9566
-4391464a1b7f fwd="54.241.31.102" dyno=web.1 connect=2ms service=657ms status=20
0 bytes=463
2014-05-09T08:34:09.872208+00:00 heroku[router]: at=info method=POST path=/strip
e_events host=sleepy-ocean-5198.herokuapp.com request_id=8eae91af-da7c-48b0-9964
-958ae5bace02 fwd="54.241.31.99" dyno=web.1 connect=1ms service=475ms status=200
bytes=463
2014-05-09T08:34:10.454076+00:00 heroku[router]: at=info method=POST path=/strip
e_events host=sleepy-ocean-5198.herokuapp.com request_id=c7e95465-8bc2-4c3b-9d42
-d9085e7b670d fwd="54.241.31.99" dyno=web.1 connect=10ms service=472ms status=20
0 bytes=463
2014-05-09T09:37:35.217202+00:00 heroku[web.1]: Idling
2014-05-09T09:37:35.218502+00:00 heroku[web.1]: State changed from up to down
2014-05-09T09:37:38.551600+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/
1.9.1/webrick/server.rb:98:in `select'
2014-05-09T09:37:38.551592+00:00 app[web.1]: [2014-05-09 09:37:38] ERROR SignalE
xception: SIGTERM
2014-05-09T09:37:37.996695+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2014-05-09T09:37:47.824411+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At l
east one process failed to exit within 10 seconds of SIGTERM
2014-05-09T09:37:47.824609+00:00 heroku[web.1]: Stopping remaining processes wit
h SIGKILL
2014-05-09T09:37:49.579002+00:00 heroku[web.1]: Process exited with status 137
2014-05-09T14:15:18.556267+00:00 heroku[web.1]: Unidling
2014-05-09T14:15:18.556534+00:00 heroku[web.1]: State changed from down to start
ing
2014-05-09T14:15:23.366641+00:00 heroku[web.1]: Starting process with command `b
in/rails server -p 43514 -e staging`
2014-05-09T14:15:38.490267+00:00 app[web.1]: [2014-05-09 14:15:38] INFO WEBrick
1.3.1
2014-05-09T14:15:38.490297+00:00 app[web.1]: [2014-05-09 14:15:38] INFO ruby 1.
9.3 (2014-02-24) [x86_64-linux]
2014-05-09T14:15:38.490774+00:00 app[web.1]: [2014-05-09 14:15:38] INFO WEBrick
::HTTPServer#start: pid=2 port=43514
2014-05-09T14:15:38.572655+00:00 heroku[web.1]: State changed from starting to u
p
2014-05-09T14:15:42.675038+00:00 heroku[router]: at=info method=GET path=/admin/
payments host=sleepy-ocean-5198.herokuapp.com request_id=e8a5e62c-b0a4-4023-89c6
-2088e36594f6 fwd="71.225.177.146" dyno=web.1 connect=6ms service=1941ms status=
500 bytes=919
2014-05-09T15:20:59.748338+00:00 heroku[web.1]: State changed from up to down
2014-05-09T15:20:59.747790+00:00 heroku[web.1]: Idling
2014-05-09T15:21:04.606823+00:00 app[web.1]: [2014-05-09 15:21:04] ERROR SignalE
xception: SIGTERM
2014-05-09T15:21:04.606828+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/
1.9.1/webrick/server.rb:98:in `select'
2014-05-09T15:21:03.853141+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2014-05-09T15:21:12.726780+00:00 heroku[web.1]: Stopping remaining processes wit
h SIGKILL
2014-05-09T15:21:12.726482+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At l
east one process failed to exit within 10 seconds of SIGTERM
2014-05-09T15:21:14.703782+00:00 heroku[web.1]: Process exited with status 137
2014-05-10T02:14:23.695056+00:00 heroku[web.1]: Unidling
2014-05-10T02:14:23.695449+00:00 heroku[web.1]: State changed from down to start
ing
2014-05-10T02:14:28.574087+00:00 heroku[web.1]: Starting process with command `b
in/rails server -p 20557 -e staging`
2014-05-10T02:14:43.577951+00:00 app[web.1]: [2014-05-10 02:14:43] INFO WEBrick
1.3.1
2014-05-10T02:14:43.578049+00:00 app[web.1]: [2014-05-10 02:14:43] INFO ruby 1.
9.3 (2014-02-24) [x86_64-linux]
2014-05-10T02:14:43.578756+00:00 app[web.1]: [2014-05-10 02:14:43] INFO WEBrick
::HTTPServer#start: pid=2 port=20557
2014-05-10T02:14:44.150752+00:00 heroku[web.1]: State changed from starting to u
p
2014-05-10T02:14:46.540677+00:00 app[web.1]: => Booting WEBrick
2014-05-10T02:14:46.540685+00:00 app[web.1]: => Rails 4.0.0 application starting
in staging on http://0.0.0.0:20557
2014-05-10T02:14:46.540689+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-05-10T02:14:46.540687+00:00 app[web.1]: => Run `rails server -h` for more s
tartup options
2014-05-10T02:14:46.540690+00:00 app[web.1]: Started POST "/stripe_events" for 5
4.241.31.102 at 2014-05-10 02:14:46 +0000
2014-05-10T02:14:46.540692+00:00 app[web.1]: Processing by StripeEvent::WebhookC
ontroller#event as XML
2014-05-10T02:14:46.540805+00:00 app[web.1]: Parameters: {"id"=>"evt_40QsHmL02
HtiLN", "created"=>1399688062, "livemode"=>false, "type"=>"transfer.created", "d
ata"=>{"object"=>{"id"=>"tr_40QsjtwZOas45V", "object"=>"transfer", "created"=>13
99688062, "date"=>1399766400, "livemode"=>false, "amount"=>2820, "currency"=>"us
d", "status"=>"pending", "balance_transaction"=>"txn_40Qsyqfag5qhFL", "summary"=
>{"charge_gross"=>2997, "charge_fees"=>177, "charge_fee_details"=>[{"amount"=>17
7, "currency"=>"usd", "type"=>"stripe_fee", "description"=>nil, "application"=>n
il}], "refund_gross"=>0, "refund_fees"=>0, "refund_fee_details"=>nil, "adjustmen
t_gross"=>0, "adjustment_fees"=>0, "adjustment_fee_details"=>nil, "validation_fe
es"=>0, "validation_count"=>0, "charge_count"=>3, "refund_count"=>0, "adjustment
_count"=>0, "net"=>2820, "currency"=>"usd", "collected_fee_gross"=>0, "collected
_fee_count"=>0, "collected_fee_refund_gross"=>0, "collected_fee_refund_count"=>0
}, "transactions"=>{"object"=>"list", "total_count"=>3, "has_more"=>false, "url"
=>"/v1/transfers/tr_40QsjtwZOas45V/transactions", "data"=>[{"id"=>"ch_409lArPxSa
6imL", "type"=>"charge", "amount"=>999, "currency"=>"usd", "net"=>940, "created"
=>1399624447, "description"=>nil, "fee"=>59, "fee_details"=>[{"amount"=>59, "cur
rency"=>"usd", "type"=>"stripe_fee", "description"=>"Stripe processing fees", "a
pplication"=>nil}]}, {"id"=>"ch_409eD9Ikc4x5co", "type"=>"charge", "amount"=>999
, "currency"=>"usd", "net"=>940, "created"=>1399624015, "description"=>nil, "fee
"=>59, "fee_details"=>[{"amount"=>59, "currency"=>"usd", "type"=>"stripe_fee", "
description"=>"Stripe processing fees", "application"=>nil}]}, {"id"=>"ch_409TNK
WtEpKgJg", "type"=>"charge", "amount"=>999, "currency"=>"usd", "net"=>940, "crea
ted"=>1399623325, "description"=>nil, "fee"=>59, "fee_details"=>[{"amount"=>59,
"currency"=>"usd", "type"=>"stripe_fee", "description"=>"Stripe processing fees"
, "application"=>nil}]}]}, "other_transfers"=>["tr_40QsjtwZOas45V"], "account"=>
{"object"=>"bank_account", "id"=>"ba_51MRXiEMRwOg5l", "bank_name"=>"WELLS FARGO
BANK", "last4"=>"7720", "country"=>"US", "currency"=>"usd", "validated"=>false,
"verified"=>false, "fingerprint"=>"QiT6NsOWh1CHeuXt", "disabled"=>false}, "descr
iption"=>"STRIPE TRANSFER", "metadata"=>{}, "statement_description"=>nil, "recip
ient"=>nil}}, "object"=>"event", "pending_webhooks"=>1, "request"=>nil, "webhook
"=>{"id"=>"evt_40QsHmL02HtiLN", "created"=>1399688062, "livemode"=>false, "type"
=>"transfer.created", "data"=>{"object"=>{"id"=>"tr_40QsjtwZOas45V", "object"=>"
transfer", "created"=>1399688062, "date"=>1399766400, "livemode"=>false, "amount
"=>2820, "currency"=>"usd", "status"=>"pending", "balance_transaction"=>"txn_40Q
syqfag5qhFL", "summary"=>{"charge_gross"=>2997, "charge_fees"=>177, "charge_fee_
details"=>[{"amount"=>177, "currency"=>"usd", "type"=>"stripe_fee", "description
"=>nil, "application"=>nil}], "refund_gross"=>0, "refund_fees"=>0, "refund_fee_d
etails"=>nil, "adjustment_gross"=>0, "adjustment_fees"=>0, "adjustment_fee_detai
ls"=>nil, "validation_fees"=>0, "validation_count"=>0, "charge_count"=>3, "refun
d_count"=>0, "adjustment_count"=>0, "net"=>2820, "currency"=>"usd", "collected_f
ee_gross"=>0, "collected_fee_count"=>0, "collected_fee_refund_gross"=>0, "collec
ted_fee_refund_count"=>0}, "transactions"=>{"object"=>"list", "total_count"=>3,
"has_more"=>false, "url"=>"/v1/transfers/tr_40QsjtwZOas45V/transactions", "data"
=>[{"id"=>"ch_409lArPxSa6imL", "type"=>"charge", "amount"=>999, "currency"=>"usd
", "net"=>940, "created"=>1399624447, "description"=>nil, "fee"=>59, "fee_detail
s"=>[{"amount"=>59, "currency"=>"usd", "type"=>"stripe_fee", "description"=>"Str
ipe processing fees", "application"=>nil}]}, {"id"=>"ch_409eD9Ikc4x5co", "type"=
>"charge", "amount"=>999, "currency"=>"usd", "net"=>940, "created"=>1399624015,
"description"=>nil, "fee"=>59, "fee_details"=>[{"amount"=>59, "currency"=>"usd",
"type"=>"stripe_fee", "description"=>"Stripe processing fees", "application"=>n
il}]}, {"id"=>"ch_409TNKWtEpKgJg", "type"=>"charge", "amount"=>999, "currency"=>
"usd", "net"=>940, "created"=>1399623325, "description"=>nil, "fee"=>59, "fee_de
tails"=>[{"amount"=>59, "currency"=>"usd", "type"=>"stripe_fee", "description"=>
"Stripe processing fees", "application"=>nil}]}]}, "other_transfers"=>["tr_40Qsj
twZOas45V"], "account"=>{"object"=>"bank_account", "id"=>"ba_51MRXiEMRwOg5l", "b
ank_name"=>"WELLS FARGO BANK", "last4"=>"7720", "country"=>"US", "currency"=>"us
d", "validated"=>false, "verified"=>false, "fingerprint"=>"QiT6NsOWh1CHeuXt", "d
isabled"=>false}, "description"=>"STRIPE TRANSFER", "metadata"=>{}, "statement_d
escription"=>nil, "recipient"=>nil}}, "object"=>"event", "pending_webhooks"=>1,
"request"=>nil}}
2014-05-10T02:14:47.067120+00:00 heroku[router]: at=info method=POST path=/strip
e_events host=sleepy-ocean-5198.herokuapp.com request_id=c42a44cc-2fa5-4ffa-b965
-cd1c75824566 fwd="54.241.31.102" dyno=web.1 connect=7ms service=994ms status=20
0 bytes=463
2014-05-10T03:19:29.426903+00:00 heroku[web.1]: Idling
2014-05-10T03:19:29.427468+00:00 heroku[web.1]: State changed from up to down
2014-05-10T03:19:33.069731+00:00 app[web.1]: [2014-05-10 03:19:33] ERROR SignalE
xception: SIGTERM
2014-05-10T03:19:33.069736+00:00 app[web.1]: /app/vendor/ruby-1.9.3/lib/ruby/
1.9.1/webrick/server.rb:98:in `select'
2014-05-10T03:19:32.499332+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2014-05-10T03:19:42.579749+00:00 heroku[web.1]: Error R12 (Exit timeout) -> At l
east one process failed to exit within 10 seconds of SIGTERM
2014-05-10T03:19:42.580159+00:00 heroku[web.1]: Stopping remaining processes wit
h SIGKILL
2014-05-10T03:19:44.368080+00:00 heroku[web.1]: Process exited with status 137
2014-05-10T15:05:15.425110+00:00 heroku[web.1]: Unidling
2014-05-10T15:05:15.425351+00:00 heroku[web.1]: State changed from down to start
ing
2014-05-10T15:05:20.495347+00:00 heroku[web.1]: Starting process with command `b
in/rails server -p 7210 -e staging`
2014-05-10T15:05:33.871096+00:00 app[web.1]: [2014-05-10 15:05:33] INFO WEBrick
1.3.1
2014-05-10T15:05:33.871123+00:00 app[web.1]: [2014-05-10 15:05:33] INFO ruby 1.
9.3 (2014-02-24) [x86_64-linux]
2014-05-10T15:05:33.871596+00:00 app[web.1]: [2014-05-10 15:05:33] INFO WEBrick
::HTTPServer#start: pid=2 port=7210
2014-05-10T15:05:34.318856+00:00 heroku[web.1]: State changed from starting to u
p
2014-05-10T15:05:36.453751+00:00 heroku[router]: at=info method=GET path=/admin/
payments host=sleepy-ocean-5198.herokuapp.com request_id=650af96d-42fe-4871-9949
-a0c93f537328 fwd="71.225.177.146" dyno=web.1 connect=1ms service=1178ms status=
500 bytes=919
2014-05-10T15:05:37.080481+00:00 heroku[router]: at=info method=GET path=/admin/
payments host=sleepy-ocean-5198.herokuapp.com request_id=a2d12d4b-1ce8-4d0f-993a
-57aa61a3b40b fwd="71.225.177.146" dyno=web.1 connect=1ms service=1496ms status=
500 bytes=919
路線:
Myflix::Application.routes.draw do
root to: "static_pages#front"
require 'sidekiq/web'
mount Sidekiq::Web => '/sidekiq'
resources :videos do
collection do
get :search, to: "videos#search"
end
resources :reviews
end
namespace :admin do
resources :videos, only: [:new, :create]
resources :payments
end
resources :categories, only: [:show]
resources :queue_items, only: [:create, :destroy]
post 'update_queue', to: 'queue_items#update_queue'
resources :users
get 'people', to: 'relationships#index'
get '/users/make_admin/:id/', to: "users#make_admin"
resources :relationships, only: [:create, :destroy]
resources :sessions, only: [:create]
resources :forgot_passwords, only: [:create]
resources :password_resets, only: [:show, :create]
resources :invitations, only: [:new, :create]
get '/register', to: "users#new"
get 'register/:token', to: "users#new_with_invitation_token", as: 'register_with_token'
get '/sign_in', to: "sessions#new"
get '/sign_out', to: "sessions#destroy"
get '/home', to: "videos#index"
get '/my_queue', to: "queue_items#index"
get '/forgot_password', to: "forgot_passwords#new"
get 'forgot_password_confirmation', to: "forgot_passwords#confirm"
get 'expired_token', to: "pages#expired_token"
mount StripeEvent::Engine => '/stripe_events'
get 'ui(/:action)', controller: 'ui'
末
管理/ payments_controller.rb
class Admin::PaymentsController < AdminsController
def index
@payments = Payment.all
end
end
觀點我想轉到:views/admin/pa yments
%section.admin_payments
.container
.row
.col-sm-10.col-sm-offset-1
%section.payment_history
%ul.nav.nav-tabs
%li.active
%a(href="") Recent Payments
%li
= link_to "Add a New Video", new_admin_video_path
%table.table
%thead
%tr
%th Name
%th Email
%th Amount
%th Reference ID
%tbody
- @payments.each do |payment|
%tr
%td= payment.user.full_name
%td= payment.user.email
%td= number_to_currency(payment.amount/100.0)
%td= payment.reference_id
你能在這裏列出你的routes.rb嗎?另外,這個路徑看起來像你的本地? –
@SrikanthVenugopalan我在完整的路線文件中添加。路徑在本地看起來是一樣的:localhost:3000/admin/payments –
看起來像'/ admin/payments'需要登錄管理員用戶。我懷疑'AdminsController'中的'before filter'會拋出一個異常,因爲'current_user'是'nil'。你能在前面的過濾器上打印'current_user.inspect'並嘗試調試嗎? –