Travis-42

Activity Graph

Page 1 of 3 | Next »

2019-07-23

[02:23:16] Travis-42: Quit: Connection closed for inactivity

2019-07-22

[17:23:34] Travis-42: has joined #RubyOnRails

2019-05-14

[15:46:39] Travis-42: has joined #RubyOnRails
[15:47:43] Travis-42: Is there any way to apply CSS styling to the iframe created in ActionMailer::Preview, but not apply it to the actual email? I'd like to apply some of the default styling that gmail uses so it more closely resembles what a gmail user would see, without actually applying those styles to the email.
[21:57:01] Travis-42: Quit: Connection closed for inactivity

2019-05-10

[14:52:34] Travis-42: has joined #RubyOnRails
[14:53:40] Travis-42: In rails 6, the default is to use webpacker for js, and sprockets for css/images. If you want to stick with this approach, how would you use something like bootstrap that comes with css and javascript?
[14:58:01] Travis-42: sure, I guess, but then aren't I fighting rails again? for example, if I use action text, it'll install trix via yarn
[15:19:20] Travis-42: so, what's the expected approach in rails 6 to using third party javascript that has vendor CSS (like bootstrap), is it to use both stylesheet_tag and stylesheet_pack_tag? or migrate to webpacker entirely?
[21:22:11] Travis-42: Quit: Connection closed for inactivity

2019-03-14

[16:31:36] Travis-42: has joined #RubyOnRails
[18:41:16] Travis-42: Quit: Connection closed for inactivity

2019-02-10

[01:33:17] Travis-42: Quit: Connection closed for inactivity

2019-02-09

[23:03:46] Travis-42: has joined #RubyOnRails

2019-01-07

