Activity Graph

Page 1 of 3 | Next »


[22:16:33] mlt-: Ping timeout: 250 seconds
[22:39:23] mlt-: has joined #RubyOnRails


[01:03:04] mlt-: *.net *.split
[21:22:34] mlt-: has joined #RubyOnRails


[16:49:38] mlt-: *.net *.split


[02:11:50] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)
[03:10:34] mlt-: has joined #RubyOnRails


[08:46:04] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[18:20:36] mlt-: Can someone enlighten me how this is even possible? I assign a variable and right after same expression yields different result
[18:46:08] mlt-: nicnic222: perhaps you should require that file
[18:47:17] mlt-: nicnic222: maybe autoload
[19:58:02] mlt-: nicnic22: maybe config.load_paths ?


[23:02:42] mlt-: uhm... what can I use instead of RODBC::sqlSave to append data only for selected columns? I want to rely on defaults for other columns not in my data frame.
[23:02:49] mlt-: wrong channel


[23:32:10] mlt-: has joined #RubyOnRails


[05:34:27] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[17:42:46] mlt-: has joined #RubyOnRails
[20:46:51] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)
[20:54:44] mlt-: has joined #RubyOnRails


[04:03:59] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[04:01:41] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)
[16:53:41] mlt-: has joined #RubyOnRails


[20:00:31] mlt-: has joined #RubyOnRails


[00:32:55] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[01:22:25] mlt-: Read error: Connection reset by peer
[01:29:37] mlt-: has joined #RubyOnRails
[01:30:02] mlt-: I'm confused about ActiveSupport::TestCase. Wasn't it deprecated?
[01:30:21] mlt-: Is it back?
[01:32:46] mlt-: oops I meant ActionController::TestCase
[03:28:13] mlt-: uhm... is there a chance parallel testing might by wonky if my test has self.use_transactional_tests=false ? I feel like it runs another test without cleaning up DB. I'm using plain old minitest along with MyClass.delete_all in teardown block
[03:28:21] mlt-: Rails 5.2.2
[03:30:32] mlt-: sevenseacat: it is a part of integration testing. There is some external tool involved that alters DB
[03:31:40] mlt-: That is what I'm trying to say. Rails should not attempt to parallelize tests that do not use transactions
[03:34:05] mlt-: sevenseacat: there is no reason to use "self.use_transactional_tests = false" for thos
[04:17:17] mlt-: so how do I disable parallel tests?
[04:28:32] mlt-: ACTION found PARALLEL_WORKERS


[22:51:22] mlt-: has joined #RubyOnRails


[21:35:10] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[23:50:13] mlt-: has joined #RubyOnRails


[07:21:24] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)
[19:24:02] mlt-: has joined #RubyOnRails
[23:03:44] mlt-: Read error: Connection reset by peer


[06:33:43] mlt-: Ping timeout: 268 seconds
[19:30:47] mlt-: has joined #RubyOnRails


[22:36:29] mlt-: has joined #RubyOnRails


[01:06:13] mlt-: Ping timeout: 244 seconds


[01:04:29] mlt-: unless you want to keep a record of fulfillment status change, there is no need for another table...imho
[01:08:16] mlt-: once again.. unless you expect some fancy processing.. like backordered, etc or something back and forth, you might get by with several columns if order of status order changes is always same and simple.
[01:08:30] mlt-: Quit: got to reboot
[01:23:20] mlt-: has joined #RubyOnRails


[13:06:39] mlt-: Read error: Connection reset by peer
[13:06:52] mlt-: has joined #RubyOnRails


[23:04:43] mlt-: Quit: rebooting
[23:19:57] mlt-: has joined #RubyOnRails


[01:07:00] mlt-: has joined #RubyOnRails
[03:14:53] mlt-: Quit: bye
[04:53:14] mlt-: has joined #RubyOnRails
[08:15:33] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)
[23:33:02] mlt-: has joined #RubyOnRails


