« Back to channel list

#RubyOnRails - 21 March 2017

« Back 1 day Forward 1 day »
[00:00:02] matthewd: /usr/lib/ruby/vendor_ruby/active_support/tagged_logging.rb:68
[00:00:20] Radar: Ah there it is
[00:00:36] matthewd: There's no lib in the latter, so it's not a quirk of the path rewriter thing -- they're definitely different
[00:01:32] Radar: rm -rf /*
[00:02:03] Radar: pwntrik: protip: if you want help then please respond quickly otherwise people (read: myself ) lose interest.
[00:06:06] pwntrik: Radar: https://pastecry.pt/SjUfIB#KecEs8Fey7Zuh3Ug0Taf5Rup4Ed
[00:06:31] dps: has joined #RubyOnRails
[00:07:02] Radar: pwntrik: agree with matthewd's assessment: [10:54:00] <matthewd> That still looks like a Frankenstein of OS package- and gem-provided files
[00:07:04] centrx: has joined #RubyOnRails
[00:07:08] pwntrik: Radar: sorry was investigating... it looks like the system has (Linux) in a separate directory: /usr/share/rubygems-integration/all
[00:07:25] Radar: pwntrik: I would recommend clearing out your Ruby install here and setting up a new one using ruby-install.
[00:07:32] pwntrik: ya it is. theres both 4.2.4 and one installed. so i'm going to try to uninstall both and install again
[00:07:57] matthewd: It sounds like you're not using bundler, because it should prevent this
[00:08:08] matthewd: You definitely want to be using bundler.
[00:08:10] nahtnam: has joined #RubyOnRails
[00:08:11] daxroc: has joined #RubyOnRails
[00:09:55] chouhoulis: has joined #RubyOnRails
[00:11:54] xjunior: tbuehlmann: I'm using your recipe, but even seeing everything up I can't access localhost:3000 on my local machine
[00:13:18] xjunior: https://gist.github.com/2bb87fc61fd2a45483a732daab69ea92 and https://gist.github.com/543390450c39fc88e39be7e08f8181e8
[00:13:32] pwntrik: matthewd, Radar: i am using bundler and `bundle install` runs fine
[00:13:59] Radar: pwntrik: in config/application.rb is there a line that looks like this `Bundler.require(*Rails.groups)` ?
[00:14:43] matthewd: Are you running the command that's producing the pasted output through 'bundle exec'?
[00:15:03] matthewd: Oh, I guess bundler might leave vendor_ruby on the path because it's a "system" path :/
[00:15:31] Radar: Possibly.
[00:15:32] pwntrik: matthewd: no that's when i request / on the `rails server`
[00:15:41] matthewd: Better plan: work out what put those files in vendor_ruby (probably OS packages that correspond to gems), and make them not be there
[00:15:44] matthewd: What's your OS?
[00:17:23] Radar: pwntrik: ^
[00:19:02] tvw: has joined #RubyOnRails
[00:21:33] _3dwardsharp: has joined #RubyOnRails
[00:22:23] Nicmavr: has joined #RubyOnRails
[00:24:21] pwntrik: matthewd, Radar: kali linux
[00:24:31] Radar: pwntrik: Are you distracted or something atm?
[00:25:08] pwntrik: Radar: no definitely not i've been working on this trying to fix this gems mess
[00:25:19] Radar: pwntrik: Do you get highlighted when we mention your name?
[00:25:24] pwntrik: Radar: yes i do
[00:25:31] Radar: If we're going to wait 7 mins between every single question & answer this problem is going to take a long time to get fixed.
[00:25:42] Radar: pwntrik: Did you install a package which provided activerecord?
[00:25:46] pwntrik: Radar: sorry i'm here didn't mean to be unattentive
[00:26:19] pwntrik: Radar: i uninstalled all the system packages for "rails" metapackage, then did a `bundle install` and it installed rails. the server runs but still the same error
[00:26:28] matthewd: I think you have the ruby-activesupport (and friends) OS package installed
[00:27:13] matthewd: You uninstalled the packages providing the files named in the backtrace, but they're still showing up in the backtrace?
[00:27:18] pwntrik: ok how can i go nuclear and uninstall the gems dir then run bundle install to get it back
[00:27:37] pwntrik: matthewd: you are right, it still has THREE different versions of that. i'm trying to clean everything out
[00:27:40] cht: what's the best way to start contributing to rails repository ?
[00:27:42] matthewd: The problem files aren't in the gems dir
[00:28:19] Radar: cht: Did you read http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html yet?
[00:28:28] cht: I haven't, thanks
[00:28:54] matthewd: pwntrik: I would be looking very suspiciously at *anything* in that vendor_ruby dir
[00:29:08] cht: actually I did this one :)
[00:29:10] bga57: has joined #RubyOnRails
[00:29:35] cht: so can I just go and pick an unresolved issue (already verified) and send a PR ?
[00:29:47] cht: and if not verified verify if the issue is present and send a PR ?
[00:33:16] matthewd: pwntrik: `dpkg -S ..../vendor_ruby`; the only packages that should be there are actual dependencies of the ruby/libruby packages
[00:34:34] matthewd: cht: In theory, yes. In practice, that's easier said than done: it's a popular project, so most approachable issues get resolved quickly... what remains are the Not So Easy ones.
[00:35:42] pwntrik: matthewd: kali linux system apps are built on ruby so that could be why is my guess? https://pastecry.pt/oox5i8#TewVez%5EMet3Ud2Duj6Tuh4Es1Dub
[00:36:33] matthewd: I highly doubt most of those are dependencies of system apps
[00:37:08] Technodrome: has joined #RubyOnRails
[00:37:29] cht: matthewd: care to point some not so easy ones, if you remember them ?
[00:37:47] cht: got some time this month and would like to give them a shot :)
[00:38:22] matthewd: pwntrik: But alternatively, you could probably add a hack in your config/boot.rb to pull vendor_ruby out of the path
[00:39:43] matthewd: cht: Well there are 20 pages of issues that've been open for over a month... ;)
[00:41:43] FooMunki: has joined #RubyOnRails
[00:43:29] matthewd: cht: Actually... here you go: https://github.com/rails/rails/issues/28436#issuecomment-287604330
[00:44:10] matthewd: That should be an easy one. Doesn't sound like the OP is interested in doing it, and no-one else has grabbed it yet.
[00:44:23] cht: cool, will take a look at it.
[00:44:32] brent__: has joined #RubyOnRails
[00:45:13] matthewd: IME it's more rewarding to work on things that have bitten you personally, though
[00:51:51] kitsuneyo: has joined #RubyOnRails
[00:52:07] pwntrik: matthewd, Radar: so i have active* and rails installed through the system installer, but i get an error when I run the server. if i run `bundle install` it will install *another* version of activerecord because it's not seeing the system activerecord (or at least that's how it appears to me). how can i get the server to use the system's gem https://pastecry.pt/rAYQtH#ReaGab8Up2Eb6Muf3Kuc9Cug0Eb
[00:55:14] Radar: " how can i get the server to use the system's gem" seems bad
[00:55:51] pwntrik: i'm open to whatever, i just wanted to get everything using the same source instead of having this version conflict
[00:56:34] matthewd: tbh, I'd probably go with a separately compiled ruby at this point
[00:57:27] matthewd: I'm normally pretty pro-system-ruby on production boxes, but if you can't get away from resulting system "gem" packages, the simple nuclear option is to leave it, and just do your own thing
[00:58:14] centrx: pwntrik: I recommend just not using system installation of any gems
[00:58:27] centrx: pwntrik: use rubygems/bundler for all gems
[00:58:52] centrx: pwntrik: bonus side-effect is they'll be more up-to-date than your distro
[00:59:34] pwntrik: centrx: makes sense
[00:59:51] pwntrik: i have running now - still the same stupid LegacyYamlAdapter error
[01:00:00] matthewd: centrx: I tried for that, but "kali linux system apps are built on ruby"
[01:00:21] pwntrik: https://pastecry.pt/U8hcDd#Rej%3APue3Ryz9Ed7Duj5Gaf3Puf9San
[01:01:01] matthewd: pwntrik: Are you not reading the backtrace you're pasting?
[01:01:38] pwntrik: matthewd: ?
[01:01:47] matthewd: You're getting the "same stupid" error because you have the "same stupid" problem
[01:02:34] matthewd: That thing you just pasted just now is full of "4.2.4", which is very much not
[01:02:47] pwntrik: matthewd: ya i have no idea why it's adding that
[01:03:00] pwntrik: i removed it then when i use bundler it add that but mixes it with the
[01:04:17] matthewd: Well, if you're not interested in any of the solutions we've offered so far, then I'm not sure we can provide further help
[01:07:16] pwntrik: omg... i got it. there was still some more leftover packages. good grief! i had to remove the one you pointed out that 4.2.4 is there
[01:09:36] pwntrik: matthewd, Radar: thanks guys i appreciate it. sorry for the lack of communication i knew it was a version conflict it was just tough to resolve because even the GUI package uninstaller was not removing all the depencies (i.e: removing the `rails` package had no affect on activerecord, activesupport, etc packages) so i had to hunt them down individually
[01:09:46] nachoman: has joined #RubyOnRails
[01:13:17] Ayey_: has joined #RubyOnRails
[01:15:49] Rodya_: has joined #RubyOnRails
[01:24:16] jenrzzz: has joined #RubyOnRails
[01:24:17] fourcolors: has joined #RubyOnRails
[01:26:05] jane_booty_doe: has joined #RubyOnRails
[01:31:10] fourcolors: I have a interesting situation. I have Deals and Locations. Each deal has a list of locations. I'm able to sort by location by doing something like .join(:location).order(...geo stuff here) however the locations that get included as nested locations never end up ordered
[01:31:44] fourcolors: Is there a good way to order the nested location data with an :includes(:location) ordered by location or something? I'm also only ordering by location if location params are presented
[01:32:27] superlou: has joined #RubyOnRails
[01:34:51] shinnya: has joined #RubyOnRails
[01:37:54] daed: has joined #RubyOnRails
[01:39:11] pwntrik: fourcolors: you could use .sort{|x|...}
[01:39:36] pwntrik: fourcolors: can you paste the log of the actual SQL query please?
[01:45:45] r3vDev: has joined #RubyOnRails
[01:46:25] fourcolors: http://pastebin.com/1E09ggBq
[01:47:35] fourcolors: https://gist.github.com/fourcolors/d478c4c6efdaf98c4b608db6800a1162
[01:49:12] Pumukel: has joined #RubyOnRails
[01:56:00] irishfromua: has joined #RubyOnRails
[01:56:46] fourcolors: I think I found my answer
[01:56:52] nyaa: has joined #RubyOnRails
[01:57:00] fourcolors: http://edgeguides.rubyonrails.org/association_basics.html#scopes-for-has-many
[01:57:29] nyaa: has joined #RubyOnRails
[01:59:34] fourcolors: however mine is a HABTM relationship
[02:00:54] fourcolors: I think I need a conditional query method for :locations
[02:03:24] fe-coder-2017: has joined #RubyOnRails
[02:08:18] irishfromua: has joined #RubyOnRails
[02:08:38] nachoman: has joined #RubyOnRails
[02:13:09] Rodya_: has joined #RubyOnRails
[02:14:23] das3in: has joined #RubyOnRails
[02:16:34] das3in: Anyone here use the 'knock' gem for jwt auth? I've been looking through the source and can't seem to find where the token is actually issues. I'd like to count # of logins (when a token is issued)
[02:16:39] das3in: can't find where to do that
[02:21:58] Ayey_: has joined #RubyOnRails
[02:25:19] duderonomy: has joined #RubyOnRails
[02:27:13] Rodya_: has joined #RubyOnRails
[02:34:40] FooMunki: has joined #RubyOnRails
[02:35:18] mikeymicrophone: I’m wondering whether to commit this solr directory that sunspot creates
[02:35:33] akshat: has joined #RubyOnRails
[02:38:45] Rodya_: has joined #RubyOnRails
[02:40:14] jenrzzz: has joined #RubyOnRails
[02:45:29] hipertracker: has joined #RubyOnRails
[02:47:09] akshat_: has joined #RubyOnRails
[02:49:50] Jameser: has joined #RubyOnRails
[02:54:30] gusrub: has joined #RubyOnRails
[02:54:53] pwntrik: has joined #RubyOnRails
[03:02:06] tomasm-: has joined #RubyOnRails
[03:03:57] Ayey_: has joined #RubyOnRails
[03:05:03] libastral: has joined #RubyOnRails
[03:06:59] davedo321: has joined #RubyOnRails
[03:08:08] alex88: has joined #RubyOnRails
[03:17:54] chagel: has joined #RubyOnRails
[03:25:42] chrickso: has joined #RubyOnRails
[03:37:23] mwlang: mikeymicrophone: I commit it…but on deploy, I set things up so solr is symlinked. It’s useful for other developer’s machines and useful for getting initial deploy set up on the server.
[03:37:36] Pumukel: has joined #RubyOnRails
[03:37:52] Aeyris: don't use jwt for auth
[03:37:56] Aeyris: oh that was like an hour ago
[03:38:01] mwlang: but once you “go live” the symlinked folder is what you want and you also want to follow a system install of Solr server rather than relying on running solr from the gem’s location.
[03:39:15] Radar: [14:37:51] <Aeyris> don't use jwt for auth <- why?
[03:39:39] Aeyris: i wish i actually had my own post about this to whip out
[03:39:44] Aeyris: but i'm still writing about it
[03:40:05] Aeyris: so instead, have two from a good friend of mine who you may remember as "the guy who did Sony": http://cryto.net/~joepie91/blog/2016/06/13/stop-using-jwt-for-sessions/
[03:40:12] Aeyris: He actually wrote a second part: http://cryto.net/~joepie91/blog/2016/06/19/stop-using-jwt-for-sessions-part-2-why-your-solution-doesnt-work/
[03:40:42] pwnd_nsfw`: is Sony hot?
[03:40:43] Aeyris: Another friend who got libsodium into PHP wrote about it too: https://paragonie.com/blog/2017/03/jwt-json-web-tokens-is-bad-standard-that-everyone-should-avoid
[03:41:02] Aeyris: tl;dr is: Everything you are doing with JWT you can (and should) be doing with sessions.
[03:41:12] Aeyris: Expiries work in sessions.
[03:41:26] brent__: has joined #RubyOnRails
[03:41:36] Aeyris: No web framework, server or client-side (e.g., mobile apps), that works with JWT doesn't work with sessions.
[03:41:56] Radar: thanks for the links!
[03:42:18] Aeyris: ACTION mumbles something about FACTS.
[03:42:27] Aeyris: The first link is the best one, imo.
[03:42:39] Aeyris: Scott's one is a bit ranty about things that are only orthogonally related.
[03:43:28] Aeyris: I'm sure I'll write about it at some point because I still see it and need something to point to for clients.
[03:45:56] AnoHito: has joined #RubyOnRails
[03:51:08] Rodya_: has joined #RubyOnRails
[03:51:52] jenrzzz: has joined #RubyOnRails
[03:51:52] jenrzzz: has joined #RubyOnRails
[03:54:42] matcouto: has joined #RubyOnRails
[04:10:03] Pumukel: has joined #RubyOnRails
[04:13:48] djbkd: has joined #RubyOnRails
[04:14:31] Technodrome: has joined #RubyOnRails
[04:17:40] spyder55: has joined #RubyOnRails
[04:17:50] hipertracker: has joined #RubyOnRails
[04:19:40] Pumukel: has joined #RubyOnRails
[04:25:06] gusrub: has joined #RubyOnRails
[04:28:12] Pumukel: has joined #RubyOnRails
[04:30:14] dionysus69: has joined #RubyOnRails
[04:33:02] patarr: has joined #RubyOnRails
[04:40:01] leeky: has joined #RubyOnRails
[04:40:20] duderonomy: has joined #RubyOnRails
[04:47:24] Ericx2x: has joined #RubyOnRails
[04:50:16] bungoman_: has joined #RubyOnRails
[04:53:26] matcouto_: has joined #RubyOnRails
[04:54:20] Pumukel: has left #RubyOnRails: ()
[04:55:07] jdm: has joined #RubyOnRails
[04:57:17] roflmyeggo: has joined #RubyOnRails
[05:06:04] ayonkhan: has joined #RubyOnRails
[05:08:01] nyaa: has joined #RubyOnRails
[05:18:25] justrying: has joined #RubyOnRails
[05:21:02] itsgokul: has joined #RubyOnRails
[05:22:02] nyanz: has joined #RubyOnRails
[05:25:05] jane_booty_doe: has joined #RubyOnRails
[05:28:05] dionysus69: has joined #RubyOnRails
[05:35:34] lightheaded: has joined #RubyOnRails
[05:38:30] Pumukel: has joined #RubyOnRails
[05:39:05] hipertracker: has joined #RubyOnRails
[05:47:49] WinterBluFox: has joined #RubyOnRails
[05:52:39] doublemalt__: has joined #RubyOnRails
[05:57:11] deevil: has joined #RubyOnRails
[06:09:51] dminuoso: has joined #RubyOnRails
[06:23:01] Cohedrin: has joined #RubyOnRails
[06:26:40] lightheaded: has joined #RubyOnRails
[06:32:38] AnoHito: has joined #RubyOnRails
[06:33:38] patarr: has joined #RubyOnRails
[06:39:38] itsgokul: has joined #RubyOnRails
[06:41:35] Pumukel: has joined #RubyOnRails
[06:47:12] helpa: has joined #RubyOnRails
[06:52:23] Ayey_: has joined #RubyOnRails
[06:56:47] defsdoor: has joined #RubyOnRails
[07:03:02] hipertracker: has joined #RubyOnRails
[07:07:55] adac: has joined #RubyOnRails
[07:12:07] pLaTo0n: has joined #RubyOnRails
[07:20:39] Ayey_: has joined #RubyOnRails
[07:23:18] AnomalousBit: has joined #RubyOnRails
[07:29:01] Technodrome: has joined #RubyOnRails
[07:31:32] kristofferR: has joined #RubyOnRails
[07:35:56] conta: has joined #RubyOnRails
[07:44:30] zero1one0: has joined #RubyOnRails
[07:45:03] darutoko: has joined #RubyOnRails
[07:45:32] Flwyd: has joined #RubyOnRails
[08:00:49] zero1one0: has joined #RubyOnRails
[08:01:11] lightheaded: has joined #RubyOnRails
[08:01:27] aganov: has joined #RubyOnRails
[08:03:39] dps: has joined #RubyOnRails
[08:11:04] hipertracker: has joined #RubyOnRails
[08:12:31] spicerack: has joined #RubyOnRails
[08:12:58] Pumukel: has joined #RubyOnRails
[08:13:17] pLaTo0n: my tests are all broken and I don't know why :(
[08:13:36] pLaTo0n: "argument error: wrong number of arguments" all the time, but I dont know when this happened
[08:13:43] pLaTo0n: they worked before
[08:14:19] dpsk: has joined #RubyOnRails
[08:18:01] artto: has joined #RubyOnRails
[08:23:33] mark_66: has joined #RubyOnRails
[08:24:42] dminuoso: pLaTo0n: You have been around long enough to know that your error description is 100% shit.
[08:24:53] dminuoso: Gist your code and a stacktrace or it didn't happen
[08:28:20] artto: has joined #RubyOnRails
[08:31:59] Radar: dminuoso: !rule3
[08:31:59] helpa: dminuoso: Clearly explain what is happening and create a Gist (http://gist.github.com), (formatted neatly please: http://bit.ly/1q75oia) of the code that is causing the problem you are encountering, as well as any useful output like stacktraces.
[08:32:01] Radar: in the future
[08:32:04] Radar: !didntwork
[08:32:04] helpa: What "didn't work"? Did your server not start? Did your computer explode? Did your webpage turn bright pink? Did your client not pay your bill on time? You may have to be more specific. A Gist (http://gist.github.com) of the code that doesn't work (and the error you are getting) will be helpful.
[08:32:07] Radar: ^ or that
[08:32:29] jaequery: has joined #RubyOnRails
[08:33:17] dminuoso: Radar: Oh well. Those are some useful factoids indeed.
[08:33:24] dminuoso: still on holiday?
[08:33:34] Radar: just came back this week
[08:33:40] Radar: bbl, Ruby AU committee meeting
[08:33:43] jenrzzz: has joined #RubyOnRails
[08:33:46] dminuoso: Neat how was that australian city whose name I forgot?
[08:34:27] patarr: has joined #RubyOnRails
[08:34:57] antgel: has joined #RubyOnRails
[08:38:26] pLaTo0n: yes dminuoso
[08:38:40] pLaTo0n: its a very strange issue and I dont even know where this happened
[08:39:01] pLaTo0n: I will first look if some gem versions or config files changed
[08:41:15] pLaTo0n: ok jackpot
[08:41:23] pLaTo0n: crawled through the git commits
[08:41:42] pLaTo0n: it happened after an update (bundle update) of gemfile/gemfile.lock
[08:41:58] pLaTo0n: now I have to find out which gem
[08:43:43] tvw: has joined #RubyOnRails
[08:43:44] dminuoso: pLaTo0n: Is this supposed to be a question?
[08:45:00] zacts: has joined #RubyOnRails
[08:46:29] adac: has joined #RubyOnRails
[08:46:53] kitsuneyo: has joined #RubyOnRails
[08:47:09] pLaTo0n: sorry, just a log of my mind
[08:47:38] pLaTo0n: I'll ask a question again when I can find the right place where this error happened :)
[08:47:58] drale2k: has joined #RubyOnRails
[08:53:38] dminuoso: pLaTo0n: rspec?
[08:53:53] pLaTo0n: I use minitest
[08:54:09] dminuoso: minitest is like a JSON library right?
[08:54:28] pLaTo0n: its the built in test suite
[08:54:38] pLaTo0n: I found the commit where this happened
[08:54:46] jop1: has left #RubyOnRails: ("WeeChat 1.0.1")
[08:54:50] pLaTo0n: I installed a gem, but this isnt the cause
[08:55:05] pLaTo0n: the gemfile.lock was updated at many places
[08:55:14] pLaTo0n: one of this updates is causing my problem
[08:57:16] dionysus69: has joined #RubyOnRails
[08:58:26] Ayey__: has joined #RubyOnRails
[09:00:21] dminuoso: pLaTo0n: No I think its a JSON library. Tried it once, didn't like it.
[09:02:39] snowy: has joined #RubyOnRails
[09:04:26] artto: has joined #RubyOnRails
[09:05:17] zpe: has joined #RubyOnRails
[09:07:01] drale2k: has joined #RubyOnRails
[09:12:30] zpe: has joined #RubyOnRails
[09:16:00] kitsuneyo: has joined #RubyOnRails
[09:16:44] pLaTo0n: can't switch in my running project
[09:16:53] pLaTo0n: maybe I will try rspec in the next project
[09:17:55] snowy: has joined #RubyOnRails
[09:18:32] gloscombe: has joined #RubyOnRails
[09:21:57] marr: has joined #RubyOnRails
[09:29:31] pLaTo0n: tests are working again, I just reverted the gemfile.lock to an old state
[09:29:44] pLaTo0n: but I still doesnt know which gem causes problems :D
[09:29:53] pLaTo0n: too many of them changed
[09:34:41] arBmind: has joined #RubyOnRails
[09:37:09] snowy: has joined #RubyOnRails
[09:39:18] pLaTo0n: got it dminuoso
[09:39:22] pLaTo0n: its one of these
[09:39:23] pLaTo0n: https://gist.github.com/anonymous/04ffd610800ed245ae49bf8ebcf2c7c3
[09:41:15] kitsuneyo: has joined #RubyOnRails
[09:41:44] Technodrome: has joined #RubyOnRails
[09:42:43] brent__: has joined #RubyOnRails
[09:42:48] srinidhi: has joined #RubyOnRails
[09:43:16] mikecmpbll: has joined #RubyOnRails
[09:43:48] keerthana: has joined #RubyOnRails
[09:43:49] tbuehlmann: xjunior: still having the docker problems?
[09:50:37] Ergo: has joined #RubyOnRails
[09:52:02] lxsameer: has joined #RubyOnRails
[09:53:36] itsgokul: has joined #RubyOnRails
[09:54:04] naftilos76: has joined #RubyOnRails
[09:56:44] naftilos76: Is there a way to make FF show errors in js code located inside a js view? The controller action returns a status 200 but if something goes wrong inside my js view i can no errors in the FF's console. However if i execute js from anywhere else and something goes wrong then i get an error in js console. Can anybody help?
[09:57:52] kitsuneyo: has joined #RubyOnRails
[10:03:42] kitsuneyo: has joined #RubyOnRails
[10:05:13] ferr1: has joined #RubyOnRails
[10:11:13] zpe: has joined #RubyOnRails
[10:15:51] jordansz: has joined #RubyOnRails
[10:24:33] doublemalt__: has joined #RubyOnRails
[10:28:57] kristofferR: has joined #RubyOnRails
[10:29:48] artto: has joined #RubyOnRails
[10:33:31] tvw: has joined #RubyOnRails
[10:36:15] workmad3: has joined #RubyOnRails
[10:36:42] FooMunki: has joined #RubyOnRails
[10:36:46] jordansz: has joined #RubyOnRails
[10:37:05] patarr: has joined #RubyOnRails
[10:41:45] pickle_: has joined #RubyOnRails
[10:41:45] zpe: has joined #RubyOnRails
[10:41:50] nobitanobi: has joined #RubyOnRails
[10:41:53] centrx: has joined #RubyOnRails
[10:43:31] rgr: has joined #RubyOnRails
[10:43:39] nobitanobi: hello - I'm seeing several errors in my logs that look like: "NameError: uninitialized constant ActiveRecord::Associations::X" where X can be BelongsToPolymorphicAssociation, BelongsToAssociation, Preloader::HasMany,... All of them come from workers (using Sidekiq), and the majority happens right after a deploy (using Heroku). Does this ring the bell for anyone? I can't reproduce it in my tests.
[10:46:08] itarato: has joined #RubyOnRails
[10:46:36] teddysmoker: has joined #RubyOnRails
[10:54:38] Ergo: has joined #RubyOnRails
[10:56:28] srinidhi: has joined #RubyOnRails
[11:04:02] arBmind: has joined #RubyOnRails
[11:10:32] kristofferR: has joined #RubyOnRails
[11:12:39] kitsuneyo: has joined #RubyOnRails
[11:13:29] kitsuneyo: has joined #RubyOnRails
[11:14:13] kitsuneyo: has joined #RubyOnRails
[11:14:31] jenrzzz: has joined #RubyOnRails
[11:14:31] jenrzzz: has joined #RubyOnRails
[11:15:08] kitsuneyo: has joined #RubyOnRails
[11:15:49] kitsuneyo: has joined #RubyOnRails
[11:17:09] Fernando-Basso: has joined #RubyOnRails
[11:22:00] pickle_: has joined #RubyOnRails
[11:23:32] artto: has joined #RubyOnRails
[11:33:34] patarr: has joined #RubyOnRails
[11:39:56] ldnunes: has joined #RubyOnRails
[11:43:33] matthewd: nobitanobi: Yes, it does
[11:44:03] nobitanobi: matthewd: amazing! what kind of bell ring? Trying to figure out how sidekiq threads might be missing those constants
[11:46:20] matthewd: Found it: https://github.com/rails/rails/issues/26273
[11:46:47] nobitanobi: oh boy, all the way down to Ruby :)
[11:49:26] nobitanobi: matthewd: is that comment you put in there to ruby-lang issues the root cause you think?
[11:50:48] matthewd: Yeah.. or at least it sounded like it
[11:51:33] matthewd: You should be able to hack around it by dereferencing those constants at boot, e.g. in an initializer
[11:52:56] veloutin: has joined #RubyOnRails
[11:54:34] nobitanobi: @matthewd what do you mean by dereferencing? I was thinking on explicitly requiring wherever active_record/associations.rb leave
[11:54:55] matthewd: Just mention the constant by name
[11:54:59] nobitanobi: *lives - requiring it before sidekiq starts its threads I guess.
[11:55:31] nobitanobi: uh, wouldn't just that blow up the same way it does within Sidekiq though? As it would not find that name
[11:56:10] matthewd: The allegation in that issue is that it's a threading bug. At boot, there's only one thread, so nothing to race.
[11:56:51] nobitanobi: I see. So naming those constants would auto load them for all threads potentially and "problem" solved.
[12:02:12] doodlehaus: has joined #RubyOnRails
[12:02:58] Jameser: has joined #RubyOnRails
[12:03:41] HoierM: has joined #RubyOnRails
[12:07:59] FooMunki: has joined #RubyOnRails
[12:09:17] srinidhi: has joined #RubyOnRails
[12:17:00] jenrzzz: has joined #RubyOnRails
[12:28:45] davedo321: has joined #RubyOnRails
[12:29:30] keerthana: has joined #RubyOnRails
[12:31:55] artto: has joined #RubyOnRails
[12:33:48] aajjbb: has joined #RubyOnRails
[12:42:22] brent__: has joined #RubyOnRails
[12:44:02] Qchmqs: has joined #RubyOnRails
[12:50:14] Fernando-Basso: has joined #RubyOnRails
[12:50:18] artto: has joined #RubyOnRails
[12:58:14] AimlessRAven: has joined #RubyOnRails
[12:58:33] AimlessRAven: hi all i have validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i in my user model and this reg exp validation works perfect on create
[12:58:38] AimlessRAven: but when action == "update"
[12:58:51] AimlessRAven: i can push whatever charts i want
[13:00:16] Brando753-o_O_o: has joined #RubyOnRails
[13:01:58] AimlessRAven: yes i cannot use cyrilic charts in create
[13:02:04] AimlessRAven: but i can in update..
[13:02:16] ramortegui: has joined #RubyOnRails
[13:02:26] AimlessRAven: with this validation.. and i try to understand why this dont work on update action
[13:03:29] centrx: Post your code at gist.github.com
[13:03:31] centrx: Hard to say without code
[13:03:47] centrx: Maybe you are calling save without validations or something?
[13:03:50] centrx: on update
[13:04:54] lightheaded: has joined #RubyOnRails
[13:05:02] lightheaded: has joined #RubyOnRails
[13:07:27] DrYockel: has joined #RubyOnRails
[13:08:16] Pumukel: has joined #RubyOnRails
[13:09:58] mwlang: I’m looking for an existing gem (any gem) that uses rspec for testing and has a spec/dummy or spec/test_app that is also covered by rspec. Any suggestions?
[13:11:27] Pumukel: has joined #RubyOnRails
[13:12:19] matthewd: mwlang: draper seems to, though I haven't looked further than spec/dummy being a thing that exists
[13:12:39] mwlang: matthewd: I’ll look now.
[13:14:58] nya: has joined #RubyOnRails
[13:16:10] doodlehaus: has joined #RubyOnRails
[13:16:42] Jameser: has joined #RubyOnRails
[13:18:04] mwlang: It’s using rspec for the dummy project as well, but running rspec from gem’s root folder doesn’t work for me. It’s not loading the dummy app before invoking it’s specs so basically bombs right away.
[13:19:25] doodlehaus: has joined #RubyOnRails
[13:22:07] zpe: has joined #RubyOnRails
[13:24:51] mwlang: hmmm…I must be running too new of an environment. bundle install is using latest Guard, rspec, etc., but it looks like the gem was built with older versions (with corresponding older syntaxes that have been deprecated).
[13:25:13] mwlang: however, may be useful enough for me to figure out my own issues. :-)
[13:25:18] quazimodo: has joined #RubyOnRails
[13:27:36] thomasfedb: Think I found a bug in fragment caching: https://github.com/rails/rails/issues/28503 Can anybody test my reproduction? (Git repo and steps included)
[13:28:52] xpl0iter: has joined #RubyOnRails
[13:29:29] Ergo: has joined #RubyOnRails
[13:29:40] Derperperd: has joined #RubyOnRails
[13:31:06] DLSteve: has joined #RubyOnRails
[13:32:03] zpe: has joined #RubyOnRails
[13:33:59] agent_white: has joined #RubyOnRails
[13:35:43] jonno112: has joined #RubyOnRails
[13:38:30] roflmyeggo: has joined #RubyOnRails
[13:39:55] alex88: has joined #RubyOnRails
[13:44:36] adlerdias__: has joined #RubyOnRails
[13:46:02] lightheaded: has joined #RubyOnRails
[13:46:15] DLSteve: has joined #RubyOnRails
[13:46:55] agent_white: Mornin' folks
[13:48:11] jonno112: Hey! Does anybody have experience with RailsConfig? I'm suuuper stuck with using environment variables to override settings
[13:49:23] lightheaded: has joined #RubyOnRails
[13:55:33] Jameser: has joined #RubyOnRails
[13:58:22] lightheaded: has joined #RubyOnRails
[13:58:42] snowy: has joined #RubyOnRails
[14:01:19] artto: has joined #RubyOnRails
[14:04:29] jsrn_: has joined #RubyOnRails
[14:06:59] sonOfRa: has joined #RubyOnRails
[14:07:38] harfangk: has joined #RubyOnRails
[14:08:54] fox_mulder_cp: has joined #RubyOnRails
[14:16:10] p8m: has joined #RubyOnRails
[14:17:28] artto: has joined #RubyOnRails
[14:18:14] jenrzzz: has joined #RubyOnRails
[14:23:20] lightheaded: has joined #RubyOnRails
[14:26:24] lightheaded: has joined #RubyOnRails
[14:26:49] kitsuneyo: has joined #RubyOnRails
[14:32:24] JDeen: has joined #RubyOnRails
[14:39:33] artto: has joined #RubyOnRails
[14:39:55] workmad3: has joined #RubyOnRails
[14:41:59] handicraftsman: has joined #RubyOnRails
[14:41:59] handicraftsman: has joined #RubyOnRails
[14:42:19] shinnya: has joined #RubyOnRails
[14:44:31] tedwing: has joined #RubyOnRails
[14:45:31] sagax: has joined #RubyOnRails
[14:46:18] Derperperd: has joined #RubyOnRails
[14:46:29] roamingdog: has joined #RubyOnRails
[14:52:06] cpruitt: Looking at the rails docs for belongs_to with the dependent: option I see this:
[14:52:08] cpruitt: “This option should not be specified when belongs_to is used in conjunction with a has_many relationship on another class because of the potential to leave orphaned records behind.”
[14:52:36] cpruitt: Anyone have a quick explaination as to how orphaned records would be created?
[14:54:31] cpruitt: I suppose it’s related to a conflict with using dependent: with the associated model’s has_many?
[14:56:18] nikivi: has joined #RubyOnRails
[14:57:43] artto: has joined #RubyOnRails
[14:58:13] epochwolf: cpruitt: dependent on belongs_to is only designed for a has_one relationship. If you destroy the record, it will delete the parent. If the parent has other children, they will be ophaned.
[14:58:52] cpruitt: epochwolf: ah… that makes perfect sense
[14:58:54] epochwolf: And then CPS will need to be called and the children taken to foster homes.
[14:59:17] epochwolf: It gets very ugly.
[14:59:47] cpruitt: epochwolf: I’m sure there’s a gem out there that will just pass them on to next of kin, but why put them through the heartache. Thanks for the info. :-)
[14:59:55] doodlehaus: has joined #RubyOnRails
[15:00:19] epochwolf: You're welcome. :)
[15:03:02] AzaToth: has joined #RubyOnRails
[15:04:25] choke: has joined #RubyOnRails
[15:04:40] lightheaded: has joined #RubyOnRails
[15:10:47] elaptics: has joined #RubyOnRails
[15:13:08] igniting: has joined #RubyOnRails
[15:14:11] prvithani: has joined #RubyOnRails
[15:23:23] doodleha_: has joined #RubyOnRails
[15:23:52] dionysus69: has joined #RubyOnRails
[15:24:36] mikeymicrophone: has joined #RubyOnRails
[15:25:36] tedwing: I'm trying to set up a :through association where the through model is polymorphic. Multiple pairs of models can thus be associated through this one table. Here's what I have so far: https://www.pastery.net/pvvraj/ . I'm trying to set up an association to be able to use `shopping_list.items`, but I can't figure out how to tell it to get the item id from `"references"."left_id"` (instead of the
[15:25:42] tedwing: default `"references"."referenceable_id"`). What exactly am I missing?
[15:28:57] artto_: has joined #RubyOnRails
[15:31:09] artto: has joined #RubyOnRails
[15:34:12] brent__: has joined #RubyOnRails
[15:34:40] artto: has joined #RubyOnRails
[15:35:34] jdm: has joined #RubyOnRails
[15:36:29] brent__: has joined #RubyOnRails
[15:39:07] artto: has joined #RubyOnRails
[15:41:56] kitsuneyo: has joined #RubyOnRails
[15:42:27] Pumukel: has joined #RubyOnRails
[15:42:54] kitsuneyo: has joined #RubyOnRails
[15:43:45] kitsuneyo: has joined #RubyOnRails
[15:44:15] patarr: has joined #RubyOnRails
[15:44:28] kitsuneyo: has joined #RubyOnRails
[15:45:22] kitsuneyo: has joined #RubyOnRails
[15:46:02] roamingdog: has joined #RubyOnRails
[15:46:19] [Butch]: has joined #RubyOnRails
[15:46:51] roamingdog: has joined #RubyOnRails
[15:47:36] roamingdog: has joined #RubyOnRails
[15:48:26] roamingdog: has joined #RubyOnRails
[15:49:12] roamingdog: has joined #RubyOnRails
[15:49:28] Jameser: has joined #RubyOnRails
[15:50:02] roamingdog: has joined #RubyOnRails
[15:54:53] juggler: has joined #RubyOnRails
[15:56:13] username1: has joined #RubyOnRails
[15:56:16] username2: has joined #RubyOnRails
[15:56:17] username3: has joined #RubyOnRails
[15:56:36] epochwolf: tedwing: I'd think you'd use as: :left and as: :right
[16:02:56] wolfravenous: has joined #RubyOnRails
[16:03:45] tedwing: epochwolf: really? that simplifies things. all in the ShoppingList model?
[16:04:07] DrYockel1: has joined #RubyOnRails
[16:04:15] epochwolf: tedwing: I'm not completely sure of how you want things to connect.
[16:04:58] epochwolf: If the association name doesn't match the database fields, you need to map both sides to the proper fields. (In this case using as:)
[16:05:00] dps: has joined #RubyOnRails
[16:05:17] DrYockel1: has joined #RubyOnRails
[16:05:24] wolfravenous: has joined #RubyOnRails
[16:05:24] username1: has joined #RubyOnRails
[16:07:07] tedwing: right, the database fields don't match the model names. So I should be using something like `has_many :items, as: :left`?
[16:12:48] matthewd: tedwing: The foreign key on your has_many :through should be on the belongs_to instead
[16:12:52] ResidentBiscuit: has joined #RubyOnRails
[16:14:19] mauro1254: has joined #RubyOnRails
[16:14:25] AnomalousBit: has joined #RubyOnRails
[16:15:20] tedwing: Ah that explains it. So `Reference` should have a `belongs_to :item, foreign_key: :left_id` ?
[16:16:45] mauro1254: Hi folks, I'm trying rails 5.1.0 rc1 and I want to install js assets through yarn but I don't want to use webpack for now. How do I need to link assets in application.js/css?
[16:19:30] jdm: has joined #RubyOnRails
[16:20:03] matthewd: tedwing: Seemingly, yes. Though I'd avoid naming the associations and columns differently.
[16:21:56] FooMunki: has joined #RubyOnRails
[16:22:57] tedwing: Normally I would, but in this case the association table needs to support multiple types of associations.
[16:24:26] Suslov: has joined #RubyOnRails
[16:24:27] tedwing: Hrm, still having trouble. When I run `ShoppingList.first.items`, it tries to run this SQL: `SELECT "items".* FROM "items" INNER JOIN "references" ON "items"."id" = "references"."referenceable_id" WHERE "references"."right_id" = $1 AND "references"."referenceable_type" = $2`
[16:25:02] matthewd: Oh, wait, no
[16:25:16] matthewd: I meant you should add the foreign key to the existing belongs_to
[16:27:01] tedwing: Oh, to the `belongs_to :referenceable, polymorphic: true`?
[16:27:14] tedwing: Yes, it seems that worked!
[16:28:21] tedwing: Thanks matthewd , epochwolf
[16:34:03] jokke: has joined #RubyOnRails
[16:34:22] jokke: i'm trying to find out how to generate js source maps in sprokets
[16:34:47] jokke: i just found an ancient stackoverflow question that said that the functionality is merged
[16:34:58] jokke: but no info on how to actually turn it on
[16:35:06] havenwood: jokke: https://github.com/rails/sprockets/blob/master/guides/source_maps.md
[16:35:21] jokke: havenwood: wow thanks!
[16:35:26] havenwood: jokke: you're welcome!
[16:37:38] greengriminal: has joined #RubyOnRails
[16:37:57] jokke: havenwood: hmm
[16:38:11] jokke: i need to use npm for this?
[16:38:13] artto: has joined #RubyOnRails
[16:38:47] havenwood: jokke: You could use Rails 5.1's fancy new yarn. ;-)
[16:39:02] jokke: it's a legacy project. i can't
[16:39:15] jokke: if i'd start fresh i'd use webpack for all things frontend
[16:39:17] havenwood: jokke: And Rails 5.1 is RC1 to be fair.
[16:39:29] havenwood: https://github.com/rails/rails/pull/26836
[16:39:47] dps: has joined #RubyOnRails
[16:40:56] matthewd: That document's more "how source maps work" than "how to get source maps"
[16:42:04] matthewd: I thought master sprockets just always generated them, actually
[16:42:12] havenwood: Maybe it does now?
[16:44:08] havenwood: It didn't support them in 4.2. Does it in 5.0 or 5.1 I wonder?
[16:45:22] iliketurtles: has joined #RubyOnRails
[16:45:25] matthewd: Sprockets is versioned separately. I think the 4.0 betas are the ones with built-in source map support.
[16:45:32] havenwood: matthewd: ahhhh
[16:46:49] jaequery: has joined #RubyOnRails
[16:50:12] mwlang: What’s the correct way to conditionally initialize some Rails::Engine settings? I’m building a gem that can be used outside Rails…so, I wrote: “if defined? Rails::Engine” but get “uninitialized constant Rails::Engine (NameError)”
[16:50:25] pLaTo0n: has joined #RubyOnRails
[16:51:22] roamingdog: has joined #RubyOnRails
[16:51:32] Derperperd: has joined #RubyOnRails
[16:52:53] alaing: has joined #RubyOnRails
[16:52:59] cnk: has joined #RubyOnRails
[16:54:02] jokke: yeahh....i sprockets (~> 2.2.1)
[16:54:06] alaing: I have a hash that I would like to output as html attributes. eg. {style: 'color:red'} should output <div style="color:red">
[16:54:35] alaing: at the moment it outs as <div {:style=>"color:red;"}>
[16:55:03] cnk: alaing: show the code
[16:56:06] rgr: has joined #RubyOnRails
[16:57:38] alaing: cnk https://gist.github.com/aliuk2012/0fe44012ec265e06d140151669bb2464
[16:57:48] alaing: simplified of course
[16:58:28] greengriminal: If anyone is using mongoid. do you know if you can process a criteria in batches ?
[16:59:12] alaing: -<label {:style=>"color:red;"}class="form-label" for="person_name">
[16:59:12] alaing: +<label style="color:red;" class="form-label" for="person_name">
[16:59:50] gusrub: has joined #RubyOnRails
[17:00:09] cnk: You are not doing anything that would loop over your hash and turn them into :key = ":value"
[17:00:25] FLeiXiuS: has joined #RubyOnRails
[17:00:25] FLeiXiuS: has joined #RubyOnRails
[17:00:54] alaing: cnk ah of course
[17:01:05] alaing: maybe i need .map it
[17:01:58] cnk: that sounds like an idea
[17:02:50] alaing: thank you sometimes it just helps to talk it through and get another set of eyes
[17:04:25] spicerack: has joined #RubyOnRails
[17:07:14] lightheaded: has joined #RubyOnRails
[17:08:21] jenrzzz: has joined #RubyOnRails
[17:10:27] gusrub: has joined #RubyOnRails
[17:20:16] cagomez: has joined #RubyOnRails
[17:24:48] hahuang62: has joined #RubyOnRails
[17:30:23] patarr1: has joined #RubyOnRails
[17:32:17] mwlang: FWIW, the solution to my question: Put the class name in quotes and use Object.const_defined? like so: if Object.const_defined? "Rails::Engine"
[17:34:46] byteflame: has joined #RubyOnRails
[17:35:10] gusrub: has joined #RubyOnRails
[17:35:30] kitsuneyo: has joined #RubyOnRails
[17:36:26] mustmodify: has joined #RubyOnRails
[17:36:30] mustmodify: Help me understand the difference between nginx+puma+rails using 4 cpus and 2 cpus. Will nginx be twice as fast? I'm pretty sure Rails won't use all four CPUs.
[17:37:26] bobbobbins: has joined #RubyOnRails
[17:38:35] chouhoulis: has joined #RubyOnRails
[17:38:50] bobbobbins: hey, I have a function I’m trying to refactor, but I’m not really sure how to go about doing it, anyone care to have a look? https://gist.github.com/anonymous/89a3c0295654ab2617bd97aca70cba49
[17:39:21] bobbobbins: There are way too many checks to see if something exists or not
[17:40:41] mwlang: mustmodify: Do you have both a 4 CPU and 2 CPU VM set up to stress test?
[17:40:57] baweaver: bobbobbins: Is this for a Rails query or something else?
[17:41:14] kreantos: has joined #RubyOnRails
[17:41:20] baweaver: because if so Rails can take date ranges: Model.where(created_at: 5.days.ago..Time.now)
[17:41:21] bobbobbins: baweaver: its to format it for an elasticsearch query
[17:41:42] baweaver: One sec. It'll be slightly verbose with comments.
[17:41:53] bobbobbins: baweaver: thank you!
[17:41:59] gusrub: has joined #RubyOnRails
[17:42:32] djbkd: has joined #RubyOnRails
[17:42:34] mustmodify: mwlang: no. Our server is currently at Rackspace using 8GB which comes with 4 vCPUs. I'm thinking about transitioning to AWS which offers 8GB and 2vCPUs or other options.
[17:43:08] Spami: has joined #RubyOnRails
[17:43:38] DoctorMonocular: has joined #RubyOnRails
[17:43:38] mwlang: mustmodify: long and short is, for all intent and purposes, unless you have a *high* number of concurrent users/requests, you won’t find much difference performance wise in the two configurations.
[17:44:26] mwlang: but if you want to be sure absolutely, then set up a test environment with both configurations and hit them hard with Apache Bench: https://httpd.apache.org/docs/trunk/programs/ab.html
[17:46:34] mwlang: It’s not really Ruby that leverages the different CPU cores as it is either nginx’s workers….I don’t know as much about how puma works with nginx, but phusion passenger can definitely take advantage of all the cores under nginx.
[17:47:10] mwlang: strike “either” from that sentence. :-/
[17:48:30] mochiyoda_: has joined #RubyOnRails
[17:49:32] baweaver: bobbobbins https://gist.github.com/anonymous/89a3c0295654ab2617bd97aca70cba49#gistcomment-2033633
[17:50:06] baweaver: Though I'm slightly surprised that ES wouldn't have a nicer query builder interface
[17:50:10] bobbobbins: baweaver: wow, that is awesome
[17:50:25] bobbobbins: thank you, this’ll keep me busy for a while
[17:50:53] simon2: has joined #RubyOnRails
[17:51:48] cnk: baweaver: that is nice! one question, what is the issued variable for? it isn't used
[17:52:15] baweaver: ACTION quickly fixes
[17:52:21] baweaver: I have no idea what you're talking about
[17:52:31] baweaver: bobbobbins refresh that page
[17:53:10] gusrub: has joined #RubyOnRails
[17:54:26] cpruitt: baweaver: Why use tap vs just assigning the hash values?
[17:54:27] cpruitt: https://gist.github.com/anonymous/89a3c0295654ab2617bd97aca70cba49#gistcomment-2033633
[17:54:43] baweaver: Habit of doing it inline.
[17:54:50] kreantos: has joined #RubyOnRails
[17:55:12] baweaver: though you do realize the interpolation there isn't necessary
[17:55:27] cpruitt: Yeah, copy / paste from his original code.
[17:55:33] kreantos: hey there, im using ActiveJob with delayed_job as adapter. is there a way to block a queue when a job fails?
[17:56:06] baweaver: not that I know of kreantos, other than setting some type of flag state which'd be race condition central
[17:56:23] cpruitt: I think he had the merge to make sure that :format was always set, but the merge doesn’t seem necessary with the guard statement
[17:57:11] kitsuneyo: has joined #RubyOnRails
[17:57:37] mwlang: baweaver: last line doesn’t need “date_filter = “
[17:57:51] mwlang: but definitely a nice refactor there.
[17:57:54] bobbobbins: cpruitt: thanks!
[17:58:03] baweaver: not entirely sure why I started using tap like that
[17:58:05] kreantos: baweaver, is there another approach to avoid execution when a job fails (this needs to be done in order to guarantee data integrity)
[17:58:07] baweaver: Ah! Inline AR
[17:58:29] baweaver: that was why
[17:58:53] baweaver: then again I also stopped doing that for other reasons
[17:59:00] cpruitt: baweaver: makes sense
[17:59:12] baweaver: kreantos: sounds dangerous.
[17:59:58] baweaver: What's calling the job kreantos?
[18:00:20] byteflam1: has joined #RubyOnRails
[18:00:34] cpruitt: bobbobbins: Welcome. :-)
[18:00:34] mwlang: I’m trying to wire up a controller spec. Why does: get :index, format: :json lead to ActionController::UnknownFormat => PostsController#index is missing a template for this request format and variant. (it works fine in browser)…is this the right way to submit a JSON request to the controller?
[18:00:39] kreantos: delayed_job is the adapter, baweaver
[18:00:53] baweaver: well, yes, but how are you calling it?
[18:00:59] baweaver: what creates the job?
[18:01:19] kreantos: you mean who is scheduling it.
[18:02:10] mustmodify: has left #RubyOnRails: ()
[18:02:11] cpruitt: kreantos: He means what is adding it to your job queue?
[18:02:21] baweaver: words, yes, cpruitt has words
[18:02:23] mustmodify: has joined #RubyOnRails
[18:02:50] mustmodify: mwlang: I don't know what you consider "highly concurrent" but we're at about 200 - 350 RPM.
[18:03:17] mwlang: RPM == requests per minute?
[18:04:02] baweaver: ACTION has to deal with RPMS :'(
[18:04:17] kreantos: I have a endpoint where xml files are posted to. the controller of this endpoint is then scheduling the job in a queue. every job in this queue needs to be executed in order. if one fails it should stop execution until the failing job could be executed or is deleted., baweaver
[18:04:58] mwlang: baweaver: that’s where it’s fun!
[18:05:01] baweaver: You could bind it to an AR field
[18:05:17] baweaver: Make a Job table that keeps track of the current success state of the job.
[18:05:31] baweaver: and have the before_enqueue check that
[18:06:05] kreantos: why before_enqueue and not before_perform?
[18:06:36] baweaver: ACTION forgets the difference
[18:07:01] baweaver: but the issue is that you need to persist some form of state outside the context of the job to know whether or not it's safe to proceed.
[18:07:26] cpruitt: kreantos: Is there a reason that one successful job can’t schedule the next one such that nothing is added to the queue until it’s dependencies are met?
[18:08:17] kreantos: ok. because this is what I am trying right now. I just can't find an ActiveJob method which returns me all queued jobs of certain queue. I want to keep it as abstract as possible and dont want to fetch it through delayed_job itself
[18:08:39] kreantos: delayed_job already persits the error state, baweaver
[18:09:36] jenrzzz: has joined #RubyOnRails
[18:11:04] kreantos: cpruitt, jobs are beeing scheduled by external services which are posting their data to my service.
[18:11:51] cpruitt: kreantos: But your controller is adding things to the queue and controls the logic of the job execution no?
[18:12:08] naprimer: has joined #RubyOnRails
[18:12:21] cpruitt: So right now it sounds like you get a request & you queue up however many jobs (10 or whatever)
[18:12:54] cpruitt: And job 2 can’t run until job 1 finishes, and job 5 can’t run until 1-4 finish, etc… yes?
[18:13:34] cpruitt: But your controller should still need to store an AR model for the job to work with.
[18:13:35] kreantos: yes this is also default behavior of delayed_job. only that it skips over failed jobs
[18:14:03] cpruitt: But you can create your jobs in such a way that one job can complete and, in turn schedule another job.
[18:14:16] cpruitt: So your controller doesn’t schedule 10 jobs, it schedules 1, only the first
[18:14:33] kreantos: no, as there can be many requests
[18:15:09] cpruitt: Job 1 completes successfully and schedules job 2. 2 completes and schedules 3, 3 to 4, 4 to 5 … up to 10
[18:15:28] shubhang: has joined #RubyOnRails
[18:15:40] kreantos: these requests are reservation exports of external systems. every time a reservation is done they make a request to my service and post the reservation data
[18:16:16] cpruitt: Sure, whch you persist with ActiveRecord
[18:16:18] kreantos: therefore it is crucial to keep the order and stop if there is an error to avoid e.g. overbookings (to give you a bit of context)
[18:16:49] hahuang62: has joined #RubyOnRails
[18:16:52] cpruitt: But you’re not returning a response to them real time right? Cause you’re using DJ
[18:17:02] ResidentBiscuit: So I'm trying to figure out if I'm on the right track here. We're new to rails at work, and we got the idea of making part of our workflow that all of our applications use an engine. Basically, the engine just shows the user some list of things, they select one, and then control goes back to the main application. I'm having a hard time trying to fi
[18:17:02] ResidentBiscuit: gure out how to transfer control back to the main app. Do we override the controller? Do we open the controller class and just change the behavior? Is there something more sophisticated that doesn't feel as hacky? Is this even what we should be doing in an engine?
[18:17:13] cpruitt: So your controller saves 10 Reservation instances.
[18:17:22] cpruitt: And runs a job for #1
[18:17:25] kreantos: one in realtime and one in asynchrounously
[18:17:51] buckrockwell: has joined #RubyOnRails
[18:17:51] hobodave: has joined #RubyOnRails
[18:18:04] adlerdias_: has joined #RubyOnRails
[18:18:33] cpruitt: At the end of any given job, the last part of the job logic says “Give me back any Reservations that haven’t yet been processed, order by <whatever>” and then creates another job
[18:19:22] tenderlove: has joined #RubyOnRails
[18:19:25] cpruitt: For example, we have an app that works with MLS data. One job imports the property data, one imports images. We can’t process images for a property that fails, so the property import job completes, and then creates the image import job.
[18:19:31] kreantos: ok, I see what you are suggesting. You would add another layer on top of ActiveJob/delayed_job in order to do this
[18:19:41] cpruitt: Oh goodness yes.
[18:20:21] cpruitt: Your job queue is supposed to schedule execution, it really shouldn’t be the authority for WHAT is being processed. What if you have to trash the table for some reason (never say never).
[18:20:34] tvon: has joined #RubyOnRails
[18:21:07] cpruitt: I’d have Reservation models that detault to unprocessed. Then just keep sucking them off the top in order with ActiveJob
[18:21:11] kreantos: same could apply to the ActiveRecord table. I was doing something similar once, but there i had rabbitMQ
[18:22:18] mwlang: dumb question: is it possible for “Jbuilder” to not be loaded in test environment even though it’s loaded in development environment?
[18:22:27] gusrub: has joined #RubyOnRails
[18:22:33] cagomez: How do I conditionally create a <td> ? instead of this <% if foo.bar %> <td><%= foo.bar %></td> <% end %>
[18:22:39] buckrockwell: has joined #RubyOnRails
[18:22:59] defsdoor: has joined #RubyOnRails
[18:23:45] cpruitt: kreantos: Yeah, the thing about DJ is that if you save the wrong thing the serialized data can get out of sync with your application after you make a change (change atttributes or whatever) & deploy & then you get errors & such. Blowing away your jobs table if you get in a bind you can recreate the work to be done if you have persisted active record entries.
[18:24:12] cpruitt: But in all fairness I’ve used ActiveJob exactly zero times. I just use DJ directly.
[18:24:16] fox_mulder_cp: cagomez: ... <% blabla.each do |item| %> <tr>... </tr><% end %>
[18:24:27] cpruitt: So you might have a better option somewhere. Just sharing what’s worked best for me.
[18:24:42] cagomez: fox_mulder_cp: it's just one value though, not a collection
[18:24:57] kreantos: cpruitt, hmm you are saying that the job queue should not be the authority for what is being processed. But when the last part of the job logic is creating the next jobs as you suggested, it is doing exactly that. just the other way arount?
[18:25:09] mwlang: here’s the code failing me for json rendering within tests: https://gist.github.com/mwlang/27dbfd497906003aed261e5b416e5d4a
[18:25:10] fox_mulder_cp: cagomez: .. <% blabla.present? %> ...
[18:26:09] cpruitt: kreantos: No, but hold 1 sec (phone call)
[18:26:17] iliketurtles: has joined #RubyOnRails
[18:27:54] baweaver: mwlang: ahahahahaa
[18:28:07] baweaver: render_views needs to be present in RSEPC
[18:28:17] baweaver: it turns them off by default
[18:28:26] buckrockwell: has joined #RubyOnRails
[18:28:34] baweaver: https://www.relishapp.com/rspec/rspec-rails/v/2-1/docs/controller-specs/render-views
[18:28:36] mwlang: baweaver: huh? I have that on line #4
[18:29:05] mwlang: or did I get that wrong? https://gist.github.com/mwlang/27dbfd497906003aed261e5b416e5d4a#file-post_controller_spec-rb-L4
[18:30:31] baweaver: How are you requesting it in dev?
[18:30:49] mwlang: http://localhost:3000/posts.json
[18:31:27] mwlang: for what it’s worth if I do a before_action and “request.format = :json” I can leave off the .json in the browser and get json.
[18:31:43] mwlang: I can then modify the spec to leave off format: :json and get the failure error.
[18:32:44] mwlang: this is why I normally don’t like to write controller tests. drives me batty every time getting a simple rendering test working.
[18:35:27] cpruitt: kreantos: (sorry, couldn’t miss that call) There’s a difference between “What should get queued and when” vs. “what is the data I’m supposed to be working with?”. Your AR records are a snapshot of the data you have been given. All info about “what data needs to be processed and what is it’s status and sequence” should be kept there.
[18:35:58] srinidhi: has joined #RubyOnRails
[18:36:02] cpruitt: Your jobs are kind of just mini controllers that tell the next thing to start processing.
[18:38:34] cpruitt: In my earlier example, we have multiple AR models at play: Property, PropertyImage, MLSPropertyBatchImport, MLSPropertyDataImport. Then we have three job classes PropertyBatchImportJob, PropertyDataImportJob, PropertyDataImportImageJob. All the jobs say is “Go, do the next thing now and do it with id 12345”
[18:39:57] chopin: has joined #RubyOnRails
[18:40:10] kreantos: cpruitt: no need to be sorry, happy that someone is helping me! hmm so if a job fails (i have the fail count in the delayed_job table) this "mini_controller" can say which should be the next resource to be scheduled but NOT that it should stop executing jobs
[18:41:16] cpruitt: kreantos: Well, let me ask this, are ALL jobs supposed to be executed in order or just jobs from a specific user/customer/account ?
[18:42:16] kreantos: the latter one. i have <customer_id,job_type> queues
[18:42:30] mwlang: ok, it’s *got* to be something with jbuilder not loading in the test environment. The request is undeniably attempting to render JSON, yet won’t find the index.jbuilder file.
[18:42:33] cpruitt: ok, hold 1 sec...
[18:42:35] kreantos: e.g. #123_ReservationImport
[18:42:49] mwlang: for what it’s worth, the rails app is the “dummy” app in a gem I’m authoring.
[18:42:53] kreantos: #2223_ReservationImport
[18:43:22] mwlang: and jbuilder is declared in the gem’s gemspec file as: s.add_development_dependency "jbuilder", "~> 2.6.1"
[18:45:25] mwlang: actually, that makes me think…how could I check to see what format Rails knows how to render?
[18:46:33] ResidentBiscuit: So I'm trying to figure out if I'm on the right track here. We're new to rails at work, and we got the idea of making part of our workflow that all of our applications use an engine. Basically, the engine just shows the user some list of things, they select one, and then control goes back to the main application. I'm having a hard time trying to fi
[18:46:33] ResidentBiscuit: gure out how to transfer control back to the main app. Do we override the controller? Do we open the controller class and just change the behavior? Is there something more sophisticated that doesn't feel as hacky? Is this even what we should be doing in an engine?
[18:47:03] iceden: has joined #RubyOnRails
[18:47:09] FooBarWidget: Hi everyone, I am the developer of the Passenger app server. We are on a mission to improve the state of Ruby application delivery & operations (and to improve Passenger too). Could you help us by participating in this 5 minute survey? https://phusion.typeform.com/to/Nih9Un
[18:47:13] fox_mulder_cp: mwlang: http://apidock.com/rails/ActionController/MimeResponds/InstanceMethods/respond_to
[18:48:26] fox_mulder_cp: mwlang: http://apidock.com/rails/ActionController/MimeResponds/InstanceMethods/respond_to
[18:49:28] cpruitt: kreantos: I don’t know your code or job specifics but this is sort of the idea:
[18:49:29] cpruitt: https://gist.github.com/cpruitt/6a3d3fb5675372bc5fecaf7f1f717a74
[18:49:59] cpruitt: & forgive me if it’s overly brief or the ActiveJob specifics are wrong. I don’t use AJ and my day kinda just got swamped
[18:50:23] fox_mulder_cp: cpruitt: try to use resque with redis
[18:50:46] cpruitt: fox_mulder_cp: ?
[18:50:52] fox_mulder_cp: main feature - u can cache data in redis too
[18:51:06] fox_mulder_cp: cpruitt: resque - good and pretty aactive job backend
[18:51:09] fox_mulder_cp: based on redis
[18:51:16] cpruitt: fox_mulder_cp: kreantos Had a question about ActiveJob & DelayedJob. I’m answering his question.
[18:52:00] fox_mulder_cp: active job is a front for delayedjob, resque and etc, as i think. it's a true?
[18:52:22] kreantos: cpruitt, thanks a lot for your help and the sample code!
[18:52:28] roamingdog: has joined #RubyOnRails
[18:52:59] kreantos: fox_mulder_cp, jes delayed_job, resque ... are backends for activejob
[18:53:00] cpruitt: yes, it’s supposed to be back-end agnostic. But he’s already got DJ in place. Telling someone to switch their back end for a production application usually doesn’t work well.
[18:53:20] kreantos: fox_mulder_cp, redis was not an option
[18:53:48] fox_mulder_cp: kreantos: if u ise redis for resque, i can use this redis as cache too
[18:53:56] fox_mulder_cp: so this a positive feature
[18:54:09] cpruitt: kreantos: If it’s not an out of the box option I think there’s a gem or something. I don’t know. Other than keeping the ****ing process going I’ve had pretty good experience with just DJ apart from activejob
[18:54:50] jenrzzz: has joined #RubyOnRails
[18:54:50] jenrzzz: has joined #RubyOnRails
[18:54:58] fox_mulder_cp: i migrate from DJ to resque
[18:55:19] fox_mulder_cp: ~year - no problems for run loong ansible playbooks )
[18:56:44] cpruitt: fox_mulder_cp: Sure caching is great, but it’s a little off topic with regard to his question. there are a lot of cases where redis just isn’t available. Boss doesn’t want it… small site on some shared server that doesn’t have it, developer says they don’t like using software that has a name ending in “edis”… whatever. :-) I’ve found it’s best to help someone solve the problem at hand & then they can take the next st
[18:56:45] cpruitt: of evaluating another back end.
[18:57:20] tvw: has joined #RubyOnRails
[18:58:03] cpruitt: In his case, kreantos wanted info on solving a specific problem related to the sequence of jobs and ensuring that no job ran without a dependency being met. Switching to redis wont solve that. :-)
[18:58:58] fox_mulder_cp: but resque have a good web app for control resque tasks running )
[19:00:33] cpruitt: fox_mulder_cp: Does the web app automatically evaluate the state of all pending jobs and tell you wheter or not a job can safely be run without breaking a particular sequence of jobs and place all other jobs for a particular user on hold until such time as the failing job has successfully run and then clears the next job to be started?
[19:00:43] cpruitt: Cause that’d be pretty cool if it was that smart
[19:01:20] mustmodify: has left #RubyOnRails: ()
[19:01:34] cpruitt: Lots of things have “plusses” but the biggest plus that any piece of software can have is “my customer got what they needed effectively and reliably with minimal cost and turn around time”.
[19:02:19] kreantos: cpruitt, in your sample code. shouldn't this line go into a after_perform hook: https://gist.github.com/cpruitt/6a3d3fb5675372bc5fecaf7f1f717a74#file-handle_reservation_job-rb-L9
[19:02:52] cpruitt: kreantos: Yeah, it can. I was just keeping it short. Didn’t really want to dig into ActiveJob docs
[19:03:08] cpruitt: But conceptually you get the idea?
[19:03:24] fox_mulder_cp: cpruitt: hm. i think, that task executine control it's a another type of app feature
[19:03:44] fox_mulder_cp: i can't think about this task, but i have it in my task list
[19:04:02] kreantos: cpruitt, yes :)
[19:04:34] d5sx43: has joined #RubyOnRails
[19:04:41] cpruitt: fox_mulder_cp: It was kind of a retorical question. That’s not the responsibility of Resque’s admin tools. that’s app business logic
[19:04:56] fox_mulder_cp: cpruitt: depends of
[19:05:37] fox_mulder_cp: but i have staus field for model and know, what is curent instance status
[19:05:41] mwlang: Sanity check: ActionView::Template::Handlers.constants => [:Builder, :ERB, :Raw, :Html, :Erubis] — That’s “Builder” as in the XML builder by the great Weirich, right?
[19:05:53] fox_mulder_cp: such as created, processed, done..
[19:07:04] cpruitt: fox_mulder_cp: I think talking about Resque vs DelayedJob vs Sidekiq is a fine discussion for anyone. But at the same time, one thing that drove me NUTS early on (still does) is when someone asks a question about their current toolset and the recommendation is “Just change your tools”. That’s fine if the current tool won’t work, but if it’s a “change your currently working tool to another similar working tool and you’ll also
[19:07:05] cpruitt: feature XYZ” that doesn’t really help the person.
[19:10:09] cpruitt: Now, after kreantos has his answer and his customer’s needs are met, maybe he wants to go look at Redis. That’s entirely his call. I have my own ducks to fry. lol
[19:11:02] dtzuzu: has joined #RubyOnRails
[19:11:41] kreantos: cpruitt, thanks again for your help. it is very much appreciated. speaking of ducks, im quite hungry (it's already 8:11pm over here) :-D
[19:12:18] fox_mulder_cp: kreantos: 21.11.. nightly tea with chocolate )
[19:14:01] cpruitt: kreantos: Yeah… I woke up hungry & haven’t eaten all day. 3:15 here.
[19:14:02] kitsuneyo: has joined #RubyOnRails
[19:14:05] saomani: has joined #RubyOnRails
[19:16:14] kreantos: time to grab something :-) bye
[19:16:55] fox_mulder_cp: oh no.. no speechs about eat )
[19:17:18] cpruitt: fox_mulder_cp: Well, since you asked…. ;-)
[19:20:41] fox_mulder_cp: oh. by the topic - soomeboody write rspec test for rails in api mode with jwt?
[19:21:30] Sidoniuns: has joined #RubyOnRails
[19:21:52] HoierM: has joined #RubyOnRails
[19:23:23] Sidoniuns: has joined #RubyOnRails
[19:23:41] mwlang: well, well, well…finally at least got to the crux of the matter… expect(ActionView::Template::Handlers.extensions).to eq [:raw, :erb, :html, :builder, :ruby, :jbuilder] => expected: [:raw, :erb, :html, :builder, :ruby, :jbuilder], got: [:raw, :erb, :html, :builder, :ruby]
[19:23:54] duderonomy: has joined #RubyOnRails
[19:24:24] mwlang: no friggin’ clue *why* jbuilder falls off the list between development and test modes and require ‘jbuilder’ in the spec_helper or rails_helper does nothing to add it back.
[19:24:28] jaequery: has joined #RubyOnRails
[19:31:08] djbkd: has joined #RubyOnRails
[19:31:35] Aherin: has joined #RubyOnRails
[19:34:37] pLaTo0n: has joined #RubyOnRails
[19:35:52] jdm: has joined #RubyOnRails
[19:39:51] Dysp: has joined #RubyOnRails
[19:40:20] djbkd: has joined #RubyOnRails
[19:44:24] Derperperd: has joined #RubyOnRails
[19:44:25] dionysus69: has joined #RubyOnRails
[19:44:44] arBmind: has joined #RubyOnRails
[19:47:23] roamingdog: has joined #RubyOnRails
[19:48:19] arBmind: has joined #RubyOnRails
[19:48:30] lxsameer: has joined #RubyOnRails
[19:49:38] DLSteve: has joined #RubyOnRails
[19:53:59] fox_mulder_cp: wow. my testing branch of rails api repo now has 200+ commits )
[19:54:26] Dysp: Hello! For some reason Froala doesn't work when deployed to Heroku. I don't have much experience with javascript, but apperently the console gives me "froala isn't a function" error. Anyone who has an idea as to what is wrong? It works locally.
[19:55:33] hakash: has joined #RubyOnRails
[19:56:08] fox_mulder_cp: Dysp: may be u miss import, full path?
[19:56:51] Dysp: I can share the file.
[19:57:28] Dysp: https://gist.github.com/Dysp/f4ecf3a228ca137254644614670de64e
[19:57:56] Dysp: Probably is something like that, I just don't know how to fix it ;)
[19:58:10] tbuehlmann: Dysp: what happens when you visit your page and put $('selector').froalaEditor({}); in the developer js console?
[19:59:11] aajjbb: has joined #RubyOnRails
[19:59:26] username: has joined #RubyOnRails
[19:59:53] Dysp: tbuehlmann: Same error
[20:01:00] djbkd: has joined #RubyOnRails
[20:01:05] chopin_: has joined #RubyOnRails
[20:03:45] hahuang65: has joined #RubyOnRails
[20:04:54] Derperperd: has joined #RubyOnRails
[20:05:14] hobodave: has joined #RubyOnRails
[20:06:52] djbkd: has joined #RubyOnRails
[20:07:09] adac: has joined #RubyOnRails
[20:07:22] hahuang65: has joined #RubyOnRails
[20:08:23] jenrzzz: has joined #RubyOnRails
[20:10:08] netzfisch: has joined #RubyOnRails
[20:13:00] Spami: has joined #RubyOnRails
[20:14:01] kitsuneyo: i have an `avatar` attribute on a User model that accepts images encoded as base64 strings. I want my model to ignore any empty strings that get sent to this attribute. What is a good way to do that?
[20:15:03] baweaver: !validations
[20:15:03] helpa: The Active Record Validations Guide - http://guides.rubyonrails.org/active_record_validations.html - Written by Jaime Iniesta
[20:15:05] kitsuneyo: I was thinking a validation would be good, but one that returns no errors
[20:15:40] baweaver: then make a custom one
[20:16:14] kitsuneyo: I can do that, but I'm not sure what it SHOULD return instead of an error
[20:16:14] jonno112: has joined #RubyOnRails
[20:16:24] iliketurtles: has joined #RubyOnRails
[20:17:14] hahuang65: has joined #RubyOnRails
[20:23:40] cagomez: ` <td><%= foo.bar %></td> `. the <td> will always render, right?
[20:23:52] helpa: Why don't you try it and find out for yourself?
[20:26:07] Toledo: has joined #RubyOnRails
[20:29:50] tbuehlmann: kitsuneyo: sounds to me like you want to override the setter method #avatar=
[20:30:13] kitsuneyo: tbuehlmann, that sounds right
[20:32:24] kitsuneyo: It seems complicated, maybe I should handle this in the controller
[20:33:42] tbuehlmann: in its simplest form: https://gist.github.com/tbuehlmann/7b0b1b1e13a201005586dd0d229f1db1
[20:35:29] rgr: has joined #RubyOnRails
[20:43:19] brent__: has joined #RubyOnRails
[20:45:01] kitsuneyo: tbuehlmann, thanks. super(value) is the value provided by the update method?
[20:45:32] tbuehlmann: when you call user.update(avatar: ''), then value is ''
[20:48:00] hobodave_: has joined #RubyOnRails
[20:54:01] kitsuneyo: tbuehlmann, this is a cool start, thanks so much, although it has introduced some problems. I think i need to reverse it, so that it does nothing if value is not present, else super(value)
[20:54:19] matcouto: has joined #RubyOnRails
[20:54:21] tbuehlmann: yup, sounds good
[20:58:31] andywww: has joined #RubyOnRails
[21:11:04] hobodave: has joined #RubyOnRails
[21:11:27] iliketurtles: has joined #RubyOnRails
[21:13:48] djbkd: has joined #RubyOnRails
[21:16:29] jenrzzz: has joined #RubyOnRails
[21:16:29] jenrzzz: has joined #RubyOnRails
[21:16:47] username1: has joined #RubyOnRails
[21:18:36] Radar: GOOD MORNING
[21:18:42] byteflame: has joined #RubyOnRails
[21:19:27] andywww: has joined #RubyOnRails
[21:20:38] baweaver: Guten Morgen Radar
[21:21:14] Radar: Going to be the Changelog RFC podcast this morning
[21:22:41] cnk: Cool. Any particular topic?
[21:24:12] baweaver: Radar: You should make your own Podcast later
[21:24:19] baweaver: I vote for: The Bigg Deal
[21:24:19] Radar: Techincal writing in open source + quitting open source
[21:25:15] iliketurtles: has joined #RubyOnRails
[21:25:53] cnk: I was pleasantly surprised this morning when I suggested a book 2 people said "cool, i'll look" rather than whining that they didn't want to spend $ and didn't I have a blog post to recommend instead
[21:27:59] p8m: has joined #RubyOnRails
[21:29:10] kitsuneyo: has joined #RubyOnRails
[21:29:38] andywww: has joined #RubyOnRails
[21:31:06] jenrzzz: has joined #RubyOnRails
[21:31:06] jenrzzz: has joined #RubyOnRails
[21:35:56] bronson: has joined #RubyOnRails
[21:35:58] fox_mulder_cp: Radar: congratz me :) 200 commits in current branch of my app ))
[21:36:21] Radar: fox_mulder_cp: grats :)
[21:36:30] Synthead: has joined #RubyOnRails
[21:36:48] fox_mulder_cp: ~15% of planned functions realized. but i'm idiot and don't know how use test for rails in api mode testing ((
[21:37:15] fox_mulder_cp: Radar: can u recommend topics about rails in api mode testing
[21:37:32] fox_mulder_cp: with jwt tokens and devise
[21:37:35] Radar: https://www.relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec
[21:37:40] Radar: You can probably use request specs to tes tit out.
[21:38:07] fox_mulder_cp: thanks. try to read it
[21:38:52] hobodave: has joined #RubyOnRails
[21:41:11] jonno112: has joined #RubyOnRails
[21:41:33] kitsuneyo: has joined #RubyOnRails
[21:45:03] dminuoso: fox_mulder_cp: Are you using typescript?
[21:45:10] dminuoso: fox_mulder_cp: Or just raw javascript/es6?
[21:45:31] dminuoso: ant.design seems to be written in typescript completely for better or wose..
[21:48:18] agent_white: has joined #RubyOnRails
[21:50:44] davedo321: has joined #RubyOnRails
[21:52:22] dpsk: has joined #RubyOnRails
[21:52:24] mcr-credil: has joined #RubyOnRails
[22:01:05] uks: has joined #RubyOnRails
[22:04:57] Duckily: has joined #RubyOnRails
[22:21:26] gusrub: has joined #RubyOnRails
[22:26:12] Spami: has joined #RubyOnRails
[22:26:12] Spami: has joined #RubyOnRails
[22:27:43] gusrub_: has joined #RubyOnRails
[22:29:10] Radar: I think I've found a use for redux within Twist now... I was hoping to keep the React code small because I feel like when I touch it I just make it worse.
[22:29:35] hahuang65: has joined #RubyOnRails
[22:30:15] cabinB: has joined #RubyOnRails
[22:30:41] andrewray: has joined #RubyOnRails
[22:31:16] cnk: "within Twist"? Did you build that publishing platform?
[22:31:42] chopin: has joined #RubyOnRails
[22:33:07] djbkd: has joined #RubyOnRails
[22:41:58] Jasaka: has joined #RubyOnRails
[22:45:01] quazimodo: has joined #RubyOnRails
[22:59:03] fox_mulder_cp: dminuoso: plain js.
[23:01:09] djbkd: has joined #RubyOnRails
[23:04:10] dps: has joined #RubyOnRails
[23:06:31] kristofferR: has joined #RubyOnRails
[23:09:45] kristofferR: has joined #RubyOnRails
[23:12:59] patarr1: Is the "failure" lifecycle for activejob the one thats called after retries are exhausted?
[23:13:17] patarr1: are retries an active_job concept or are they implementation specific? (e.g. delayed_job, sidekiq, etc)
[23:16:22] someish: has joined #RubyOnRails
[23:21:19] bungoman: has joined #RubyOnRails
[23:22:37] Bahanix: has joined #RubyOnRails
[23:24:32] zero1one0: has joined #RubyOnRails
[23:26:05] alex88_: has joined #RubyOnRails
[23:28:57] Bahanix: Hi there! I'll submit a PR (my first) for a `has_many` options that would do the following: `has_many :posts, XXX: [:published]` would be equivalent to write both `has_many :posts` and `has_many :published_posts, -> { published }, class_name: "Post"`. How would you call the XXX options?
[23:30:46] linetrace: an ActiveModel::MissingAttributeError is raised when I iterate over query results for a model using friendly_id (the select statement doesn’t include slug, hence the error)
[23:31:04] linetrace: what’s the best workaround, supress the exception?
[23:31:26] linetrace: due to grouping/ordering of the query, I can’t include the slug in the select statement
[23:32:09] matthewd: linetrace: Don't call whatever thinks it needs that attribute?
[23:32:10] Aeyris: man is this a thing now
[23:32:15] Aeyris: Rails JWT auth?
[23:32:23] Aeyris: That's like twice in two days I've seen it.
[23:33:50] linetrace: matthewd: the exception is thrown on the `each`, but i’ll triple check that
[23:33:57] gusrub: has joined #RubyOnRails
[23:33:59] hahuang65: has joined #RubyOnRails
[23:35:32] rgr: has joined #RubyOnRails
[23:36:20] linetrace: matthewd: yup, exception is thrown on the `each` (e.g. `models.each do |m|`)
[23:36:44] matthewd: linetrace: Full backtrace please
[23:39:06] Radar: cnk: yes I did
[23:39:22] Radar: cnk: https://github.com/radar/twist
[23:39:50] cnk: Ahhh I'll have to have a look - after I get done w DDR
[23:40:09] Radar: It's been my hobby project for about 6 years
[23:40:14] alex88: has joined #RubyOnRails
[23:40:23] Radar: Manning's tooling WRT this was the shittiest piece of software I have ever used.
[23:40:59] Radar: https://vimeo.com/45002976
[23:43:15] linetrace: matthewd: looking at the full backtrace, it appears to be while instanciating the model because it validates the slug attribute
[23:46:43] roamingdog: has joined #RubyOnRails
[23:47:22] linetrace: matthewd: I’ll try converting to an array, so it’s not trying to instantiate since it’s not the full model data anyway
[23:47:40] hahuang65: has joined #RubyOnRails
[23:48:19] quazimodo: has joined #RubyOnRails
[23:53:25] FooMunki: has joined #RubyOnRails
[23:53:37] linetrace: matthewd: backtrace: https://gist.github.com/morgant/6e25679a59b30700b6b35ef3061463a7
[23:54:55] Trynemjoel: has joined #RubyOnRails
[23:55:43] matthewd: Okay so yeah, it's that callback
[23:57:35] roamingdog: has joined #RubyOnRails
[23:58:25] roamingdog: has joined #RubyOnRails
[23:59:10] roamingdog: has joined #RubyOnRails