Ruby on Rails Monday, May 29, 2017

ok, the context is I have this table to update users with small notifications messages. 

Rails scaffold generated a userid and msg form.   Now, when I need to send a user a message I look them up in the table, grab their id and then put the id in the field along with a message.

Thanks,
Joe

On Mon, May 29, 2017 at 1:55 PM, Walter Lee Davis <waltd@wdstudio.com> wrote:


> On May 29, 2017, at 1:34 PM, Joe Guerra <jguerra@jginfosys.com> wrote:
>
> Hi, I have this notifications table which basically has a userid and a msg (notification).
>
> What should I do with the userid?  I would like to look up the user by name and stick the id in the table.
>
> Is that normally what you'd do in this case?  A dropdown list would be too large.
>
> Thanks,
> Joe

When (how often) would you want to get the user's name? That's the question I would ask before deciding whether to denormalize this or not.

If you're just doing a listing on a table, you could do Notification.includes(:user).where ... and that would lazy-load the users for you, so you could get the user's name without an N+1 lookup. If you are showing the user all of their notifications, then you would be doing something like current_user.notifications ... so you would have the user already that way.

The answer to your question depends on the context.

Walter

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/C910C1AA-AECA-4A2E-844A-C116B88A8796%40wdstudio.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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOFgAMmUzgxCuHFoOVk%3DCxDn6%3D63mjoXwEAa_rfPrCS9oCBxaQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On May 29, 2017, at 1:34 PM, Joe Guerra <jguerra@jginfosys.com> wrote:
>
> Hi, I have this notifications table which basically has a userid and a msg (notification).
>
> What should I do with the userid? I would like to look up the user by name and stick the id in the table.
>
> Is that normally what you'd do in this case? A dropdown list would be too large.
>
> Thanks,
> Joe

When (how often) would you want to get the user's name? That's the question I would ask before deciding whether to denormalize this or not.

If you're just doing a listing on a table, you could do Notification.includes(:user).where ... and that would lazy-load the users for you, so you could get the user's name without an N+1 lookup. If you are showing the user all of their notifications, then you would be doing something like current_user.notifications ... so you would have the user already that way.

The answer to your question depends on the context.

Walter

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/C910C1AA-AECA-4A2E-844A-C116B88A8796%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi, I have this notifications table which basically has a userid and a msg (notification).

What should I do with the userid?  I would like to look up the user by name and stick the id in the table.  

Is that normally what you'd do in this case?  A dropdown list would be too large.

Thanks,
Joe

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f2e33535-119a-496f-ada2-7502d9826833%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 29 May 2017 at 14:32, Walter Lee Davis <waltd@wdstudio.com> wrote:
>
>> On May 29, 2017, at 3:59 AM, Colin Law <clanlaw@gmail.com> wrote:
>>
>> On 28 May 2017 at 23:26, fugee ohu <fugee279@gmail.com> wrote:
>>>
>>>
>>> On Sunday, May 28, 2017 at 4:58:13 PM UTC-4, Colin Law wrote:
>>>>
>>>> On 28 May 2017 at 21:17, fugee ohu <fuge...@gmail.com> wrote:
>>>>> I wanna add a dropdown menu to my index view for the index action of my
>>>>> artists_controller Trying to use collection_select but it responds
>>>>> undefined
>>>>> method `collection_select' for nil:NilClass The idea is to list artists
>>>>> by
>>>>> genre
>>>>>
>>>>> <div class="field"> <%= f.collection_select( :artist, :genre, Genre.all,
>>>>> :id, :name) %> </div>
>>>>
>>>> How are you setting f?
>>>>
>>>> Colin
>>>
>>>
>>> <%= form_tag(artists_path) do |f| %>
>>
>> form_tag must be used inside a form, it does not create a form
>>
>> Colin
>
>
> No, form_tag creates a form tag, unbound to any model object.

You are right of course. I am getting old :(

Colin

>
> http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-form_tag
>
> I think where the OP may be getting off track is that the form created by form_tag doesn't have a bound object, so saying f.collection_select is sort of meaningless. That syntax is used when you bind the form to an object, such as when you use form_for(@foo). You can use collection_select with or without an object, in the latter form, you have to provide the object as the first argument, but when you use the f.collection_select syntax, that first argument becomes the second argument, and the first argument is picked up from the f reference.
>
> I think, ultimately, that's what's going on here -- the entire set of arguments to the helper are being shifted left one step, and the meaningless reference to the form builder (without bound object) is being passed in to the tag helper.
>
> Walter
>
> --
> 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 rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2FCF702E-E978-429C-999C-34B20FD514AC%40wdstudio.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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLsYoU5KVUDfFWZRjhO8FxThkUe4gL0TSO9cJYk7Efd2%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On May 29, 2017, at 3:59 AM, Colin Law <clanlaw@gmail.com> wrote:
>
> On 28 May 2017 at 23:26, fugee ohu <fugee279@gmail.com> wrote:
>>
>>
>> On Sunday, May 28, 2017 at 4:58:13 PM UTC-4, Colin Law wrote:
>>>
>>> On 28 May 2017 at 21:17, fugee ohu <fuge...@gmail.com> wrote:
>>>> I wanna add a dropdown menu to my index view for the index action of my
>>>> artists_controller Trying to use collection_select but it responds
>>>> undefined
>>>> method `collection_select' for nil:NilClass The idea is to list artists
>>>> by
>>>> genre
>>>>
>>>> <div class="field"> <%= f.collection_select( :artist, :genre, Genre.all,
>>>> :id, :name) %> </div>
>>>
>>> How are you setting f?
>>>
>>> Colin
>>
>>
>> <%= form_tag(artists_path) do |f| %>
>
> form_tag must be used inside a form, it does not create a form
>
> Colin