[17:53:09] Travis-42: has joined #RubyOnRails
[17:53:54] Travis-42: in a rails application template, is there a way to detect options set in the command line (such as "--webpack=react" so that the template can respond accordingly?
[21:01:46] Travis-42: Quit: Connection closed for inactivity

2018-12-04

[17:52:40] Travis-42: has joined #RubyOnRails
[17:54:46] Travis-42: I'm using a rails application template to generate new rails applications, and I noticed that it's possible to apply to existing applications as well with "rails app:template". I tried it out, but it seems like it skips after_bundle. Is there a way to the template to detect if it's being used in a new or existing template?
[18:10:16] Travis-42: ah, that's pretty simple, that makes sense
[18:11:54] Travis-42: Or at least something like it should work I think. Since after_bundle typically happens last, I'd need some way to check at the very end, I guess.
[21:11:48] Travis-42: Quit: Connection closed for inactivity

2018-11-30

[03:34:38] Travis-42: Quit: Connection closed for inactivity

2018-11-20

[18:28:59] Travis-42: has joined #RubyOnRails
[18:29:56] Travis-42: I'm playing around with a new rails 5.2 app and active job, and when I queue an activejob, it seems to work (I see the "Enqueued AJob to Async(default)" message). But it never seems to actually run. What may I have done wrong?
[20:37:09] Travis-42: Quit: Connection closed for inactivity

2018-10-18

[18:21:13] Travis-42: has joined #RubyOnRails
[18:22:02] Travis-42: I'm creating a Rails application template, and I want it to fail if a command like "insert_into_file" isn't successful (Because it can't find the text to insert after). Is there a straightforward way to do that?
[22:10:30] Travis-42: Quit: Connection closed for inactivity

2018-07-19

[05:29:50] Travis-42: Ping timeout: 276 seconds

2018-07-18

[05:16:29] Travis-42: *.net *.split
[05:35:17] Travis-42: has joined #ruby
[05:35:19] Travis-42: has joined #RubyOnRails

2018-06-20

[03:51:48] Travis-42: Ping timeout: 276 seconds
[05:27:45] Travis-42: has joined #RubyOnRails
[05:27:49] Travis-42: has joined #ruby
[05:57:59] Travis-42: Ping timeout: 256 seconds
[06:22:39] Travis-42: has joined #RubyOnRails
[06:22:43] Travis-42: has joined #ruby
[06:23:57] Travis-42: Max SendQ exceeded
[06:24:34] Travis-42: has joined #RubyOnRails
[06:24:39] Travis-42: has joined #ruby
[06:25:33] Travis-42: Max SendQ exceeded
[06:27:10] Travis-42: has joined #RubyOnRails
[06:27:15] Travis-42: has joined #ruby

2018-06-12

[15:26:45] Travis-42: I'm trying to use the rails cache helper when building a large xml response for a feed, but if I use caching, memory usage quickly grows out of bounds by hundreds of megabytes per request -- almost all on this line of the rails cache helper when writing an uncached fragment "fragment = output_buffer.slice!(pos..-1)" -- is there a more efficient way of caching fragments of xml responses?

2018-06-11

[23:06:40] Travis-42: I'm using the rails cache helper to cache some xml in the xml builder, but I'm finding that when I use it, memory usage is ballooning when writing to the cache (it's a big xml file) compared with not using the cache all. Has anyone encountered this? might there be a way to make this more efficient or not use up memory?

2018-06-01

[03:44:47] Travis-42: *.net *.split
[07:47:37] Travis-42: has joined #ruby
[07:47:38] Travis-42: has joined #RubyOnRails

2018-05-29

[02:47:15] Travis-42: *.net *.split
[02:47:48] Travis-42: has joined #RubyOnRails
[02:48:07] Travis-42: has joined #ruby

2018-05-06

[16:49:01] Travis-42: has joined #RubyOnRails
[16:49:03] Travis-42: has joined #ruby
[16:51:53] Travis-42: has joined #RubyOnRails
[16:51:53] Travis-42: has joined #ruby
[16:51:53] Travis-42: Changing host

2018-04-25

[12:25:58] Travis-42: *.net *.split
[12:27:19] Travis-42: has joined #ruby
[12:27:33] Travis-42: has joined #RubyOnRails
[15:01:29] Travis-42: *.net *.split
[15:03:05] Travis-42: has joined #RubyOnRails
[15:03:18] Travis-42: has joined #ruby

2018-04-11

[20:28:34] Travis-42: *.net *.split

2018-03-02

[04:14:07] Travis-42: has joined #RubyOnRails
[04:14:09] Travis-42: has joined #ruby

2018-02-28

[23:16:42] Travis-42: Read error: Connection reset by peer
[23:16:53] Travis-42: has joined #RubyOnRails
[23:16:56] Travis-42: has joined #ruby

2018-02-22

[12:51:26] Travis-42: Ping timeout: 255 seconds
[12:53:26] Travis-42: has joined #RubyOnRails
[12:53:36] Travis-42: has joined #ruby

2018-02-09

[13:39:28] Travis-42: has joined #RubyOnRails
[13:39:39] Travis-42: has joined #ruby

2018-01-18

[01:55:16] Travis-42: *.net *.split
[01:56:30] Travis-42: has joined #ruby
[01:56:32] Travis-42: has joined #RubyOnRails

2017-12-29

[01:53:41] Travis-42: Read error: Connection reset by peer
[01:54:49] Travis-42: has joined #ruby
[01:54:51] Travis-42: has joined #RubyOnRails

2017-12-27

[19:13:28] Travis-42: Read error: Connection reset by peer
[19:42:40] Travis-42: has joined #ruby
[19:42:42] Travis-42: has joined #RubyOnRails

2017-12-12

[08:42:00] Travis-42: Ping timeout: 258 seconds
[08:44:31] Travis-42: has joined #ruby
[08:44:33] Travis-42: has joined #RubyOnRails

2017-12-07

[14:48:10] Travis-42: *.net *.split
[14:54:16] Travis-42: has joined #ruby

2017-12-06

[08:11:48] Travis-42: Ping timeout: 240 seconds
[08:14:06] Travis-42: has joined #ruby
[08:14:08] Travis-42: has joined #RubyOnRails

2017-12-01

[02:28:37] Travis-42: has joined #ruby

2017-11-30

[10:09:58] Travis-42: *.net *.split
[10:15:25] Travis-42: has joined #RubyOnRails
[10:15:25] Travis-42: has joined #ruby
[10:15:54] Travis-42: Max SendQ exceeded
[10:16:19] Travis-42: has joined #ruby
[10:16:21] Travis-42: has joined #RubyOnRails

2017-11-27

[11:54:22] Travis-42: Ping timeout: 264 seconds
[11:55:29] Travis-42: has joined #ruby
[11:55:32] Travis-42: has joined #RubyOnRails

2017-09-19

[06:05:26] Travis-42: *.net *.split
[06:07:35] Travis-42: has joined #ruby
[06:07:37] Travis-42: has joined #RubyOnRails

2017-06-20

[00:17:39] Travis-42: *.net *.split
[00:22:41] Travis-42: has joined #RubyOnRails

2017-06-08

[21:56:24] Travis-42: in a rails integration test, when testing a GET request, is there a way to set the request body?
[22:01:00] Travis-42: arup_r: I understand, but sometimes there are cases made for passing params via the body because for most servers, there is a maximum uri length. For instance Elasticsearch search functions via a GET method via the request body (but also accepts POST, if your client can't send a body with a GET request)
[22:06:18] Travis-42: arup_r: hmm, I get "unknown keyword: body", maybe I configured something else wrong

2017-05-24

[00:01:07] Travis-42: Ping timeout: 240 seconds
[00:02:54] Travis-42: has joined #ruby
[00:02:56] Travis-42: has joined #RubyOnRails

2017-05-09

[10:00:08] Travis-42: has joined #ruby
[10:00:10] Travis-42: has joined #RubyOnRails

2017-04-08

[13:42:45] Travis-42: has joined #RubyOnRails
[13:42:45] Travis-42: has joined #ruby
[13:43:41] Travis-42: Every time I try to use ruby with the watir gem, I get the mac os popup about allowing incoming network connections. Regardless of what I choose, it happens again the next time. It seems like Mac OS is not recognizing the ruby executable each time. Is there any way to fix this?

2017-03-30

[17:59:36] Travis-42: Ping timeout: 276 seconds

2016-07-03

[10:37:53] Travis-42: has joined #RubyOnRails
[10:37:53] Travis-42: has joined #ruby

2016-07-02

[05:04:52] Travis-42: *.net *.split

2016-06-23

[20:27:34] Travis-42: *.net *.split
[20:32:34] Travis-42: has joined #RubyOnRails
[20:32:34] Travis-42: has joined #ruby

2016-06-16

[15:59:30] Travis-42: deal with this?
[15:59:30] Travis-42: I have a class constant that looks something like "FILTERS = { :existing => [ { missing: { field: 'deleted_at' } } ] }" -- I want in some particular cases get the :existing value from filters, and then modify the field value, but I keep modifying the actual class value. dup/clone only do shallow copies and so don't really help. What is an appropriate way to
[16:06:54] Travis-42: ljarvis: I don't want to modify the constant, obviously, I want to take the value, which in this case is [ { missing: { field: 'deleted_at' } } ] and use a modified version of that
[16:07:43] Travis-42: right now, I'm basically calling dup at each level of nesting when I copy/modify it
[16:09:34] Travis-42: ah, maybe I'll just leverage their method
[16:10:16] Travis-42: thank you tore

2016-06-15

[17:01:06] Travis-42: Ping timeout: 250 seconds
[17:02:51] Travis-42: has joined #RubyOnRails
[17:02:51] Travis-42: has joined #ruby

2016-06-10

[00:18:28] Travis-42: Ping timeout: 264 seconds
[00:22:10] Travis-42: has joined #RubyOnRails
[00:22:10] Travis-42: has joined #ruby

2016-06-09

[05:23:24] Travis-42: Ping timeout: 250 seconds
[05:30:55] Travis-42: has joined #RubyOnRails
[05:30:55] Travis-42: has joined #ruby

2016-05-25

[19:38:19] Travis-42: has joined #ruby
[19:39:01] Travis-42: In recent versions of ruby, is there a difference between declaring module myModule; class myClass; vs class myModule::myClass ? Some sources I found seemed to indicate yes, others no
[19:42:26] Travis-42: I saw in the rails source that all modules were explicitly declared on a separate line, but that didn't seem to be the case for some other popular ruby projects I found
[19:45:08] Travis-42: yea ok, that's kind of what I thought, but I couldn't find any consistent answers

2016-05-18

[09:20:24] Travis-42: Ping timeout: 260 seconds
[09:20:44] Travis-42: has joined #RubyOnRails
[14:10:23] Travis-42: Is there any current well supported method of connecting to Amazon RedShift with ActiveRecord (there is a somewhat unmaintained hacky looking solution for rails 4, nothing for rails 5 that I could find)? Or is the best solution at the moment still just to connect directly with PG?

2016-05-05

[20:35:15] Travis-42: Is there any decent way to put together a query chaining multiple UNIONs in the context of ActiveRecord? I can do find_by_sql, but then I can't easily apply any other scopes or order/limits
[20:36:38] Travis-42: fox_mulder_cp: can you use a scope to UNION queries?

2016-05-03

[07:58:16] Travis-42: Ping timeout: 276 seconds
[08:05:44] Travis-42: has joined #RubyOnRails

2016-04-21

[17:19:15] Travis-42: *.net *.split
[17:25:46] Travis-42: has joined #RubyOnRails

2016-04-19

[16:23:33] Travis-42: has joined #RubyOnRails

2016-03-11

[14:52:26] Travis-42: has joined #RubyOnRails
[14:54:07] Travis-42: Does anyone know what needs to be done in Rails 4.2 to make mailer previews accessible on a staging server? I’ve tried setting show_previews = true, making MailersController think it’s a local_request, but I still get a 404
[15:38:41] Travis-42: Quit: Travis-42

2016-02-06

[23:39:17] Travis-42: has joined #RubyOnRails
[23:42:50] Travis-42: Read error: Connection reset by peer

2016-02-04

[03:05:02] Travis-42: has joined #RubyOnRails
[03:06:49] Travis-42: this may be a bit strange, but I wanted to be able to try to check in precompiled assets and the cache in a way that if assets:precompile was run on a different machine, it wouldn???t recalculate everything and take the full amount of time. But even if I check in public/assets and tmp/cache/assets, assets:precompile still seems to take the full amount of time on a new machine. Is there something else I could do?
[04:13:00] Travis-42: Quit: Travis-42

2015-10-18

[01:46:22] Travis-42: has joined #RubyOnRails
[01:46:26] Travis-42: Client Quit
[01:46:39] Travis-42: has joined #RubyOnRails
[01:48:19] Travis-42: I have a link tag with about a dozen attributes attached to it, that is rendered using link_to about 20 times on a page. It turns out, this allocates over a megabyte of memory on each page view, which is pretty high. Does this seem normal? Might it be better to just use plain html?
[01:52:03] Travis-42: wilsonc91: it would help if you could include the whole file, or at least the output that you see
[01:56:26] Travis-42: which is the line outputting the TestSupportFile? I don???t see the context of where it comes from
[01:57:43] Travis-42: this line, looks odd: <%= f.object.test_support_files do |tsf| %> it seems that it should be something more like, <% f.object.test_support_files.each do |tsf| %>
[01:58:04] Travis-42: it looks like you???re outputting ???f.object.test_support_files???
[01:58:15] Travis-42: instead of looping through it
[02:51:45] Travis-42: Quit: Travis-42
[03:03:49] Travis-42: has joined #RubyOnRails
[03:04:05] Travis-42: Client Quit

2015-09-24

[01:29:47] Travis-42: has joined #ruby
[01:41:55] Travis-42: would there be any reasonable way to have a method from a parent class, take on the scope of the classes that inherit it? as an example, https://gist.github.com/anonymous/020dc114301d9dcb4f53 ? Or am I likely thinking about this completely incorrectly?
[01:50:44] Travis-42: ah mwlang, that makes sense. I see how the scope gets applied there, thank you
[02:46:26] Travis-42: Quit: Travis-42
[11:30:38] Travis-42: has joined #ruby
[11:38:30] Travis-42: Quit: Travis-42
[11:39:10] Travis-42: Client Quit
[11:39:10] Travis-42: has joined #ruby

2015-09-08

[21:28:32] Travis-42: Quit: Connection closed for inactivity

2015-09-07

[02:15:27] Travis-42: *.net *.split

2015-09-03

[03:27:30] Travis-42: Read error: Connection reset by peer
[03:27:51] Travis-42: has joined #RubyOnRails

2015-09-01

[21:25:05] Travis-42: has joined #RubyOnRails
[21:43:48] Travis-42: gambl0re: have you looked inside application.css?
[21:45:23] Travis-42: gambl0re: did you look in your browser's html inspector and see what styles were being applied to it?
[21:46:28] Travis-42: although, I don't think container applies a margin. This may not really be a rails question
[21:51:12] Travis-42: it's pretty hard to diagnose why you're having trouble with css styles applying to your html. Can you just put somewhere the html and css?
[21:54:52] Travis-42: your css file is empty?
[21:58:31] Travis-42: then how is the bootstrap being applied?
[22:11:45] Travis-42: When I have an exception that goes to my exceptions_app, my profiler (skylight) reports about 900ms in rack-deflater. Does that make sense/seem possible?

2015-08-29

[00:07:56] Travis-42: rhizome: what do you mean?
[00:09:49] Travis-42: rhizome: I was using hungarian notiation just to make it clear in the IRC channel, that it was an array
[00:10:32] Travis-42: ???Vote.where(votable: votables)??? where votables is an array of objects that could be several types that match the votable polymorphic association on Vote
[00:12:33] Travis-42: rhizome: the following code is the basic idea, I was just hoping for something more elegant, https://gist.github.com/anonymous/f74f0af5d4380b751ddb
[00:14:56] Travis-42: rhizome: I have an array of objects that can be voted on, of multiple class types. I want to create a single query to retrieve the current user???s votes on those objects??? ???SELECT * FROM votes WHERE user_id = 6 AND ((votable_type = ???Article??? AND votable_id IN [1,2,3]) OR (votable_type = ???Blog??? AND votable_id IN [4,5,6]))??? would be the equivalent sql query
[00:16:01] Travis-42: Rails generates the correct query if votables is a single type when using ???current_user.votes.where(votable: votables)???, I was just hoping there was a way to do it if votables encompasses multiple types, since votable is a polymorphic association
[00:22:51] Travis-42: the reason was that each of the ???votables??? is cached on multiple levels (including the vote buttons), and so we were filling in the vote states with javascript. but, I suppose my approach will work
[00:38:22] Travis-42: if you???re going to do that, would there be any reason not to just put them in public?
[00:38:36] Travis-42: are they doing anything else there?
[00:40:32] Travis-42: you could customize the generators as an option too
[00:52:03] Travis-42: Quit: Travis-42

2015-08-28

[15:57:21] Travis-42: has joined #RubyOnRails
[15:58:05] Travis-42: In rails 4.2, is the default ???action_dispatch.cookies_serializer??? supposed to be :json if not specified? I have an application that was upgraded to rails 4.2 without ever explicitly setting cookies_serializer a while back, but setting to :json now it errors on existing cookies (only :hybrid or :marshall work)
[16:05:19] Travis-42: centrx: I experimented by resetting cookies and it wasn???t the issue. I think maybe my misunderstanding was assuming that the ???default??? was json, rather than the default was an ???explicitly set??? json value
[16:17:02] Travis-42: switching my cookies_serializer to :json seems to result in a bunch of rspec/capybara spec failures. Is there any obvious reason that might happen?
[17:02:06] Travis-42: Quit: Travis-42
[23:43:49] Travis-42: has joined #RubyOnRails
[23:44:50] Travis-42: I???m trying to perform a query like Vote.where(votable: votable_array) where votable_array includes different votable_types. Is there a way to do this without manually grouping the votable_array and building the where clause?
[23:48:08] Travis-42: Client Quit
[23:50:17] Travis-42: has joined #RubyOnRails
[23:50:56] Travis-42: Vote.where(votable: votable_array.map(&:votable_type).uniq) wouldn???t work,, that would be trying to pass a list of votable_type???s to ???votable???
[23:52:28] Travis-42: It needs to generate a query like SELECT * FROM votes WHERE (votable_type = ???Article??? AND votable_id IN [1,2,3]) OR (votable_type = ???Blog??? AND votable_id IN [4,5,6])
[23:52:46] Travis-42: it does it if all the the types are the same

2015-08-27

[15:30:17] Travis-42: I was basing it off of, http://www.sitepoint.com/unraveling-string-key-performance-ruby-2-2/ ??? but it could be wrong
[15:30:46] Travis-42: I find in ruby 2.2.3, benchmaring ENV["PATH_INFO???] is still 1.3x slower than ENV["PATH_INFO".freeze] ??? is that still expected?
[15:32:05] Travis-42: it was only discussed I think, jhass
[15:33:49] Travis-42: Ox0dea: https://gist.github.com/anonymous/4eed629ac7b34467cf29
[15:33:54] Travis-42: benchmark/ips
[15:36:57] Travis-42: so then it???s not really the case that hash[???key???] is optimized the same as hash[???key???.frozen] in ruby 2.2?
[15:37:11] Travis-42: even if when creating hashes, the keys are set to frozen
[15:39:02] Travis-42: right, but if I???m trying to reduce object allocations, I need to access the hash using frozen string?
[15:40:44] Travis-42: Quit: Travis-42
[16:28:21] Travis-42: has joined #ruby
[16:53:46] Travis-42: has left #ruby: ()
[18:26:59] Travis-42: has joined #RubyOnRails
[18:27:03] Travis-42: has joined #ruby
[19:00:10] Travis-42: I'm trying to better understand ruby memory allocation: When "5.times { foo = 6 }" is run, ruby will use up 5 object slots (a new one on each iteration), unless GC runs during the iteration, right (in which case it'll reuse the "freed" slots)? E.g. for something like rails??? find_each do be more efficient than all.each, it relies on GC running at some point? Or am I not understanding?
[19:03:54] Travis-42: well, I???m trying to better understand why find_each in rails (which creates 1000 item arrays) is much better for memory than all.each ??? so suppose something like 100_000_000.times { foo = ???a string??? }. memory stays stable (even though GC.stat shows 100,000,000 freed objects), but if I disable GC just before, memory balloons
[19:04:22] Travis-42: is the reason because GC is running before the heap size increases, freeing and reusing old slots?
[19:07:32] Travis-42: apeiros: I???m really not trying to ask about rails, I???m trying to understand ruby memory allocation
[19:07:46] Travis-42: it was just an example
[19:09:35] Travis-42: User.all.each still works in rails 4.2.3, but I???m sorry if my example was a little outdated, I???m just trying to understand why allocating 1000 item arrays 100 times doesn???t balloon memory the same way that a single 100,000 item array would
[19:09:54] Travis-42: Ruby 2.2 Is really where I???m looking at
[19:10:20] Travis-42: 100_000_000.times { foo = ???a string??? } doesn???t balloon memory (unless GC.disable is called), even though it allocates 100,000,000 objects
[19:13:40] Travis-42: right, so the reason the creating 1000 item arrays 100 times doesn???t balloon memory is because GC is running during the process ??? the slots in the ruby heap can???t be reused until GC in some form runs
[19:14:03] Travis-42: that makes a lot of sense, thank you apeiros. I wasn???t sure that I understood the basic idea
[19:14:32] Travis-42: I understand, I was just comparing
[19:15:36] Travis-42: thank you for your help
[20:04:22] Travis-42: Quit: Travis-42