Ruby on Rails Monday, July 31, 2017

I found another way around this so you could still use the ruby version of schema dumper.  You must create an initializer to add your custom types to the active record psotgress adapter.  I wrote up the answer here:

https://stackoverflow.com/a/45430348/1019660

(This post was the first place I saw talking about it so wanted to make sure anyone else stumbling across it found a good answer)

On Wednesday, November 11, 2015 at 10:59:55 AM UTC+1, alexande...@gmail.com wrote:
Hello, So I'm adding a Postgres Enum Type with a migration but I'm having a problem with db/schema.rb output breaking when I do this:

def up
  execute
<<-SQL.squish
     CREATE TYPE three_letters_type AS ENUM
(
       
'A',
       
'B',
       
'C',
       
);
  SQL
  execute
<<-SQL.squish
     ALTER TABLE test
     ADD COLUMN three_letters three_letters_type
;
  SQL
 
end


I end up with the following comments in db/schema.rb -


# Could not dump table "test" because of following StandardError
#   Unknown type 'three_letters_type' for column 'three_letters'

It's quite important for me to be able to use Enums because unique-indexes across several columns are expensive and it's highly preferable not to use t.string (varchar) here. Would be great to hear if there is a work-around for this, thanks.

--
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/ea21716f-0142-47f8-b1fe-b330e87c8370%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Thanks for the info but this is not the case. I already have a blog, with comments etc. My main question is: how to use 'faker' gem to populate data for blog title and comment body? What code should I put in seed.rb?

i.e:

5.times do ([{

what code do I need to put here??

}])


On Sat, Jul 29, 2017 at 5:16 PM, Colin Law <clanlaw@gmail.com> wrote:
On 29 July 2017 at 07:55, K S <k.stulgys@gmail.com> wrote:
> How should the loop look like?
>
> 5 times do...
>
> ???

You know how to create a comment so presumably you can work out how to
create a blog. Do you mean you don't know how to add the comment to
the blog?  This should help, choose the way you want from the several
described in http://guides.rubyonrails.org/association_basics.html#has-many-association-reference.
It is probably worth your while looking through all the guides.

In fact since it seems you are a beginner I suggest working right
through a good tutorial such as railstutorial.org, which is free to
use online.

Colin

>
> On Fri, Jul 28, 2017 at 5:59 PM, Colin Law <clanlaw@gmail.com> wrote:
>>
>> On 28 July 2017 at 01:10,  <k.stulgys@gmail.com> wrote:
>> > I want to populate data between 2 models (blog title and comment body).
>> > In
>> > my example "5.times do..." I'm populating fake data only for my comment
>> > model. How do I populate for both?
>>
>> Create the blog with its title and add the comments to the blog. If
>> you want separate blogs for each comment then put that inside the loop
>> so you create five blogs and comments.
>>
>> Colin
>>
>> >
>> > On Friday, July 28, 2017 at 1:48:49 AM UTC+10, Hassan Schroeder wrote:
>> >>
>> >> On Wed, Jul 26, 2017 at 11:15 PM,  <k.st...@gmail.com> wrote:
>> >>
>> >> > then seed.rb:
>> >> >
>> >> > 5.times do
>> >> >   comment.create([{
>> >> >     name: Faker::jadajada
>> >> >     body: Faker::jadajada
>> >> > }])
>> >> >
>> >> > but how do I include blog title as well?
>> >>
>> >> What exactly are you trying to accomplish? "include" where?
>> >>
>> >> --
>> >> 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-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/5339c5e1-df60-4026-9157-73c28b28ccca%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ruby on Rails: Talk" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/rubyonrails-talk/9bpSWyqujtM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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%3D0gLuDtRkvedUEM9XGrKbHHKefQuTF2fMB59ynT5HMa8MJew%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/CAFNzrsedh4%3D-_CGFW8O1D%3DbFu01xjvFWUSiVOTVfwJgovoVeZg%40mail.gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/9bpSWyqujtM/unsubscribe.
To unsubscribe from this group and all its topics, 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%3D0gLs6m_k%3DF5UdXLVGqBw1HyiArSfjSxOaR6J1CmnZYn7MOQ%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/CAFNzrseChMqv7kNQzt_8A%3D7ByVNN0kFxi-q%3DdWpooSdvNxGsmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On Jul 31, 2017, at 6:07 PM, Allen <allen.wyma@gmail.com> wrote:
>
> I'm currently using Redmine and I have a client website using Ruby on Rails with Devise and both seem to suffer the same problem:
>
> On iOS, both safari and Chrome, the cookie don't seem to be kept after closing the browser window, but on desktop, I haven't had to login for over half a year already.
>
> Is there a special setting I need to set in Rails to remember the cookie? For my devise, I've already have rememberable set on my devise model.
>
> Is there something special I need to do to make this work better on mobile?