No, form_tag creates a form tag, unbound to any model object.

http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html#method-i-form_tag

I think where the OP may be getting off track is that the form created by form_tag doesn't have a bound object, so saying f.collection_select is sort of meaningless. That syntax is used when you bind the form to an object, such as when you use form_for(@foo). You can use collection_select with or without an object, in the latter form, you have to provide the object as the first argument, but when you use the f.collection_select syntax, that first argument becomes the second argument, and the first argument is picked up from the f reference.

I think, ultimately, that's what's going on here -- the entire set of arguments to the helper are being shifted left one step, and the meaningless reference to the form builder (without bound object) is being passed in to the tag helper.

Walter

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/2FCF702E-E978-429C-999C-34B20FD514AC%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Good morning,


I haven't done an autocomplete with a nested form in quite some time and can't find any good references.  I posted to SO here: https://stackoverflow.com/questions/44232005/rails-5-nested-form-find-or-create

Basically I have two models Run and Patient.  Run belongs_to patient and Patient has_many runs.  Run accepts_nested_attributes for patient.

What I want to do is when creating a new run, have a select box that let's me type out of the name of the patient, if they exist and it's the right patient, use that ID in the form.  If the patient does not exist, then create the nested association patient record.  I'm hoping to do this with autocomplete too.

Any guidance is greatly appreciated.

Thanks!

Ruby on Rails

On 28 May 2017 at 23:26, fugee ohu <fugee279@gmail.com> wrote:
>
>
> On Sunday, May 28, 2017 at 4:58:13 PM UTC-4, Colin Law wrote:
>>
>> On 28 May 2017 at 21:17, fugee ohu <fuge...@gmail.com> wrote:
>> > I wanna add a dropdown menu to my index view for the index action of my
>> > artists_controller Trying to use collection_select but it responds
>> > undefined
>> > method `collection_select' for nil:NilClass The idea is to list artists
>> > by
>> > genre
>> >
>> > <div class="field"> <%= f.collection_select( :artist, :genre, Genre.all,
>> > :id, :name) %> </div>
>>
>> How are you setting f?
>>
>> Colin
>
>
> <%= form_tag(artists_path) do |f| %>

form_tag must be used inside a form, it does not create a form

Colin

>
>
> --
> 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 rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/1340f13b-8e7c-4e81-a63d-e28833acf816%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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLs6LG9Ranzd_8H3o%2BcMSN6Td7%3Dqqxvj9UEQ0qqbNLQO9A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, May 28, 2017



On Sunday, May 28, 2017 at 4:58:13 PM UTC-4, Colin Law wrote:
On 28 May 2017 at 21:17, fugee ohu <fuge...@gmail.com> wrote:
> I wanna add a dropdown menu to my index view for the index action of my
> artists_controller Trying to use collection_select but it responds undefined
> method `collection_select' for nil:NilClass The idea is to list artists by
> genre
>
> <div class="field"> <%= f.collection_select( :artist, :genre, Genre.all,
> :id, :name) %> </div>