[02:58:54] mlt-: has joined #RubyOnRails
[09:03:39] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[21:49:34] mlt-: has joined #RubyOnRails
[23:06:22] mlt-: Quit: got to go


[05:56:37] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[18:34:00] mlt-: has joined #RubyOnRails
[18:35:08] mlt-: How do I prevent JSONB database type casting into Hash? I thought "attribute attr," added to my Model will do, but it won't. Rails 5.2.1
[20:18:04] mlt-: dachi: he is gone:)


[17:54:35] mlt-: has joined #RubyOnRails
[17:57:41] mlt-: Inside: I did give minitest-bisect a try... though for whatever reason that inconsistent test is not reproducible on Linux even with same seed :(
[18:02:17] mlt-: Inside: yeah... I used default ruby on Debian 2.3, whereas 2.4 on Windows... gotta try rvm
[18:03:15] mlt-: Also I recalled why I disable transactional fixtures in one test... I do set serializeable isolation level for transaction in my model... so no go for transactional fixture for this one
[18:20:44] mlt-: mices: was it tab separated?
[18:21:13] mlt-: mices: you would get by with awk
[18:21:19] mlt-: oneliner
[18:45:03] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[22:06:10] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[04:11:36] mlt-: Ping timeout: 268 seconds
[20:19:46] mlt-: has joined #RubyOnRails
[20:20:40] mlt-: Are there any pros/cons to NOT having 'fixtures :all' in class ActiveSupport::TestCase while using MiniTest? I mean to explicitly name fixtures for each test...


[21:41:10] mlt-: has joined #RubyOnRails
[21:42:57] mlt-: How would I pin down a cause for (Mini)test failure? I mean if I re-run the failed test alone, it passes. It only fails if I run all tests with certain seeds. So I suspect that something is not getting cleaned up. But I'm totally lost as how to figure out what.
[21:43:25] mlt-: Most of the time if I run all tests, it passes. No JS stuff.
[21:43:59] mlt-: Inside: a single test in question does pass alright.
[21:44:38] mlt-: glasz: when it fails, it says "ActiveRecord::RecordNotFound: Couldn't find MyControllerName with 'my_id'=1234"
[21:44:49] mlt-: So something is funky about fixtures
[21:45:08] mlt-: Inside: that is the problem. If I re-run test alone, it passes.
[21:45:40] mlt-: I see what you are will tell me the actual order they are executed
[21:50:36] mlt-: glasz: it is failing at the line that gets the fixture... setup do @stuff = things(:mything) ...
[21:52:39] mlt-: No, not in this one. But I do some funky stuff with other tables... there might be some FK problems. I gonna give it a try.. will get back.
[21:52:53] mlt-: funky stuff in other tests
[21:57:05] mlt-: glasz, Inside: I tried ... where.. first! It fails with all tests and same seed, but passes for a single test.
[21:58:51] mlt-: Inside: not yet
[21:59:21] mlt-: glasz: I believe they are transactional by default... I turn it off only in one separate IntegrationTest
[21:59:38] mlt-: ACTION feels like onto something
[22:06:33] mlt-: I'm on PostgreSQL. I turn off transactional tests on one very specific set of integration tests. I want to split all those into smaller chunks, but setup takes quite some time, so I turn them off and i_suck_and_my_tests_are_order_dependent!
[22:09:07] mlt-: I might just rewrite that into one single test thus keeping everything transactional.... instead of trying to find the problem as is
[22:32:26] mlt-: ooops... minitest_bisect... UNIXServer is required
[22:32:39] mlt-: time to fire up WSL
[22:36:41] mlt-: glasz: most of the time it is alright...sort of. Still have no spring / zeus etc
[22:38:17] mlt-: nah... i got tired using VirtualBox before... seems nice to just run stuff locally. I just use WSL occasionally to test something out specific
[22:38:49] mlt-:
[22:39:10] mlt-: in Windows 10... pretty slick. I run native Debian 64 bit
[22:40:48] mlt-: uname -a gives Linux UMN201657146 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 GNU/Linux
[22:48:46] mlt-: ehm...what is the point of using WSL if you use Mac? Don't you have docker and all other fun stuff OOB?
[22:50:22] mlt-: as a noob, I confirm rails runs alright on windows as is
[22:52:14] mlt-: 27 seconds for pretty big app with guard, foreman, puma
[22:52:30] mlt-: Nokogiri is alright now, though eventmachine is still a b*&ch
[22:52:46] mlt-: when using guard live realod
[22:54:02] mlt-: ooh... and there was that thing with ductape
[23:00:57] mlt-: I dunno if this is still a thing and/or windows specific
[23:01:23] mlt-: Also while we are at it... I posted a SO question with a problem I came across while upgrading Rails... Can I re-use fixture_file_upload? Or do I have to call it explicitly every time?
[23:02:26] mlt-: ACTION now has all tests failing... that is good start


[00:39:11] mlt-: Now I can't figure out why RSpec/capybara/selenium won't find assets if I altered config.assets.prefix . If I start dummy app with either dev or test environment, I can access everything just fine with assets path I want, but running tests fails :(
[03:38:39] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[23:20:09] mlt-: has joined #RubyOnRails
[23:22:12] mlt-: What is a good way to have an Rspec dummy app for a gem that can work with different Rails versions?
[23:22:42] mlt-: I mean there are certain changes versioned migrations in 5.2.1 that are not there in 4.2.10
[23:22:57] mlt-: Do I have 2 dummy apps?
[23:23:38] mlt-: Or do I make my way through even with application.js.erb to deal with rails-ujs vs jquery-ujs ?
[23:27:24] mlt-: quazimodo: that is what I was thinking...but it is quite not DRY to have 2 almost identical dummy apps
[23:28:58] mlt-: sort of... there is some controller code and such
[23:29:28] mlt-: If I change something, I'd have to maintain the change across both apps
[23:29:57] mlt-: I feel like I can split only assets and migration folders and keep the rest shared
[23:30:10] mlt-: for assets I need only application.js
[23:31:15] mlt-: another pain that I recall is the change of boolean representaiton in sqlite3
[23:31:40] mlt-: I'd like to keep as much common/shared stuff as I can
[23:32:28] mlt-: I'd like to NOT use newer features... so as long as it is compatible with newer Rails, that is fine
[23:32:59] mlt-: ok... just wanted some feedback whether there is a standard way to deal with such things
[23:33:29] mlt-: I'll start with 1 but separate migrations and assets
[23:33:42] mlt-: 1 dummy app I mean
[23:34:01] mlt-: what do you mean?
[23:34:20] mlt-: You can test multiple versions
[23:35:57] mlt-: quazimodo: you said it would be nice to have Rails version switcher for testing. And I said nothing prevents from testing a gem against multiple versions. It was easier when there was no such drastic changes.
[23:38:21] mlt-: speaking of that...I came across appraisal gem .. I hope it is the way to go
[23:38:48] mlt-: and they say to add various gemfiles for Travis testing explicitly


[00:45:08] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[20:36:14] mlt-: has joined #RubyOnRails


[18:36:34] mlt-: has joined #RubyOnRails
[18:51:48] mlt-: Ping timeout: 272 seconds
[18:52:59] mlt-: has joined #RubyOnRails
[21:51:48] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[19:22:35] mlt-: theRoUS: why do you need do/end? Can't you just define whatever method for your model?
[19:40:09] mlt-: do you want unique per instance method?
[19:47:04] mlt-: theRoUS: I'm still confused. Can't you define a parent class for such models/relations that share something and define method directly in a model class that is unique?


[22:01:04] mlt-: darkhanb: this might be helpful
[22:01:59] mlt-: essentially .update_all(["bar = bar + ?", 123.45])


[17:54:52] mlt-: Radar: Thanks for the feedback! The intent is to be generic tool for SQL export. There is no particular model, lots of dynamic SQL.
[17:57:02] mlt-: I just don't want to get low on memory on exporting let's say a few millions of rows
[19:05:23] mlt-: dopie: I'm not sure how "polymorphic" is relevant here. But what about rendering JS asking Turbolinks to visit and replace # thus re-rendering your page?
[19:06:10] mlt-: dopie: I mean like Turbolinks.visit('#', { action: 'replace' });
[19:58:17] mlt-: timdotrb: Have you tried?
[20:16:47] mlt-: somehow seesion[:timeout] isn't getting nilled. Multiple browser tabs open?
[20:21:28] mlt-: because you have no cookies in incognito
[20:24:13] mlt-: timdotrb: something is off in your code
[21:22:00] mlt-: tycoon177: are you looking for this ?
[21:22:47] mlt-: I personally prefer raw sql
[21:26:27] mlt-: tycoon177: why not using it? I've been looking at it.
[21:26:33] mlt-: you may get by with AREL
[21:28:24] mlt-: tycoon177: if you use only a handful of scenarios where you do such join, just define a method for a final stuff you'd want. Apparently you can't use raw SQL if you expect to have AR relation to work with later
[21:28:32] mlt-: desnudopenguino: don't keep us hanging
[21:28:54] mlt-: you mean you are still using it
[21:29:57] mlt-: tycoon177: I don't think so... such scenarios are well possible
[21:31:26] mlt-: I mean you can always have a surrogate key, but it doesn't always mean table is not normalized
[21:32:11] mlt-: before_save?
[21:33:36] mlt-: mordof: check persisted?
[21:33:48] mlt-: in your validation
[21:34:10] mlt-: so you can say it is valid even if there is no string
[21:34:52] mlt-: str.present? || !persisted?
[21:39:43] mlt-: mordof: just use serial column in you db and get salted md5 of that as a path
[21:44:29] mlt-: sha1 from serial column + fixed salt is gonna be pretty unique


[20:45:16] mlt-: has joined #RubyOnRails
[20:47:04] mlt-: Hello! I'm doing some nasty stuff in Rails, but being a noob I'm curious if it does what I expect it to do. I mean it does work alright. I'm not sure whether it is efficient approach. I'd appreciate a feedback
[20:48:18] mlt-: I hope I'm not quite reinventing a wheel
[21:34:01] mlt-: Inside: Thank you for taking a look! I do use lots of PostgreSQL specifics and that is not an issue for me. I'm more concerned about memory overhead whether this approach is better than fetching everything, formatting into CSV and sending back in one shot.
[21:37:06] mlt-: also I was not sure whether it is okay to toss around a block like that. I just tried and it worked.


[05:30:51] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[20:21:48] mlt-: has joined #RubyOnRails
[20:22:21] mlt-: Can I eager load a chain of associations? I have like 5 tables I want to (left) join.
[20:24:15] mlt-: ropeney: ah... I suspected something it documented anywhere? All examples I see use just a simple symbol
[20:26:09] mlt-: ACTION feels dumb
[20:26:26] mlt-: ropeney: Thanks! I was looking at
[20:27:46] mlt-: ropeney: just to check... for left outer join, I use arel expressions and Mymodel.join(my_arel.join_sources)
[20:27:49] mlt-: Is it the way to go?
[20:28:20] mlt-: ropeney: nevermind...
[20:28:30] mlt-: I think with eager loading I would not need all that anymore
[20:38:44] mlt-: ropeney: Is there a handy function or alike to turn an array of chained table names into a hash suitable for eager loading? I feel like I'm about to re-invent a wheel on that.
[20:41:01] mlt-: ACTION found
[21:52:09] mlt-: anoob: you might try to cheat... using databases setup for configuration
[21:53:01] mlt-: anoob: Rails.configuration.database_configuration
[21:53:08] mlt-: anoob: look for keys
[23:26:17] mlt-: Can I walk association reflections? I want to reflect on association of association. Is it doable?
[23:32:40] mlt-: ACTION is looking at #klass
[23:44:17] mlt-: foli: don't ask to ask, just ask


[18:53:23] mlt-: has joined #RubyOnRails
[18:59:24] mlt-: back. Which is kind of "expected". What I do not get is how come JSON comes back from normal page operations. I do not see dot json in URL.
[18:59:24] mlt-: I am confused how a controller can return JSON type when it was not explicitly specified in the URL? I mean it has standard respond_to ...format.json ... format.html . What I am having a problem with is testing. In my Integration Test, I do xhr :get, my_controller_url, {stuff} in exactly the same way as I monitor normal behavior with Firefox's Developer Tools console on Network tab. For whatever reason, in my test, an HTML comes
[18:59:52] mlt-: Does X-Requested-With: XMLHttpRequest request header matter?
[19:01:01] mlt-: oh... I just noticed in logs: Processing by my_controller as JS
[19:01:40] mlt-: Why does it choose to use JS? I have no such clause in respond_to
[19:05:40] mlt-: I noticed that if I do in my test: xhr :get, my_controller_url(format: :json), ... . Then it works. But once again, I do not see .json in URL while using page normally...
[19:47:08] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[20:56:40] mlt-: Read error: Connection reset by peer
[20:57:16] mlt-: has joined #RubyOnRails
[20:57:38] mlt-: Read error: Connection reset by peer


[08:41:58] mlt-: Ping timeout: 240 seconds
[15:50:18] mlt-: has joined #RubyOnRails


[17:43:40] mlt-: has joined #RubyOnRails


[17:53:37] mlt-: has joined #RubyOnRails
[22:32:54] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[01:09:35] mlt-: has joined #RubyOnRails
[01:17:44] mlt-: Remote host closed the connection
[01:18:42] mlt-: has joined #RubyOnRails
[02:51:31] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)
[21:43:59] mlt-: has joined #RubyOnRails
[22:50:27] mlt-: Quit: ERC (IRC client for Emacs 25.3.1)


[19:25:30] mlt-: has joined #RubyOnRails
[19:27:58] mlt-: Is there a way to autoreload stuff if I modify ruby code in an underlying gem I use in my Rails app? I mean do I have to explicitly ask Guard to watch those files or is there an automagic way to restart server if any of the local gems changed?
[21:14:33] mlt-: FLeiXiuS: ?
[21:16:38] mlt-: why wouldn't you send pics the same way?
[21:17:41] mlt-: Set :disposition to inline?
[21:20:24] mlt-: are attachments way different than pictures? Can you handle them both the same way but keep a flag for disposition
[21:21:00] mlt-: Since you do it for both pictures and attachments, I don't see much difference and need in another controller
[21:21:15] mlt-: call avatar as a special attachment
[21:21:27] mlt-: I mean just "file"
[21:22:03] mlt-: I was about to suggest, but I don't think this will do it.
[21:22:11] mlt-: You said pictures can be attachments.
[21:22:17] mlt-: So you do need an extra flag
[21:22:37] mlt-: I mean just don't create 2 DB tables, 2 controllers, etc
[23:04:07] mlt-: Quit: ERC (IRC client for Emacs 25.2.1)


[19:46:11] mlt-: Quit: ERC (IRC client for Emacs 25.2.1)


[22:46:44] mlt-: has joined #RubyOnRails


[18:37:17] mlt-: Ping timeout: 268 seconds


[16:45:25] mlt-: has joined #RubyOnRails


[04:05:28] mlt-: Quit: ERC (IRC client for Emacs 25.2.1)


[02:35:20] mlt-: ACTION feels like #before_save is the way to go
[17:55:31] mlt-: Quit: ERC (IRC client for Emacs 25.2.1)
[21:00:19] mlt-: has joined #RubyOnRails