Nothing special, just make sure you aren't using session cookies. Those go away when the browser is closed. What's the expiration of the session cookie? (hint, look in config/initializers/session_store.rb)

Mine looks like this:

Codebase::Application.config.session_store :active_record_store, :expire_after => 1.years


Phil

--
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/5C7FA3E4-94C2-4727-AF5E-44C5933F60DD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I'm currently using Redmine and I have a client website using Ruby on Rails with Devise and both seem to suffer the same problem:

On iOS, both safari and Chrome, the cookie don't seem to be kept after closing the browser window, but on desktop, I haven't had to login for over half a year already.

Is there a special setting I need to set in Rails to remember the cookie? For my devise, I've already have rememberable set on my devise model.

Is there something special I need to do to make this work better on mobile?

--
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/cc37b708-538e-4137-b603-5e75e4117325%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Saturday, July 29, 2017 at 6:06:07 AM UTC-4, Mugurel Chirica wrote:
Hello Fugee, if you don't want to spend a few minutes to make your question as complete as you can in order for us to help you, you might be perceived as somebody that is not really interested to get an answer or only asking questions without spending any of his energy to solve them first, even though this is not probably the case.

Take some time to read this SO question, together with some answers to get a better idea of how we as developers should ask for help (from junior to senior).


There are many excellent developers in this group that are very helpful out of their own kindness, so we should try and not waste any of their time.
The time spend (5-10 minutes) that a developer will ask for clarification could be spent on providing a solution when those clarifications are already present.

Cheers.

Please read my new reply to this post

--
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/f77928bb-b308-4ffc-a83a-5a66b25a4ef6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

To ask my "real" question The mailboxer gem stores message tables and models in the gem in tables like message_notification_receipts So this leaves me without a model to mount the uploader with a file field of it's own except for the user; the user's sending the message, but so what, i need to mount the uploader on a model for the message, not the user So then the author of the gem has replied to someone's question that he can use custom class but doesn't  explain in detail and at this stage I'm just trying to conceptualize how it's gonna work Thanks

On Friday, July 28, 2017 at 10:56:54 PM UTC-4, fugee ohu wrote:
I haven't been able to get attachments working with mailboxer Has anyone had the same problem and found a simple solution

--
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/406ea329-561b-4b09-a996-c02c099985ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Sunday, July 30, 2017

i replace the milia line in my Gemfile in a project with:
gem 'milia', github: 'jekuno/milia', branch: 'issue#76
and run bundle install.
but it gives me the following error..

Fetching https://github.com/jekuno/milia.git
fatal: Needed a single revision
Revision issue#76 does not exist in the repository
https://github.com/jekuno/milia.git. Maybe you misspelled it?

why it has occurred? plz help..

--
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/4be229c9-409f-4f12-b211-9846cff4062c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Saturday, July 29, 2017

Hello Fugee, if you don't want to spend a few minutes to make your question as complete as you can in order for us to help you, you might be perceived as somebody that is not really interested to get an answer or only asking questions without spending any of his energy to solve them first, even though this is not probably the case.

Take some time to read this SO question, together with some answers to get a better idea of how we as developers should ask for help (from junior to senior).


There are many excellent developers in this group that are very helpful out of their own kindness, so we should try and not waste any of their time.
The time spend (5-10 minutes) that a developer will ask for clarification could be spent on providing a solution when those clarifications are already present.

Cheers.

--
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/CAL37D8G403Ct-ATENTb%2B2jgbo7XdE7%3DG6pfzMzrkvXXZDSE8zg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 29 July 2017 at 07:55, K S <k.stulgys@gmail.com> wrote:
> How should the loop look like?
>
> 5 times do...
>
> ???