How are you setting f?

Colin

<%= form_tag(artists_path) do |f| %>
 

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1340f13b-8e7c-4e81-a63d-e28833acf816%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 28 May 2017 at 21:17, fugee ohu <fugee279@gmail.com> wrote:
> I wanna add a dropdown menu to my index view for the index action of my
> artists_controller Trying to use collection_select but it responds undefined
> method `collection_select' for nil:NilClass The idea is to list artists by
> genre
>
> <div class="field"> <%= f.collection_select( :artist, :genre, Genre.all,
> :id, :name) %> </div>

How are you setting f?

Colin

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtRuu1Nn7SSBss5Jvt%2BLmxMPbYT%3DVFPR0A1-fY27Sa%3DJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Sunday, May 28, 2017 at 4:28:35 PM UTC-4, Chris Lerum wrote:
try <%= f.collection_select( :artist, :genre_id, Genre.all, :id, :name) %>

On Sunday, May 28, 2017 at 4:17:53 PM UTC-4, fugee ohu wrote:
I wanna add a dropdown menu to my index view for the index action of my artists_controller Trying to use collection_select but it responds undefined method `collection_select' for nil:NilClass The idea is to list artists by genre

<div class="field"> <%= f.collection_select( :artist, :genre, Genre.all, :id, :name) %> </div>


gets me the same error, the  object is plural @artists, there's no form_for @artists instead i'm using <%= form_tag(artists_path) do |f| %>

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/86014fc8-fffa-43a4-926a-ab8aa5ae73b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

try <%= f.collection_select( :artist, :genre_id, Genre.all, :id, :name) %>

On Sunday, May 28, 2017 at 4:17:53 PM UTC-4, fugee ohu wrote:
I wanna add a dropdown menu to my index view for the index action of my artists_controller Trying to use collection_select but it responds undefined method `collection_select' for nil:NilClass The idea is to list artists by genre

<div class="field"> <%= f.collection_select( :artist, :genre, Genre.all, :id, :name) %> </div>

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/47a9dff5-9513-40d7-ada5-f315ce4fdfd0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I wanna add a dropdown menu to my index view for the index action of my artists_controller Trying to use collection_select but it responds undefined method `collection_select' for nil:NilClass The idea is to list artists by genre

<div class="field"> <%= f.collection_select( :artist, :genre, Genre.all, :id, :name) %> </div>

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/8cb2b9d3-853f-4fec-87a2-e15fed097c68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, May 27, 2017

oh, I don't know what happened.  But  I pushed it up to github again and deployed it on heroku and it works . now.
Must have been a few files that were not included in the original push.

Thanks,
Joe

On Saturday, May 27, 2017 at 11:03:40 AM UTC-4, nynhex wrote:
Good call on this one, request and response are almost reserved naming conventions in rails.

> On May 27, 2017, at 9:32 AM, Hassan Schroeder <hassan.s...@gmail.com> wrote:
>
> On Sat, May 27, 2017 at 6:15 AM, Joe Guerra <JGu...@jginfosys.com> wrote:
>> Hi, I'm not sure why my app on heroku is crashing.
>> I've added a requests controller, and everything works locally using sqlite.
>
> "works" in the sense that you have tests for this part of your code?
>
> That aside, having a "requests" controller sounds like a phenomenally
> bad idea -- "request" and "response" have very specific meanings in
> any web application, and in the case of Rails request() is an instance
> method of ActionController::Base.
>
> I would strongly recommend changing the name of that controller :-)
>
> --
> Hassan Schroeder ------------------------ hassan.s...@gmail.com
> twitter: @hassan
> Consulting Availability : Silicon Valley or remote
>
> --
> 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 rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDAbayWntKqCuUES1M5bAorxiZkfq5h3Syn%3D30%2B76k07Q%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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/1842ec4d-8d64-4cdc-9fa1-f22c4d131da4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Good call on this one, request and response are almost reserved naming conventions in rails.

