got this issue in production, but it works in development?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

got this issue in production, but it works in development?

Joe Guerra
Here's a snippet of the log from heroku.

�[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
2018-10-13T01:57:05.845990+00:00 app[web.1]:
2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'
2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https

This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.  


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/5f5dd699-b7b3-45af-bf9f-6fe0824f2481%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: got this issue in production, but it works in development?

Joe Guerra
Ok , I fixed this error.  It's not crashing but it's not saving the last item either [or processing the order...]

On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote:
Here's a snippet of the log from heroku.

�[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
2018-10-13T01:57:05.845990+00:00 app[web.1]:
2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'
2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=<a href="http://cryptic-inlet-13518.herokuapp.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcryptic-inlet-13518.herokuapp.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFl2p3nZdJyzFboUSUgdpGtW8wspg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcryptic-inlet-13518.herokuapp.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFl2p3nZdJyzFboUSUgdpGtW8wspg&#39;;return true;">cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https

This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.  


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: got this issue in production, but it works in development?

Colin Law
On Fri, 19 Oct 2018 at 14:43, Joe Guerra <[hidden email]> wrote:

>
> Ok , I fixed this error.  It's not crashing but it's not saving the last item either [or processing the order...]
>
> On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote:
>>
>> Here's a snippet of the log from heroku.
>>
>> �[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
>> 2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
>> 2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
>> 2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
>> 2018-10-13T01:57:05.845990+00:00 app[web.1]:
>> 2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'

You have not shown us the code but I assume that on that line you have
a call of empty?, whatever you are calling empty? on is nil.

Colin

>> 2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
>> 2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https
>>
>> This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsLx%2BbVYy9GJ8BqSvcb6ycEEqfDcXNB6tkt0APw6njS7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: got this issue in production, but it works in development?

Joe Guerra
it got hung up on this line of code...

        format.html { render root_path, notice: 'Not sure what happened... please contact tech support.'}

I changed it to ....
        format.html { redirect_to root_path, notice: 'Not sure what happened... please contact tech support.'}

At least it doesn't crash now.  lol.


On Friday, October 19, 2018 at 10:24:36 AM UTC-4, Colin Law wrote:
On Fri, 19 Oct 2018 at 14:43, Joe Guerra <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fxR7F7frCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">JGu...@...> wrote:

>
> Ok , I fixed this error.  It's not crashing but it's not saving the last item either [or processing the order...]
>
> On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote:
>>
>> Here's a snippet of the log from heroku.
>>
>> �[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
>> 2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
>> 2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
>> 2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
>> 2018-10-13T01:57:05.845990+00:00 app[web.1]:
>> 2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'

You have not shown us the code but I assume that on that line you have
a call of empty?, whatever you are calling empty? on is nil.

Colin

>> 2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
>> 2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=<a href="http://cryptic-inlet-13518.herokuapp.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcryptic-inlet-13518.herokuapp.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFl2p3nZdJyzFboUSUgdpGtW8wspg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fcryptic-inlet-13518.herokuapp.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFl2p3nZdJyzFboUSUgdpGtW8wspg&#39;;return true;">cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https
>>
>> This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="fxR7F7frCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="fxR7F7frCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">rubyonra...@googlegroups.com.
> To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com&#39;;return true;">https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com.
> For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62a67753-9fa3-4a1c-b8a3-b5931f9fb467%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: got this issue in production, but it works in development?

Colin Law
I assume your automated tests do not exercise that condition.

Colin

On Fri, 19 Oct 2018 at 15:38, Joe Guerra <[hidden email]> wrote:
it got hung up on this line of code...

        format.html { render root_path, notice: 'Not sure what happened... please contact tech support.'}

I changed it to ....
        format.html { redirect_to root_path, notice: 'Not sure what happened... please contact tech support.'}

At least it doesn't crash now.  lol.


On Friday, October 19, 2018 at 10:24:36 AM UTC-4, Colin Law wrote:
On Fri, 19 Oct 2018 at 14:43, Joe Guerra <[hidden email]> wrote:

>
> Ok , I fixed this error.  It's not crashing but it's not saving the last item either [or processing the order...]
>
> On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote:
>>
>> Here's a snippet of the log from heroku.
>>
>> �[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
>> 2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
>> 2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
>> 2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
>> 2018-10-13T01:57:05.845990+00:00 app[web.1]:
>> 2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'

You have not shown us the code but I assume that on that line you have
a call of empty?, whatever you are calling empty? on is nil.

Colin

>> 2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
>> 2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https
>>
>> This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62a67753-9fa3-4a1c-b8a3-b5931f9fb467%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuVRv1s-P30SZu7sHv15LPXXX5sysuXLMnGkMtszHeYDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: got this issue in production, but it works in development?

Joe Guerra
I don't know how to write tests yet.  :)
Maybe I need to find someone who can give me a few private lessons.

On Fri, Oct 19, 2018 at 10:49 AM Colin Law <[hidden email]> wrote:
I assume your automated tests do not exercise that condition.

Colin

On Fri, 19 Oct 2018 at 15:38, Joe Guerra <[hidden email]> wrote:
it got hung up on this line of code...

        format.html { render root_path, notice: 'Not sure what happened... please contact tech support.'}

I changed it to ....
        format.html { redirect_to root_path, notice: 'Not sure what happened... please contact tech support.'}

At least it doesn't crash now.  lol.


On Friday, October 19, 2018 at 10:24:36 AM UTC-4, Colin Law wrote:
On Fri, 19 Oct 2018 at 14:43, Joe Guerra <[hidden email]> wrote:

>
> Ok , I fixed this error.  It's not crashing but it's not saving the last item either [or processing the order...]
>
> On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote:
>>
>> Here's a snippet of the log from heroku.
>>
>> �[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
>> 2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
>> 2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
>> 2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
>> 2018-10-13T01:57:05.845990+00:00 app[web.1]:
>> 2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'

You have not shown us the code but I assume that on that line you have
a call of empty?, whatever you are calling empty? on is nil.

Colin

>> 2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
>> 2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https
>>
>> This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62a67753-9fa3-4a1c-b8a3-b5931f9fb467%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuVRv1s-P30SZu7sHv15LPXXX5sysuXLMnGkMtszHeYDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOFgAM%3DvbtNVjv2A%3DqBnEKGZP1TKZnBToz3iJ6xkON74HKhJmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: got this issue in production, but it works in development?

Colin Law
Work through railstutorial.org, it includes testing.  It is free to use online.

Colin

On Fri, 19 Oct 2018 at 15:51, Joe Guerra <[hidden email]> wrote:
I don't know how to write tests yet.  :)
Maybe I need to find someone who can give me a few private lessons.

On Fri, Oct 19, 2018 at 10:49 AM Colin Law <[hidden email]> wrote:
I assume your automated tests do not exercise that condition.

Colin

On Fri, 19 Oct 2018 at 15:38, Joe Guerra <[hidden email]> wrote:
it got hung up on this line of code...

        format.html { render root_path, notice: 'Not sure what happened... please contact tech support.'}

I changed it to ....
        format.html { redirect_to root_path, notice: 'Not sure what happened... please contact tech support.'}

At least it doesn't crash now.  lol.


On Friday, October 19, 2018 at 10:24:36 AM UTC-4, Colin Law wrote:
On Fri, 19 Oct 2018 at 14:43, Joe Guerra <[hidden email]> wrote:

>
> Ok , I fixed this error.  It's not crashing but it's not saving the last item either [or processing the order...]
>
> On Friday, October 19, 2018 at 9:24:26 AM UTC-4, Joe Guerra wrote:
>>
>> Here's a snippet of the log from heroku.
>>
>> �[1m�[35m (0.9ms)�[0m �[1m�[34mSELECT SUM("carts"."qty") FROM "carts" WHERE "carts"."product_id" = 1641�[0m
>> 2018-10-13T01:57:05.838933+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[35mBEGIN�[0m
>> 2018-10-13T01:57:05.841836+00:00 app[web.1]: �[1m�[35m (0.8ms)�[0m �[1m�[31mROLLBACK�[0m
>> 2018-10-13T01:57:05.844891+00:00 app[web.1]: Completed 500 Internal Server Error in 49ms (ActiveRecord: 17.5ms)
>> 2018-10-13T01:57:05.845990+00:00 app[web.1]:
>> 2018-10-13T01:57:05.846119+00:00 app[web.1]: NoMethodError (undefined method empty?' for nil:NilClass): 2018-10-13T01:57:05.846157+00:00 app[web.1]: 2018-10-13T01:57:05.846206+00:00 app[web.1]: app/controllers/products_controller.rb:85:in block (2 levels) in show'

You have not shown us the code but I assume that on that line you have
a call of empty?, whatever you are calling empty? on is nil.

Colin

>> 2018-10-13T01:57:05.846208+00:00 app[web.1]: app/controllers/products_controller.rb:77:in `show'
>> 2018-10-13T01:57:05.847916+00:00 heroku[router]: at=info method=GET path="/products/1641" host=cryptic-inlet-13518.herokuapp.com request_id=035eb706-bb86-4dbd-86c7-a183b3a493e7 fwd="99.248.30.134" dyno=web.1 connect=1ms service=59ms status=500 bytes=1754 protocol=https
>>
>> This error in production occurs when the last item is put into a cart (and the campaign is funded).  But it works fine in development.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/fe11510c-40c7-4afc-b61d-6999ef3b278d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/62a67753-9fa3-4a1c-b8a3-b5931f9fb467%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLuVRv1s-P30SZu7sHv15LPXXX5sysuXLMnGkMtszHeYDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOFgAM%3DvbtNVjv2A%3DqBnEKGZP1TKZnBToz3iJ6xkON74HKhJmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsg%3DSTgyJoePdZ9TDwXbV0R5NKQtgdmGjACK9tuwmLBMA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.