You know how to create a comment so presumably you can work out how to
create a blog. Do you mean you don't know how to add the comment to
the blog? This should help, choose the way you want from the several
described in http://guides.rubyonrails.org/association_basics.html#has-many-association-reference.
It is probably worth your while looking through all the guides.

In fact since it seems you are a beginner I suggest working right
through a good tutorial such as railstutorial.org, which is free to
use online.

Colin

>
> On Fri, Jul 28, 2017 at 5:59 PM, Colin Law <clanlaw@gmail.com> wrote:
>>
>> On 28 July 2017 at 01:10, <k.stulgys@gmail.com> wrote:
>> > I want to populate data between 2 models (blog title and comment body).
>> > In
>> > my example "5.times do..." I'm populating fake data only for my comment
>> > model. How do I populate for both?
>>
>> Create the blog with its title and add the comments to the blog. If
>> you want separate blogs for each comment then put that inside the loop
>> so you create five blogs and comments.
>>
>> Colin
>>
>> >
>> > On Friday, July 28, 2017 at 1:48:49 AM UTC+10, Hassan Schroeder wrote:
>> >>
>> >> On Wed, Jul 26, 2017 at 11:15 PM, <k.st...@gmail.com> wrote:
>> >>
>> >> > then seed.rb:
>> >> >
>> >> > 5.times do
>> >> > comment.create([{
>> >> > name: Faker::jadajada
>> >> > body: Faker::jadajada
>> >> > }])
>> >> >
>> >> > but how do I include blog title as well?
>> >>
>> >> What exactly are you trying to accomplish? "include" where?
>> >>
>> >> --
>> >> 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-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/5339c5e1-df60-4026-9157-73c28b28ccca%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Ruby on Rails: Talk" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/rubyonrails-talk/9bpSWyqujtM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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%3D0gLuDtRkvedUEM9XGrKbHHKefQuTF2fMB59ynT5HMa8MJew%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/CAFNzrsedh4%3D-_CGFW8O1D%3DbFu01xjvFWUSiVOTVfwJgovoVeZg%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/CAL%3D0gLs6m_k%3DF5UdXLVGqBw1HyiArSfjSxOaR6J1CmnZYn7MOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Friday, July 28, 2017

How should the loop look like?

5 times do...

???

On Fri, Jul 28, 2017 at 5:59 PM, Colin Law <clanlaw@gmail.com> wrote:
On 28 July 2017 at 01:10,  <k.stulgys@gmail.com> wrote:
> I want to populate data between 2 models (blog title and comment body). In
> my example "5.times do..." I'm populating fake data only for my comment
> model. How do I populate for both?

Create the blog with its title and add the comments to the blog. If
you want separate blogs for each comment then put that inside the loop
so you create five blogs and comments.

Colin

>
> On Friday, July 28, 2017 at 1:48:49 AM UTC+10, Hassan Schroeder wrote:
>>
>> On Wed, Jul 26, 2017 at 11:15 PM,  <k.st...@gmail.com> wrote:
>>
>> > then seed.rb:
>> >
>> > 5.times do
>> >   comment.create([{
>> >     name: Faker::jadajada
>> >     body: Faker::jadajada
>> > }])
>> >
>> > but how do I include blog title as well?
>>
>> What exactly are you trying to accomplish? "include" where?
>>
>> --
>> 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-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/5339c5e1-df60-4026-9157-73c28b28ccca%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/9bpSWyqujtM/unsubscribe.
To unsubscribe from this group and all its topics, 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%3D0gLuDtRkvedUEM9XGrKbHHKefQuTF2fMB59ynT5HMa8MJew%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/CAFNzrsedh4%3D-_CGFW8O1D%3DbFu01xjvFWUSiVOTVfwJgovoVeZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I haven't been able to get attachments working with mailboxer Has anyone had the same problem and found a simple solution

--
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/1fbc2f72-e6c7-4467-9a0c-0c313704073d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 28 July 2017 at 01:10, <k.stulgys@gmail.com> wrote:
> I want to populate data between 2 models (blog title and comment body). In
> my example "5.times do..." I'm populating fake data only for my comment
> model. How do I populate for both?