> On May 27, 2017, at 9:32 AM, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:
>
> On Sat, May 27, 2017 at 6:15 AM, Joe Guerra <JGuerra@jginfosys.com> wrote:
>> Hi, I'm not sure why my app on heroku is crashing.
>> I've added a requests controller, and everything works locally using sqlite.
>
> "works" in the sense that you have tests for this part of your code?
>
> That aside, having a "requests" controller sounds like a phenomenally
> bad idea -- "request" and "response" have very specific meanings in
> any web application, and in the case of Rails request() is an instance
> method of ActionController::Base.
>
> I would strongly recommend changing the name of that controller :-)
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
> twitter: @hassan
> Consulting Availability : Silicon Valley or remote
>
> --
> 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 rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDAbayWntKqCuUES1M5bAorxiZkfq5h3Syn%3D30%2B76k07Q%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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/A0F45EB2-F86C-4B8E-BFB3-5240EE464B3A%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Sat, May 27, 2017 at 6:15 AM, Joe Guerra <JGuerra@jginfosys.com> wrote:
> Hi, I'm not sure why my app on heroku is crashing.
> I've added a requests controller, and everything works locally using sqlite.

"works" in the sense that you have tests for this part of your code?

That aside, having a "requests" controller sounds like a phenomenally
bad idea -- "request" and "response" have very specific meanings in
any web application, and in the case of Rails request() is an instance
method of ActionController::Base.

I would strongly recommend changing the name of that controller :-)

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yDAbayWntKqCuUES1M5bAorxiZkfq5h3Syn%3D30%2B76k07Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Yes, I believe so.  

On Sat, May 27, 2017 at 9:18 AM, nynhex <nynhex@gmail.com> wrote:
Is your controller class name named properly and have you committed this controller to version control before deploying to Herkoku?

Sent from my iPhone

On May 27, 2017, at 8:15 AM, Joe Guerra <JGuerra@jginfosys.com> wrote:

Hi, I'm not sure why my app on heroku is crashing.  
I've added a requests controller, and everything works locally using sqlite.  


here's my log from heroku...

2017-05-27T13:07:36.250694+00:00 app[web.1]:    [1m [35mUser Load (1.7ms) [0m  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 11]]
2017-05-27T13:07:36.253544+00:00 app[web.1]: Completed 500 Internal Server Error in 8ms (ActiveRecord: 1.7ms)
2017-05-27T13:07:36.254583+00:00 app[web.1]: 
2017-05-27T13:07:36.254585+00:00 app[web.1]: NameError (uninitialized constant RequestsController::Request):
2017-05-27T13:07:36.254586+00:00 app[web.1]:   app/controllers/requests_controller.rb:12:in `index'
2017-05-27T13:07:36.254586+00:00 app[web.1]: 

What's causing this?  any suggestions?
Thanks,
Joe

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/75f23d83-3b51-4e4c-b408-0b1d8e8f0cb2%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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/37E839DA-2EE5-45FD-BF41-533367944810%40gmail.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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAOFgAMnYrt%2BazpCGQvMh%3Djdw5TyhHHTXiZbz9F4HTnN%3Djktpdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Is your controller class name named properly and have you committed this controller to version control before deploying to Herkoku?

Sent from my iPhone

On May 27, 2017, at 8:15 AM, Joe Guerra <JGuerra@jginfosys.com> wrote:

Hi, I'm not sure why my app on heroku is crashing.  
I've added a requests controller, and everything works locally using sqlite.  


here's my log from heroku...

2017-05-27T13:07:36.250694+00:00 app[web.1]:    [1m [35mUser Load (1.7ms) [0m  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 11]]
2017-05-27T13:07:36.253544+00:00 app[web.1]: Completed 500 Internal Server Error in 8ms (ActiveRecord: 1.7ms)
2017-05-27T13:07:36.254583+00:00 app[web.1]: 
2017-05-27T13:07:36.254585+00:00 app[web.1]: NameError (uninitialized constant RequestsController::Request):
2017-05-27T13:07:36.254586+00:00 app[web.1]:   app/controllers/requests_controller.rb:12:in `index'
2017-05-27T13:07:36.254586+00:00 app[web.1]: 

What's causing this?  any suggestions?
Thanks,
Joe

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/75f23d83-3b51-4e4c-b408-0b1d8e8f0cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi, I'm not sure why my app on heroku is crashing.  
I've added a requests controller, and everything works locally using sqlite.  


here's my log from heroku...

2017-05-27T13:07:36.250694+00:00 app[web.1]:    [1m [35mUser Load (1.7ms) [0m  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 11]]
2017-05-27T13:07:36.253544+00:00 app[web.1]: Completed 500 Internal Server Error in 8ms (ActiveRecord: 1.7ms)
2017-05-27T13:07:36.254583+00:00 app[web.1]: 
2017-05-27T13:07:36.254585+00:00 app[web.1]: NameError (uninitialized constant RequestsController::Request):
2017-05-27T13:07:36.254586+00:00 app[web.1]:   app/controllers/requests_controller.rb:12:in `index'
2017-05-27T13:07:36.254586+00:00 app[web.1]: 

What's causing this?  any suggestions?
Thanks,
Joe

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/75f23d83-3b51-4e4c-b408-0b1d8e8f0cb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, May 24, 2017

It does have to originate from an email address if you want everything to be legit and not market as spam.

A solution would be to have something like 'notifier@yoursite.com' that will send the email and let the user know that it originated from another user.

Cheers, Bud.

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL37D8F_%2Bb9kUeRf7Kr5yxtwbGF8_uNCxO0cCNVWca1ckpTZmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Eu nunca experimentei o problema que você fez, mas eu posso ajudar. Você pode falar em inglês? Meu portugal não é bom.


On May 24, 2017, at 9:59 AM, pedrocustodio@outlook.com.br wrote:

Olá.

Tenho um certificado Willcard da GoDaddy, e tentando fazer upload para o load balancer da Amazon ocorreu um erro.

Gerei a chave privada com o comado:
openssl req -nodes -newkey rsa:2048 -keyout meu_dominio.key -out meu_dominio.csr

Foram criados os 02 arquivos:
meu_dominio.csr e meu_dominio.key

Copiei a chave do .csr e obtive o download do certificados da GoDaddy, com os formatos .crt

Fiz a conversão desse arquivo e do .key para .pem. conforme solicitação do load balancer na Amazon

Copiei as chaves, e recebi a mensagem de que o certificado não foi encontrado. 

Verifiquei vários docs da web, e mesmo seguindo os passos não funcionou, alguém que já passou pela experiencia poderia me dar um feedback?

Ruby on Rails


I'd like registered users with valid email addresses to send messages to their friends [using a form].  Is this possible using sendgrid?  or does it have to originate from my registered email address?

Thanks,
Joe

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/dcfe8b4f-7207-4306-af8b-be29683d8f10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Olá.

Tenho um certificado Willcard da GoDaddy, e tentando fazer upload para o load balancer da Amazon ocorreu um erro.

Gerei a chave privada com o comado:
openssl req -nodes -newkey rsa:2048 -keyout meu_dominio.key -out meu_dominio.csr

Foram criados os 02 arquivos:
meu_dominio.csr e meu_dominio.key

Copiei a chave do .csr e obtive o download do certificados da GoDaddy, com os formatos .crt

Fiz a conversão desse arquivo e do .key para .pem. conforme solicitação do load balancer na Amazon

Copiei as chaves, e recebi a mensagem de que o certificado não foi encontrado. 

Verifiquei vários docs da web, e mesmo seguindo os passos não funcionou, alguém que já passou pela experiencia poderia me dar um feedback?

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9ffcc899-d690-4ff8-bdb2-64978601eb91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Tuesday, May 23, 2017

For auth API with manager screen too.
Im using devise with JWT gem
gem 'devise'
gem 'cancancan'
gem 'grape'
gem 'rack-cors'
gem 'jwt'

After authen user success. Using JWT to generate authtoken using on each API call

--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ac8a3293-b405-4d9d-b29b-5708d6d1afba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, May 20, 2017

I think that my db is OK.
Take a look please:

heroku run console
User.where(email: 'user@example.com', provider: 'email')

D
, [2017-05-20T10:43:39.855948 #4] DEBUG -- :   User Load (1.6ms)  SELECT "users".* FROM "users" WHERE "users"."email" = $1 AND "users"."provider" = $2  [["email", "user@example.com"], ["provider", "email"]]
=> #<ActiveRecord::Relation [#<User id: 1, provider: "email", uid: "user@example.com", name: "User One", nickname: "UOne", image: nil, email: "user@example.com", created_at: "2017-05-20 10:05:39", updated_at: "2017-05-20 10:29:25">]>

Sir, what do you mean stack tracke? As I understood correctly I should print out the full logs report, right?

2017-05-20T10:52:18.126163+00:00 app[web.1]: I, [2017-05-20T10:52:18.126049 #4]  INFO -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] Started POST "/auth/sign_in" for 159.205.203.189 at 2017-05-20 10:52:18 +0000
2017-05-20T10:52:18.127182+00:00 app[web.1]: I, [2017-05-20T10:52:18.127110 #4]  INFO -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] Processing by DeviseTokenAuth::SessionsController#create as HTML
2017-05-20T10:52:18.127236+00:00 app[web.1]: I, [2017-05-20T10:52:18.127186 #4]  INFO -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70]   Parameters: {"email"=>"user@example.com", "password"=>"[FILTERED]"}
2017-05-20T10:52:18.285137+00:00 app[web.1]: I, [2017-05-20T10:52:18.284972 #4]  INFO -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] Completed 500 Internal Server Error in 158ms (ActiveRecord: 1.0ms)
2017-05-20T10:52:18.130991+00:00 app[web.1]: D, [2017-05-20T10:52:18.130911 #4] DEBUG -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70]   User Load (1.0ms)  SELECT  "users".* FROM "users" WHERE (email = 'user@example.com' AND provider='email') ORDER BY "users"."id" ASC LIMIT $1  [["LIMIT", 1]]
2017-05-20T10:52:18.286563+00:00 app[web.1]: F, [2017-05-20T10:52:18.286504 #4] FATAL -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] IndexError (string not matched):
2017-05-20T10:52:18.286498+00:00 app[web.1]: F, [2017-05-20T10:52:18.286429 #4] FATAL -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70]  
2017-05-20T10:52:18.286744+00:00 app[web.1]: F, [2017-05-20T10:52:18.286654 #4] FATAL -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/devise_token_auth-0.1.42/app/controllers/devise_token_auth/sessions_controller.rb:42:in `[]='
2017-05-20T10:52:18.286620+00:00 app[web.1]: F, [2017-05-20T10:52:18.286562 #4] FATAL -- : [fb643a56-f5b3-4b63-a1a6-4ce56c317f70]  
2017-05-20T10:52:18.286746+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/devise_token_auth-0.1.42/app/controllers/devise_token_auth/sessions_controller.rb:42:in `create'
2017-05-20T10:52:18.286747+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal/basic_implicit_render.rb:4:in `
send_action'
2017-05-20T10:52:18.286749+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/abstract_controller/base.rb:188:in `process_action'

2017-05-20T10:52:18.286750+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal/rendering.rb:30:in `process_action'
2017-05-20T10:52:18.286751+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/abstract_controller/callbacks.rb:20:in `
block in process_action'
2017-05-20T10:52:18.286752+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:126:in `call'

2017-05-20T10:52:18.286753+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
2017-05-20T10:52:18.286754+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:455:in `
call'
2017-05-20T10:52:18.286755+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:101:in `__run_callbacks__'

2017-05-20T10:52:18.286756+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
2017-05-20T10:52:18.286757+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:90:in `
run_callbacks'
2017-05-20T10:52:18.286758+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/abstract_controller/callbacks.rb:19:in `process_action'

2017-05-20T10:52:18.286759+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal/rescue.rb:20:in `process_action'
2017-05-20T10:52:18.286760+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal/instrumentation.rb:32:in `
block in process_action'
2017-05-20T10:52:18.286760+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/notifications.rb:164:in `block in instrument'

2017-05-20T10:52:18.286761+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
2017-05-20T10:52:18.286762+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal/instrumentation.rb:30:in `
process_action'
2017-05-20T10:52:18.286762+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/notifications.rb:164:in `instrument'

2017-05-20T10:52:18.286763+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
2017-05-20T10:52:18.286764+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.3/lib/active_record/railties/controller_runtime.rb:18:in `
process_action'
2017-05-20T10:52:18.286765+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/abstract_controller/base.rb:126:in `process'

2017-05-20T10:52:18.286765+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal.rb:190:in `dispatch'
2017-05-20T10:52:18.286766+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_controller/metal.rb:262:in `
dispatch'
2017-05-20T10:52:18.286767+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'

2017-05-20T10:52:18.286767+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:32:in `serve'
2017-05-20T10:52:18.286768+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/mapper.rb:16:in `
block in <class:Constraints>'
2017-05-20T10:52:18.286773+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:39:in `block in serve'

2017-05-20T10:52:18.286772+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/mapper.rb:46:in `serve'
2017-05-20T10:52:18.286774+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `
each'
2017-05-20T10:52:18.286774+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/journey/router.rb:26:in `serve'

2017-05-20T10:52:18.286775+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/routing/route_set.rb:725:in `call'
2017-05-20T10:52:18.286776+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/rack-cors-0.4.1/lib/rack/cors.rb:81:in `
call'
2017-05-20T10:52:18.286776+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/warden-1.2.7/lib/warden/manager.rb:36:in `block in call'

2017-05-20T10:52:18.286777+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `catch'
2017-05-20T10:52:18.286778+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/warden-1.2.7/lib/warden/manager.rb:35:in `
call'
2017-05-20T10:52:18.286778+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/etag.rb:25:in `call'

2017-05-20T10:52:18.286779+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/conditional_get.rb:38:in `call'
2017-05-20T10:52:18.286781+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:38:in `
block in call'
2017-05-20T10:52:18.286782+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:97:in `__run_callbacks__'

2017-05-20T10:52:18.286780+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/head.rb:12:in `call'
2017-05-20T10:52:18.286783+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:750:in `
_run_call_callbacks'
2017-05-20T10:52:18.286783+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/callbacks.rb:90:in `run_callbacks'

2017-05-20T10:52:18.286784+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
2017-05-20T10:52:18.286785+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `
call'
2017-05-20T10:52:18.286785+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'

2017-05-20T10:52:18.286786+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
2017-05-20T10:52:18.286787+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:36:in `
call_app'
2017-05-20T10:52:18.286787+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:24:in `block in call'

2017-05-20T10:52:18.286788+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:69:in `block in tagged'
2017-05-20T10:52:18.286789+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:26:in `
tagged'
2017-05-20T10:52:18.286789+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/tagged_logging.rb:69:in `tagged'

2017-05-20T10:52:18.286790+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/railties-5.0.3/lib/rails/rack/logger.rb:24:in `call'
2017-05-20T10:52:18.286791+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/request_id.rb:24:in `
call'
2017-05-20T10:52:18.286792+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'

2017-05-20T10:52:18.286791+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/runtime.rb:22:in `call'
2017-05-20T10:52:18.286792+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/executor.rb:12:in `
call'
2017-05-20T10:52:18.286795+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.3/lib/action_dispatch/middleware/static.rb:136:in `call'

2017-05-20T10:52:18.286796+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/sendfile.rb:111:in `call'
2017-05-20T10:52:18.286796+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/railties-5.0.3/lib/rails/engine.rb:522:in `
call'
2017-05-20T10:52:18.286797+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/configuration.rb:224:in `call'

2017-05-20T10:52:18.286798+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/server.rb:600:in `handle_request'
2017-05-20T10:52:18.286798+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/server.rb:435:in `
process_client'
2017-05-20T10:52:18.286799+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/server.rb:299:in `block in run'

2017-05-20T10:52:18.286799+00:00 app[web.1]: [fb643a56-f5b3-4b63-a1a6-4ce56c317f70] vendor/bundle/ruby/2.3.0/gems/puma-3.8.2/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
2017-05-20T10:52:18.288496+00:00 heroku[router]: at=info method=POST path="/auth/sign_in" host=
thawing-mesa-14670.herokuapp.com request_id=fb643a56-f5b3-4b63-a1a6-4ce56c317f70 fwd="159.205.203.189" dyno=web.1 connect=1ms service=165ms status=500 bytes=189 protocol=https
2017-05-20T10:52:33.466720+00:00 heroku[run.5291]: Process exited with status 0
2017-05-20T10:52:33.479624+00:00 heroku[run.5291]: State changed from up to complete

I'm not sure why "IndexError: string not matched" occurs.

Generally speaking I want to immplement an Angular 4 app on Rails backend. Can you recommend me other way of implemeting token authentication in Rails? 
If devise_token_auth is not working, I need some alternatives.

I was also considering a JWT format for this purposes. What kind of gems should I use then?

Which way is better?






--
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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c1ee784d-4e25-465b-98c3-99ed65bd85ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.