Create the blog with its title and add the comments to the blog. If
you want separate blogs for each comment then put that inside the loop
so you create five blogs and comments.

Colin

>
> On Friday, July 28, 2017 at 1:48:49 AM UTC+10, Hassan Schroeder wrote:
>>
>> On Wed, Jul 26, 2017 at 11:15 PM, <k.st...@gmail.com> wrote:
>>
>> > then seed.rb:
>> >
>> > 5.times do
>> > comment.create([{
>> > name: Faker::jadajada
>> > body: Faker::jadajada
>> > }])
>> >
>> > but how do I include blog title as well?
>>
>> What exactly are you trying to accomplish? "include" where?
>>
>> --
>> 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-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/5339c5e1-df60-4026-9157-73c28b28ccca%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%3D0gLuDtRkvedUEM9XGrKbHHKefQuTF2fMB59ynT5HMa8MJew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Thursday, July 27, 2017

I want to populate data between 2 models (blog title and comment body). In my example "5.times do..." I'm populating fake data only for my comment model. How do I populate for both?

On Friday, July 28, 2017 at 1:48:49 AM UTC+10, Hassan Schroeder wrote:
On Wed, Jul 26, 2017 at 11:15 PM,  <k.st...@gmail.com> wrote:

> then seed.rb:
>
> 5.times do
>   comment.create([{
>     name: Faker::jadajada
>     body: Faker::jadajada
> }])
>
> but how do I include blog title as well?

What exactly are you trying to accomplish? "include" where?

--
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-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/5339c5e1-df60-4026-9157-73c28b28ccca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails



On Thu, Jul 27, 2017 at 8:10 PM, DHH <da...@loudthinking.com> wrote:
That article is a joke. Of course Rails training is not as much in demand as it was when it was brand new and nobody knew how to work with it. But to think that the change in that has anything to do with the rise of J2EE/Spring?! Come on.

On Wednesday, July 26, 2017 at 10:54:58 PM UTC-5, vedant agarwala wrote:
Hello people,

I was mildly shocked to read this article:

https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1

Wanted to know what you think. 

I kind of agree with the front-end becoming more relevant argument, but projects being started on spring instead of rails. Is it really true, or more importantly, could it be better ?
Rails is already embracing JavaScript and SPAs with webpacker.

This article wrote that java is challenging for new devs. Seriously? Java is easier than Ruby?!

I am a big fan of rails, and personally hate java. But my opinion is quite biased. Rails is the only web framework I've on since I started 5 years ago. So what do you think about the article.

Cheers,
Vedant.

It's drivel. What difference does the market use of a tool make to people learning to code from a standing start. Unis still teach Logo and Fortran (among other esoteric anachronisms).

I've worked at (and set up) a fair share of code-bootcamps. Pandering to the "employers want Java" camp just causes the "employers want .Net" camp to scream louder.
The fact of the matter is, the students need to learn to code. Ruby is a good language for that (as are others), and whether or not it's a saleable skill after 10/12/14 weeks of study is irrelevant. The students on the boot camps are taking the first steps in learning to code - often from having never *ever* tried to code before - and if they get a job at the end of the course that they need to be familar with Java (or any other language) for, at the level they're at, it's a trivial task for them to come up to the same level they are at in whatever language they studied on their boot camp.


 

--
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/08fafaa9-0868-4276-be8c-de93d1d6b604%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails


At enterprise, I observed that they want to save money for maintenance process. 

What I mean to say suppose, we want to upgrade to Rails version from 3 to 4 or 4 to 5, then they want code changes or development activity to be done faster. 

Like in the case of Java they see the benefit of Java backward compatibility feature. 

I think if Rails community is able to solve backward compatibility(while doing upgrade process) with no code changes required by the developers(who will be pulled out of other projects in the enterprise to work on immediate basis) then it will move far ahead in convincing enterprise to use it more and more.

It's the same way Rails community solved the problem of installing gems and their dependencies via Bundler.

I might be wrong with my observation. Will be more than happy to further get enlightened.

Thanks & Regards,
Ankur Gera


On Thu, Jul 27, 2017 at 2:01 PM, Karthikeyan A K <77minds@gmail.com> wrote:

On Thu, Jul 27, 2017 at 11:25 PM, vedant agarwala <vedant@voggle.co> wrote:
Yeah that's an interesting insight- no need for rails training as much now.

And I have moved this discussion to the right group.

Has anyone else read the article: https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1 ? Were you shocked as well.

Regards,
Vedant.

On Thu, Jul 27, 2017 at 8:10 PM, DHH <david@loudthinking.com> wrote:
That article is a joke. Of course Rails training is not as much in demand as it was when it was brand new and nobody knew how to work with it. But to think that the change in that has anything to do with the rise of J2EE/Spring?! Come on.

Anyway, this list is for discussing the implementation of the Rails framework. You can use rubyonrails-talk for general discussions. 


On Wednesday, July 26, 2017 at 10:54:58 PM UTC-5, vedant agarwala wrote:
Hello people,

I was mildly shocked to read this article:

https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1

Wanted to know what you think. 

I kind of agree with the front-end becoming more relevant argument, but projects being started on spring instead of rails. Is it really true, or more importantly, could it be better ?
Rails is already embracing JavaScript and SPAs with webpacker.

This article wrote that java is challenging for new devs. Seriously? Java is easier than Ruby?!

I am a big fan of rails, and personally hate java. But my opinion is quite biased. Rails is the only web framework I've on since I started 5 years ago. So what do you think about the article.

Cheers,
Vedant.


--
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/CAMSb8QTde101xWNgm9Z6YhWbhFXNLQKbi5No2G%3DGqGymSyjLog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Karthikeyan A K

--
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/CAJR%2B9kYTCt%2B4dKPhwmf4uVC1eMfS5vtGihrYNYWWeKZdko4Qng%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/CAM4Zu6tcykNP0TjF7muAxMCwQtfXcxnBABn_KrE_qaOE6861ZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails


On Thu, Jul 27, 2017 at 11:25 PM, vedant agarwala <vedant@voggle.co> wrote:
Yeah that's an interesting insight- no need for rails training as much now.

And I have moved this discussion to the right group.

Has anyone else read the article: https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1 ? Were you shocked as well.

Regards,
Vedant.

On Thu, Jul 27, 2017 at 8:10 PM, DHH <david@loudthinking.com> wrote:
That article is a joke. Of course Rails training is not as much in demand as it was when it was brand new and nobody knew how to work with it. But to think that the change in that has anything to do with the rise of J2EE/Spring?! Come on.

Anyway, this list is for discussing the implementation of the Rails framework. You can use rubyonrails-talk for general discussions. 


On Wednesday, July 26, 2017 at 10:54:58 PM UTC-5, vedant agarwala wrote:
Hello people,

I was mildly shocked to read this article:

https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1

Wanted to know what you think. 

I kind of agree with the front-end becoming more relevant argument, but projects being started on spring instead of rails. Is it really true, or more importantly, could it be better ?
Rails is already embracing JavaScript and SPAs with webpacker.

This article wrote that java is challenging for new devs. Seriously? Java is easier than Ruby?!

I am a big fan of rails, and personally hate java. But my opinion is quite biased. Rails is the only web framework I've on since I started 5 years ago. So what do you think about the article.

Cheers,
Vedant.


--
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/CAMSb8QTde101xWNgm9Z6YhWbhFXNLQKbi5No2G%3DGqGymSyjLog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Karthikeyan A K

--
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/CAJR%2B9kYTCt%2B4dKPhwmf4uVC1eMfS5vtGihrYNYWWeKZdko4Qng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Yeah that's an interesting insight- no need for rails training as much now.

And I have moved this discussion to the right group.

Has anyone else read the article: https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1 ? Were you shocked as well.

Regards,
Vedant.

On Thu, Jul 27, 2017 at 8:10 PM, DHH <david@loudthinking.com> wrote:
That article is a joke. Of course Rails training is not as much in demand as it was when it was brand new and nobody knew how to work with it. But to think that the change in that has anything to do with the rise of J2EE/Spring?! Come on.

Anyway, this list is for discussing the implementation of the Rails framework. You can use rubyonrails-talk for general discussions. 


On Wednesday, July 26, 2017 at 10:54:58 PM UTC-5, vedant agarwala wrote:
Hello people,

I was mildly shocked to read this article:

https://thenextweb.com/dd/2017/07/26/ruby-rails-major-coding-bootcamp-ditches-due-waning-interest/?amp=1

Wanted to know what you think. 

I kind of agree with the front-end becoming more relevant argument, but projects being started on spring instead of rails. Is it really true, or more importantly, could it be better ?
Rails is already embracing JavaScript and SPAs with webpacker.

This article wrote that java is challenging for new devs. Seriously? Java is easier than Ruby?!

I am a big fan of rails, and personally hate java. But my opinion is quite biased. Rails is the only web framework I've on since I started 5 years ago. So what do you think about the article.

Cheers,
Vedant.


--
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/CAMSb8QTde101xWNgm9Z6YhWbhFXNLQKbi5No2G%3DGqGymSyjLog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On 27 July 2017 at 08:23, Indrajeet Mishra
<indrajeetmishra7590@gmail.com> wrote:
> I have a created rails application google oauth login using google ominoauth
> gem, it seems working fine on web.
> Wrap this application in android app using webview but in android app Google
> login not working. it raise error :=> 403 disallowed user_agent.

How can you wrap a rails app in android? Rails does not run under
android does it?

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%3D0gLtWwDTRft-do4hgri7w-vF7UrWLrV756Z3iNKCxRMKybA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Jul 26, 2017 at 11:15 PM, <k.stulgys@gmail.com> wrote:

> then seed.rb:
>
> 5.times do
> comment.create([{
> name: Faker::jadajada
> body: Faker::jadajada
> }])
>
> but how do I include blog title as well?

What exactly are you trying to accomplish? "include" where?

--
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/CACmC4yDY4P748-dFuhgXZvA6AN2gU%3DgCiXMmDLfX%3DUM7KtO7gw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I have a created rails application google oauth login using google ominoauth gem, it seems working fine on web.
Wrap this application in android app using webview but in android app Google login not working. it raise error :=> 403 disallowed user_agent.

please go through the link to get more details.

https://stackoverflow.com/questions/43152411/google-oauth2-in-embedded-browser-web-view

--
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/17118391-bf81-407c-a002-41aa4c2408fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails Wednesday, July 26, 2017

This is close to what I want, I think.

Where does the "@mailer_name = caller_locations(1,1)[0].label " go?  In a controller?  In a view?

What I really want is to not have to modify the source modules that are invoking the rendering but, instead, have the _header.html.erb source module dynamically say "I got invoked by root.html.erb".

Things get a bit more dicey, I think, if the sequence is
  root.html.erb
  appllication.html.erb     (authomagically invoked)
  root.html.erb

Thoughts?
 



On Thursday, July 27, 2017 at 12:23:37 AM UTC-6, Phil wrote:

> On Jul 26, 2017, at 8:58 PM, Ralph Shnelvar <ral...@dos32.com> wrote:
>
> Is the a convenient programatic way for a partial to know what view (controller?) is causing it to be rendered?
>
> For debugging purposes I want the partial to render the name of the view causing the partial to be rendered..
>
> Ralph


I've done stuff stuff like this to pass in, to say, a mailer view to know how it is being called.  Some variation of that might work for you:

@mailer_name = caller_locations(1,1)[0].label

Hope that helps.


Phil

--
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/f5292800-17ef-499f-8be8-e6b34cb2fab8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On Jul 26, 2017, at 8:58 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:
>
> Is the a convenient programatic way for a partial to know what view (controller?) is causing it to be rendered?
>
> For debugging purposes I want the partial to render the name of the view causing the partial to be rendered..
>
> Ralph


I've done stuff stuff like this to pass in, to say, a mailer view to know how it is being called. Some variation of that might work for you:

@mailer_name = caller_locations(1,1)[0].label

Hope that helps.


Phil

--
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/E97512B7-C3C2-466F-BD88-ED860C63B3E1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hi, how do I push fake data with faker when I have:

blog
title:string 

and

comment
name:string
body:text_field

comments belongs_to :blog

then seed.rb:

5.times do
  comment.create([{
    name: Faker::jadajada
    body: Faker::jadajada
}])

but how do I include blog title as well? There should be some kind of nesting?







--
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/fbfd0b3d-fabb-433d-a505-1dd8bf76868a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wednesday, July 26, 2017 at 3:24:19 PM UTC+1, Jason FB wrote:

>
> The exception we see is simply ActionController::InvalidAuthenticityToken on normal logins to our website. Upon careful examination of the authenticity_token sent by the form and the session's _csrf_token (we are using active_record_store as our session_store setting), they just don't match. Upon direct examination, I can conclude only that they are completely different tokens, but I don't know why. 


First off, it's normal for those values not to match on rails >= 4.2 ( because of csrf token masking), but that doesn't apply here

One case I've seen is race conditions creating the session: if the browser requests 2 pages at roughly the same time, before the session has been set, then both of those responses will contain a different session cookie, and one of those pages will be using the wrong one. When using the cookie session store this race condition can also happen at the point that the csrf token is first set (I believe this won't happen until you first render a page with a form)

Can you confirm from your logs whether that is a plausible explanation?

Fred

--
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/aa959aef-d190-4a70-9ff8-72c577e3c3e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

I think rack-mini-profiler should fit the bill. It shows the queries you executed and layouts you rendered.

--
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/CAA6WWt-zJGO3vzqTrW%2Bgm5wSEKp2yka3daXku3FQBf06wc4guQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Is the a convenient programatic way for a partial to know what view (controller?) is causing it to be rendered?

For debugging purposes I want the partial to render the name of the view causing the partial to be rendered..

Ralph

--
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/e1777685-61f0-4b40-acd9-48141bb2eb35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Jul 26, 2017 at 11:38 AM, Walter Lee Davis <waltd@wdstudio.com> wrote:
> Not since several versions ago. They heard your displeasure and did something about it.

Well in that case -- nnnnevermind 😀

Still, I prefer the flexibility of having a proxy in front of Unicorn or
Puma since I can strip out nonsense requests like "/phpmyadmin"
before they pollute my Rails logs (among other things).

Setting that up is a whole new learning though, and may not be all
that helpful for anyone who's already happy with Passenger.

--
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/CACmC4yCkXQhE9uG3o9oMOEtoFG3dd%3DV14LaC%3DTn%2BE%2BBrjJQxnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On Jul 26, 2017, at 1:35 PM, Ralph Shnelvar <ralphs@dos32.com> wrote:
>
> Hassan:
>
> 1) Does Passenger dump that sensitive data in development?
>
> 2 How hard is it to remove Passenger? What are the downsides to removing it?

You have to replace it with *something* -- Unicorn, Puma, basically another app server. Rails won't do much besides talk to Rack, to reach the outside world, you need something that implements call() and writes out headers and body to stdout.

Walter

>
> Ralph
>
>
> On Wednesday, July 26, 2017 at 11:29:28 AM UTC-6, Hassan Schroeder wrote:
> On Wed, Jul 26, 2017 at 7:57 AM, Ralph Shnelvar <ral...@dos32.com> wrote:
> > I think Passenger is running
>
> Yep, looks like.
>
> > I've read overviews about Passenger ... but I still don't get what it does.
> > Does it sit between Apache (httpd) and Rails? What does it do that Apache
> > (httpd) doesn't do?
>
> Apache httpd handles different kinds of requests and responses
> through modules -- static file serving, directory listing, proxy via
> http, ajp, etc. Passenger provides a rack interface which is what
> Rails uses to talk to the outside world (and which is provided by
> webrick, puma, unicorn, thin, etc.).
>
> I'm not a Passenger fan after discovering that any startup error in
> production dumps a page full of sensitive data out for anyone to
> see, which seems utterly braindead...
>
> --
> 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-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/0109da1d-823a-4928-9e2c-4fac111d1bbb%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/5BAF4D2A-D0D0-4F67-BEDA-6989CB0F1EBE%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Not since several versions ago. They heard your displeasure and did something about it.

Walter

> On Jul 26, 2017, at 1:28 PM, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:
>
> I'm not a Passenger fan after discovering that any startup error in
> production dumps a page full of sensitive data out for anyone to
> see, which seems utterly braindead...

--
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/20B29F30-9976-4626-95BE-FA01290D347E%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

Hassan:

1) Does Passenger dump that sensitive data in development?

2 How hard is it to remove Passenger?  What are the downsides to removing it?

Ralph


On Wednesday, July 26, 2017 at 11:29:28 AM UTC-6, Hassan Schroeder wrote:
On Wed, Jul 26, 2017 at 7:57 AM, Ralph Shnelvar <ral...@dos32.com> wrote:
> I think Passenger is running

Yep, looks like.

> I've read overviews about Passenger ... but I still don't get what it does.
> Does it sit between Apache (httpd)  and Rails?  What does it do that Apache
> (httpd) doesn't do?

Apache httpd handles different kinds of requests and responses
through modules -- static file serving, directory listing, proxy via
http, ajp, etc. Passenger provides a rack interface which is what
Rails uses to talk to the outside world (and which is provided by
webrick, puma, unicorn, thin, etc.).

I'm not a Passenger fan after discovering that any startup error in
production dumps a page full of sensitive data out for anyone to
see, which seems utterly braindead...

--
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-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/0109da1d-823a-4928-9e2c-4fac111d1bbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

On Wed, Jul 26, 2017 at 7:57 AM, Ralph Shnelvar <ralphs@dos32.com> wrote:
> I think Passenger is running

Yep, looks like.

> I've read overviews about Passenger ... but I still don't get what it does.
> Does it sit between Apache (httpd) and Rails? What does it do that Apache
> (httpd) doesn't do?

Apache httpd handles different kinds of requests and responses
through modules -- static file serving, directory listing, proxy via
http, ajp, etc. Passenger provides a rack interface which is what
Rails uses to talk to the outside world (and which is provided by
webrick, puma, unicorn, thin, etc.).

I'm not a Passenger fan after discovering that any startup error in
production dumps a page full of sensitive data out for anyone to
see, which seems utterly braindead...

--
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/CACmC4yDcQ_xgTmX3BNgbzRR%2B0WbE9iheSfVUePqpd8Kmnc0%2BNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Ruby on Rails

> On Jul 26, 2017, at 10:24 AM, Jason FB <tech@datatravels.com> wrote:
>
> https://stackoverflow.com/questions/45329731/csrf-tokens-to-not-match-what-is-in-session-rails-4-1
>
>
> We are seeing an unfortunate and likely browser-based CSRF token authenticity problem in our Rails 4.1 app. We are posting it here to ask the community if others are seeing it too.
>
> Please be aware that most error reporting tools — like Honeybadger — automatically suppress ActionController::InvalidAuthenticityToken, so you don't normally see the problem in your error reporting tool unless you go out of your way to see it.
>
> Here's the problem, and this is NOT a development issue — it is a production issue that has yet to be diagnosed.
>
> The exception we see is simply ActionController::InvalidAuthenticityToken on normal logins to our website. Upon careful examination of the authenticity_token sent by the form and the session's _csrf_token (we are using active_record_store as our session_store setting), they just don't match. Upon direct examination, I can conclude only that they are completely different tokens, but I don't know why.
>
> This is not a simple newbie developer question, please DO NOT answer with basic answers about how the CSRF token needs to be passed from the client to the server, or how to skip forgery protection on my controllers. I am not interested hearing from anyone with either of those two answers: You don't know what you're talking about and you don't understand the depth and complexity of the issue. I am only interested in hearing from people with high-traffic websites who have can confirm this is happening on a non-insignificant number of visitors (and strangely seems to affect certain browsers more often than other browsers.)
>
> We see this problem broadly, maybe about 1-2% of our high traffic website. I see it only in Production, I am unable to reproduce it in development whatsoever.
>
> I see it on IE 11 and Edge browsers most (you will note Rails 4.1 was released before IE 11 and Edge), but also on Chrome on Android and occasionally mobile Safari too.
>

I had a similar issue with tokens, and we narrowed it down to people opening a login page and leaving that page open long enough for the token to become stale. There may be a setting to allow this to be longer, but in our case, we had to work around the issue in the controller. (Worked for us because we had another layer of security surrounding the page itself, don't recommend our solution for anyone else.)

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/249c094c-8049-4061-8ba3-b8c38ef1ae1d%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/C1679021-C282-453E-90C9-7B5A3207FD27%40wdstudio.com.
For more options, visit https://groups.google.com/d/optout.