« Back to channel list

#RubyOnRails - 17 September 2018

« Back 1 day Forward 1 day »
[00:02:40] Technodrome: has joined #RubyOnRails
[00:14:51] armyriad: has joined #RubyOnRails
[00:16:29] friedrubber: has joined #RubyOnRails
[00:23:28] friedrubber: If I have some_object of class Arel::SelectManager, and I run 'some_object.to_sql', I get a prepared sql statement. How can one get the associated bind values from some_object?
[00:24:54] friedrubber: My goal is to get an sql statement without bind values that can be executed in postgres.
[00:49:58] cschneid_: has joined #RubyOnRails
[00:53:42] sevenseacat: has joined #RubyOnRails
[00:56:13] duderonomy: has joined #RubyOnRails
[01:04:40] lunarkittychan: has joined #RubyOnRails
[01:14:05] samort7: has joined #RubyOnRails
[01:18:45] friedrubber: has joined #RubyOnRails
[01:22:34] s2013: has joined #RubyOnRails
[01:30:24] apparition: has joined #RubyOnRails
[01:38:01] orbyt_: has joined #RubyOnRails
[01:43:42] s2013: has joined #RubyOnRails
[02:01:53] tdy: has joined #RubyOnRails
[02:17:13] regedit: has joined #RubyOnRails
[02:22:30] i8igmac: are there any ide's i can install in my rails app to modify the current running web app
[02:23:08] i8igmac: text editors
[02:23:18] i8igmac: with a tree view
[02:24:34] i8igmac: i would like to make changes to the source from the webbrowser
[02:24:41] sevenseacat: uh... not that I know if, but that sounds like a really bizarre thing to do
[02:25:36] i8igmac: i think cpannel and wordpress have this kind of feature
[02:26:36] Saukk: has joined #RubyOnRails
[02:26:43] i8igmac: a text editor with syntax highlighting and a tree view of the project source
[02:27:00] darkhanb: has joined #RubyOnRails
[02:27:27] i8igmac: i have been trying to make a basic example, but i fail to even produce a tree view
[02:28:37] sevenseacat: why do you want this? what are you trying to achieve?
[02:38:43] cschneid_: has joined #RubyOnRails
[02:46:13] ivanskie: has joined #RubyOnRails
[02:46:45] i8igmac: im trying to make modifications to the project from my android phone
[02:47:05] i8igmac: a sublime text style interface is what im looking for from the browser
[02:47:59] i8igmac: i do all my coding on my android currently from ssh and nano... but this is a real struggle
[03:04:09] ariedler: has joined #RubyOnRails
[03:10:50] tdy: has joined #RubyOnRails
[03:11:57] braincrash: has joined #RubyOnRails
[03:18:23] darkhanb: has joined #RubyOnRails
[03:39:08] ivanskie: has joined #RubyOnRails
[03:52:04] cschneid_: has joined #RubyOnRails
[04:00:21] friedrubber: has left #RubyOnRails: ()
[04:05:20] srinidhi: has joined #RubyOnRails
[04:08:55] darkhanb: has joined #RubyOnRails
[04:13:00] sarmiena_: has joined #RubyOnRails
[04:18:46] sarmiena_: has joined #RubyOnRails
[04:23:12] ivanskie: has joined #RubyOnRails
[04:35:37] cschneid_: has joined #RubyOnRails
[04:46:31] lunarkittychan: has joined #RubyOnRails
[04:57:05] cschneid_: has joined #RubyOnRails
[05:01:41] vedu_: has joined #RubyOnRails
[05:03:40] vedu_: [cross-post] Hello. In rspec, can I specify certain tests to be 'slow' and run them only if specified?
[05:04:39] ariedler: has joined #RubyOnRails
[05:06:30] baweaver: https://relishapp.com/rspec/rspec-core/v/2-4/docs/command-line/tag-option
[05:06:39] kapil___: has joined #RubyOnRails
[05:10:26] cschneid_: has joined #RubyOnRails
[05:12:13] vedu_: baweaver: thanks!
[05:14:34] sarmiena_: has joined #RubyOnRails
[05:14:44] reber: has joined #RubyOnRails
[05:29:07] psychoslave: has joined #RubyOnRails
[05:38:22] psychoslave_: has joined #RubyOnRails
[05:41:16] snickers: has joined #RubyOnRails
[05:44:46] tdy: has joined #RubyOnRails
[05:49:35] cschneid_: has joined #RubyOnRails
[05:57:03] srinidhi: has joined #RubyOnRails
[05:58:07] srinidhi: has joined #RubyOnRails
[06:03:14] s2013: has joined #RubyOnRails
[06:15:09] Xiti`: has joined #RubyOnRails
[06:16:50] sandstrom: has joined #RubyOnRails
[06:23:27] darkhanb: has joined #RubyOnRails
[06:23:38] psychoslave: has joined #RubyOnRails
[06:28:43] cschneid_: has joined #RubyOnRails
[06:36:31] MoritaShinobu: has joined #RubyOnRails
[06:41:48] cschneid_: has joined #RubyOnRails
[06:55:18] MoritaShinobu: has joined #RubyOnRails
[06:59:00] cschneid_: has joined #RubyOnRails
[07:05:56] ariedler: has joined #RubyOnRails
[07:16:04] cschneid_: has joined #RubyOnRails
[07:24:39] s2013: has joined #RubyOnRails
[07:34:14] jenenliu: has joined #RubyOnRails
[07:38:04] cschneid_: has joined #RubyOnRails
[07:43:57] roshanavand: has joined #RubyOnRails
[07:55:05] sandstrom: has joined #RubyOnRails
[07:55:25] cschneid_: has joined #RubyOnRails
[08:02:05] lexileo: has joined #RubyOnRails
[08:26:27] cschneid_: has joined #RubyOnRails
[08:32:29] lxsameer: has joined #RubyOnRails
[08:37:30] moei: has joined #RubyOnRails
[08:47:57] uksio: has joined #RubyOnRails
[08:54:14] mikecmpbll: has joined #RubyOnRails
[08:59:02] Technodrome: has joined #RubyOnRails
[09:01:14] schneider1: has joined #RubyOnRails
[09:06:32] ariedler: has joined #RubyOnRails
[09:09:20] cschneid_: has joined #RubyOnRails
[09:15:48] defswork: has joined #RubyOnRails
[09:18:03] cschneid_: has joined #RubyOnRails
[09:21:39] jenenliu: has joined #RubyOnRails
[09:26:51] cschneid_: has joined #RubyOnRails
[09:31:48] sevenseacat: has joined #RubyOnRails
[09:31:51] cschneid_: has joined #RubyOnRails
[09:49:14] cschneid_: has joined #RubyOnRails
[09:49:16] xhoy: has joined #RubyOnRails
[10:08:49] jottr: has joined #RubyOnRails
[10:14:03] jottr: has joined #RubyOnRails
[10:22:00] emers3n: has joined #RubyOnRails
[10:29:33] apeiros: has joined #RubyOnRails
[10:37:09] mikecmpb_: has joined #RubyOnRails
[10:41:27] dionysus69: I have this line in log and the fail2ban failregex, it should work as I know but it doesn't, is my failregex correct? http://paste.debian.net/1042777/
[10:41:36] cschneid_: has joined #RubyOnRails
[10:48:44] lankanmon: has joined #RubyOnRails
[10:49:42] apparition: has joined #RubyOnRails
[10:50:08] Linuus: has joined #RubyOnRails
[10:55:10] ariedler: has joined #RubyOnRails
[10:59:08] cschneid_: has joined #RubyOnRails
[11:12:41] apeiros_: has joined #RubyOnRails
[11:20:50] cschneid_: has joined #RubyOnRails
[11:26:49] Terens: has joined #RubyOnRails
[11:27:03] Terens: what is the key difference between service objects and interactors?
[11:29:17] mikecmpbll: has joined #RubyOnRails
[11:31:00] srinidhi: has joined #RubyOnRails
[11:32:02] tbuehlmann: I couldn't tell
[11:33:55] cschneid_: has joined #RubyOnRails
[11:35:45] ldnunes: has joined #RubyOnRails
[12:14:22] roshanavand: has joined #RubyOnRails
[12:21:18] Linuus: has joined #RubyOnRails
[12:35:00] cschneid_: has joined #RubyOnRails
[12:36:28] Xiti: has joined #RubyOnRails
[12:42:22] vedu_: has joined #RubyOnRails
[12:44:30] vedu_: Hello. I am trying to get a simple action cable example working, but nothing is happening (no errors either). Code and logs: https://gist.github.com/vedant1811/3103d68cfd4fb5a64b3830169f1761a5
[12:45:37] apeiros_: ok, I'm too stupid - I have two local rails apps, one running on 127.0.0.1:3000, and the other on 127.0.0.1:3001. From 127.0.0.1:3001 I want to do a fetch("http://127.0.0.1:3000/api/somethings.json") in JS.
[12:46:10] apeiros_: At the moment I get "Origin http://127.0.0.1:3001 is not allowed by Access-Control-Allow-Origin"
[12:46:51] apeiros_: both are rails 5.2.1
[12:47:24] apeiros_: where do I have to add what to add this? my attempts at modifying config/initializers/content_security_policy.rb failed, as did my try to call `content_security_policy false` in the ApplicationController
[12:52:27] noob_on_rails: has joined #RubyOnRails
[12:55:49] IanMalcolm: has joined #RubyOnRails
[13:13:59] tbuehlmann: apeiros: shouldn't that be just CORS? https://github.com/cyu/rack-cors
[13:24:27] jottr: has joined #RubyOnRails
[13:29:47] jottr: has joined #RubyOnRails
[13:31:30] za1b1tsu: has joined #RubyOnRails
[13:36:43] apeiros: tbuehlmann: yeah, cors helped. thanks :)
[13:37:05] apeiros: I thought rails 5.2 had everything built-in already. took me a while to figure it wasn't so.
[13:37:39] tbuehlmann: CSP is for actually loading files, I'd say
[13:37:43] kapil___: has joined #RubyOnRails
[13:39:56] apeiros: as far as I understood it, it's two different sides of the same problem. if browser on website A.com wants to fetch data from B.com, it needs CSP info on A.com, and CORS on B.com
[13:40:38] apeiros: I'm still fuzzy from which attack vectors CORS provides protection. but will read that up soon enough.
[13:40:38] tbuehlmann: oh, right, that as well
[14:02:06] ariedler: has joined #RubyOnRails
[14:13:43] snickers: has joined #RubyOnRails
[14:24:23] IanMalcolm: has joined #RubyOnRails
[14:25:42] beholders_eye: has joined #RubyOnRails
[14:28:04] dionysus69: I am tinkering with fail2ban for a while now, this rule: REJECT all -- my_ip_here 0.0.0.0/0 reject-with icmp-port-unreachable gets added to the iptables but I am still able to render login page
[14:28:20] dionysus69: can anyone help me with this? :S rule seems to be corrrect
[14:30:33] jottr: has joined #RubyOnRails
[14:31:56] Linuus: has joined #RubyOnRails
[14:41:06] cschneid_: has joined #RubyOnRails
[14:41:45] Ergo: has joined #RubyOnRails
[14:58:54] snickers: has joined #RubyOnRails
[15:05:53] IanMalcolm: has joined #RubyOnRails
[15:09:07] duderonomy: has joined #RubyOnRails
[15:15:09] beholders_eye: has joined #RubyOnRails
[15:15:46] cagomez: has joined #RubyOnRails
[15:17:13] cagomez_: has joined #RubyOnRails
[15:19:53] cagomez__: has joined #RubyOnRails
[15:21:21] conta: has joined #RubyOnRails
[15:23:34] saiyanprince: has joined #RubyOnRails
[15:23:42] saiyanprince: has left #RubyOnRails: ()
[15:31:27] IanMalcolm: has joined #RubyOnRails
[15:34:50] beowuff: has joined #RubyOnRails
[15:35:39] Linuus: has joined #RubyOnRails
[15:39:55] snickers: has joined #RubyOnRails
[15:40:16] srinidhi: has joined #RubyOnRails
[15:54:26] justinweiss: has joined #RubyOnRails
[15:59:44] darkhanb: has joined #RubyOnRails
[16:00:28] ivanskie: has joined #RubyOnRails
[16:05:02] Technodrome: has joined #RubyOnRails
[16:06:21] ams__: has joined #RubyOnRails
[16:11:33] MaiconVieira: has joined #RubyOnRails
[16:11:34] sarmiena_: has joined #RubyOnRails
[16:17:54] lomex: has joined #RubyOnRails
[16:23:39] [Butch]: has joined #RubyOnRails
[16:38:40] lxsameer: has joined #RubyOnRails
[16:41:04] s2013: has joined #RubyOnRails
[16:48:44] lxsameer: has joined #RubyOnRails
[16:52:15] eckhardt_: has joined #RubyOnRails
[16:58:52] lxsameer: has joined #RubyOnRails
[17:08:40] lxsameer: has joined #RubyOnRails
[17:10:00] wojnar: has joined #RubyOnRails
[17:10:37] jgpawletko: has joined #RubyOnRails
[17:16:01] Technodrome: has joined #RubyOnRails
[17:18:49] lxsameer: has joined #RubyOnRails
[17:18:59] sameerynho: has joined #RubyOnRails
[17:24:57] Linuus: has joined #RubyOnRails
[17:28:55] lxsameer: has joined #RubyOnRails
[17:29:18] mikecmpbll: has joined #RubyOnRails
[17:30:27] knight33: has joined #RubyOnRails
[17:38:41] lxsameer: has joined #RubyOnRails
[17:39:14] duderonomy: has joined #RubyOnRails
[17:41:03] ariedler: has joined #RubyOnRails
[17:42:34] snickers: has joined #RubyOnRails
[17:44:19] jottr: has joined #RubyOnRails
[17:44:44] za1b1tsu: has joined #RubyOnRails
[17:46:19] duderonomy: has joined #RubyOnRails
[17:48:45] lxsameer: has joined #RubyOnRails
[17:56:14] nertzy: has joined #RubyOnRails
[17:58:46] lxsameer: has joined #RubyOnRails
[17:59:43] apeiros_: has joined #RubyOnRails
[18:06:11] Linuus: has joined #RubyOnRails
[18:07:15] dviola: has joined #RubyOnRails
[18:08:49] lxsameer: has joined #RubyOnRails
[18:10:47] tubbo: has joined #RubyOnRails
[18:14:30] jottr: has joined #RubyOnRails
[18:16:17] tubbo: has joined #RubyOnRails
[18:18:53] lxsameer: has joined #RubyOnRails
[18:24:22] Linuus: has joined #RubyOnRails
[18:25:12] knight33: has joined #RubyOnRails
[18:28:55] lxsameer: has joined #RubyOnRails
[18:38:50] lxsameer: has joined #RubyOnRails
[18:39:14] Linuus: has joined #RubyOnRails
[18:41:48] jackhum: has joined #RubyOnRails
[18:42:08] desperek: has joined #RubyOnRails
[18:48:48] lxsameer: has joined #RubyOnRails
[18:49:11] knight33: has joined #RubyOnRails
[18:52:25] s2013: has joined #RubyOnRails
[18:55:06] sandstrom: has joined #RubyOnRails
[18:58:51] lxsameer: has joined #RubyOnRails
[19:04:39] sandstrom: has joined #RubyOnRails
[19:06:37] pkayokay: has joined #RubyOnRails
[19:08:02] pkayokay: When developing a Rails App, should one create controllers, models, and then integrate user authentication? or should users be created first. What would be the best approach?
[19:08:50] lxsameer: has joined #RubyOnRails
[19:10:09] knight33: has joined #RubyOnRails
[19:18:54] lxsameer: has joined #RubyOnRails
[19:28:11] sandstrom: has joined #RubyOnRails
[19:29:03] jackhum: has joined #RubyOnRails
[19:29:22] lxsameer: has joined #RubyOnRails
[19:35:32] DTZUZO: has joined #RubyOnRails
[19:37:45] beingjohnm: I'd do users first
[19:38:23] beingjohnm: and, if you're starting from scratch, writing tests before writing any methods
[19:43:11] LiftLeft2: has joined #RubyOnRails
[19:43:27] ariedler: has joined #RubyOnRails
[19:57:43] Linuus: has joined #RubyOnRails
[19:58:31] nertzy: has joined #RubyOnRails
[20:11:41] DTZUZO: has joined #RubyOnRails
[20:25:48] Linuus: has joined #RubyOnRails
[20:29:42] samscam7: has joined #RubyOnRails
[20:30:54] samscam7: im having an issue with this tutorial im doing and was wondering i anyone would be able to help me
[20:42:32] baweaver: samscam7: Linking to the tutorial and explaining your issue will be much more likely to get answers.
[20:43:14] samscam7: ik i just wanted to see if there was anyone online before typing out a whole explanation
[20:43:42] samscam7: essentially the project is a website where developers and investors can meet and wtvr. one of the things is that theres a basic subscription and a pro subscription. my problem is that when i try to make a test account on the pro subscrition i get an error that says "plan must exist" and i have no idea why it doesnt
[20:43:42] samscam7: hope that makes sense
[20:43:42] samscam7: https://github.com/99Probl3ms/c9.git heres the repo
[20:45:26] Linuus: has joined #RubyOnRails
[20:45:33] samscam7: i think the problem is in this controller but i cant seem to find it
[20:45:34] samscam7: https://github.com/99Probl3ms/c9/blob/user_auth/app/controllers/users/registrations_controller.rb
[20:49:10] sarmiena_: has joined #RubyOnRails
[20:49:22] baweaver: (note that I have a meeting in a few minutes, so may take a bit to answer, just wanted to put that out there)
[20:53:18] samscam7: ill be on all day
[21:02:01] Linuus: has joined #RubyOnRails
[21:02:08] prettybTech: has joined #RubyOnRails
[21:06:57] hammer065: has joined #RubyOnRails
[21:14:11] Linuus: has joined #RubyOnRails
[21:22:32] IanMalcolm: has joined #RubyOnRails
[21:26:14] Linuus: has joined #RubyOnRails
[21:34:52] lxsameer: has joined #RubyOnRails
[21:38:19] Linuus: has joined #RubyOnRails
[21:39:26] jottr: has joined #RubyOnRails
[21:42:51] alireza: has joined #RubyOnRails
[21:43:09] alireza: any RubyOnRails member available?
[21:43:21] alireza: I've stock with a pull request
[21:43:30] Technodrome: has joined #RubyOnRails
[21:52:38] cagomez: has joined #RubyOnRails
[21:59:57] weaksauce: has joined #RubyOnRails
[22:00:26] mikecmpbll: has joined #RubyOnRails
[22:11:37] DTZUZO: has joined #RubyOnRails
[22:13:39] patrick99e99: has joined #RubyOnRails
[22:14:21] sarmiena_: has joined #RubyOnRails
[22:14:31] patrick99e99: rel = MyTable.select(:col1, :col2); rel.count => ActiveRecord::StatementInvalid: PG::UndefinedFunction: ERROR: function count(integer, character varying) does not exist
[22:14:35] patrick99e99: How can I get around this?
[22:15:22] Linuus: has joined #RubyOnRails
[22:16:25] patrick99e99: is calling to_a on my query object really the only way?
[22:16:39] wethu: has joined #RubyOnRails
[22:17:33] fragamus: has joined #RubyOnRails
[22:20:08] fragamus: has joined #RubyOnRails
[22:29:55] i8igmac: are there any working examples of rails and jstree for displaying a recursive directory structure
[22:30:57] i8igmac: <li id="<% Dir.glob('/tmp/*') %>">Child node 1</li>
[22:31:04] jackhum: has joined #RubyOnRails
[22:50:46] alireza: has left #RubyOnRails: ("WeeChat 2.1")
[22:53:21] s2013: has joined #RubyOnRails
[22:54:52] davidh38: has joined #RubyOnRails
[22:57:58] davidh38: hey guys,i am new here. i have created a new model in rails with @myuser = Mymodel.new(name: 'Max')
[22:58:10] davidh38: then i saved with @myuser.save
[22:59:03] davidh38: the problem i face, if i print it out, i cannot see the 'name' field, only 'created_at'
[23:00:03] davidh38: can anybody help me, i am a total noob at almost everything
[23:06:34] Linuus: has joined #RubyOnRails
[23:07:29] jackhum: has joined #RubyOnRails
[23:10:13] agent_white: has joined #RubyOnRails
[23:12:06] IanMalcolm: has joined #RubyOnRails
[23:16:06] jottr: has joined #RubyOnRails
[23:23:21] DTZUZO_: has joined #RubyOnRails
[23:25:51] baweaver: davidh38: define "print"
[23:25:54] fragamus: has joined #RubyOnRails
[23:26:01] baweaver: How are you printing it out?
[23:26:28] s2013: has joined #RubyOnRails
[23:26:34] baweaver: patrick99e99: What are you trying to count?
[23:26:47] baweaver: select and count don't really make sense together
[23:26:55] baweaver: group and count do though
[23:26:56] samscam7: has joined #RubyOnRails
[23:27:17] davidh38: @baweaver i print the model, i think i found the mistake. If i generate a model, i have to add my custom fields in my "rake" command
[23:27:32] samscam7: @baweaver, u get a chance to look at my code?
[23:27:45] baweaver: Aha, you are online now
[23:27:52] baweaver: was trying to type at you
[23:28:07] baweaver: create capitalized is odd.
[23:28:36] baweaver: davidh38: You mean the `rails g model ...` type commands?
[23:28:41] patrick99e99: baweaver: yeah I get it, but it just sucks.. I have a db table with millions of rows, and one column is json with lots of stuff, so there are issues where servers crash from running out of memory, and to get around this, I added select in some cases so that the serialization of those rows don't include those json columns.. but anywhere that was previously doing .count on the relation blows up unless I do .to_a on it first,
[23:28:49] davidh38: @baweaver exactly
[23:28:51] patrick99e99: but I get it.. its just an unfortunate situation all around
[23:30:03] baweaver: count shouldn't even serialize those rows though, so that's interesting.
[23:30:27] baweaver: If you're just trying to get a count of all rows, it should just give a scan of the count of rows
[23:30:50] baweaver: You could always throw a `explain` on the end of it to see what shenanigans may be going on
[23:32:21] baweaver: samscam7: Are you absolutely certain the plan exists?
[23:33:04] samscam7: if i call it in the console it comes up
[23:33:18] samscam7: so i guess it does
[23:33:33] baweaver: Ever heard of pry?
[23:33:50] samscam7: im a complete noob :/
[23:34:01] baweaver: https://github.com/rweng/pry-rails
[23:34:09] baweaver: One sec, let me find a video tutorial somewhere
[23:34:30] samscam7: what does it do?
[23:34:35] baweaver: https://www.youtube.com/watch?v=4hfMUP5iTq8
[23:34:41] baweaver: Think Rails Console, but more powerful
[23:35:13] baweaver: https://richonrails.com/articles/easier-debugging-with-pry
[23:35:23] baweaver: You can set a break point right before the save and see what context there is around it that might be causing you pain
[23:35:42] samscam7: awesome thanks a ton
[23:35:54] samscam7: i'll give it a try andd report back
[23:36:04] davidh38: @baweaver thanks for offering help, i appreciate that. it worked with rails g migration AddFieldsToMymodel name:string
[23:36:27] baweaver: davidh38: What are you working through?
[23:36:31] baweaver: tutorial wise.
[23:37:13] baweaver: samscam7: half the time I stick a `binding.pry` somewhere, look around, and the issue becomes real clear real quick
[23:37:29] davidh38: @baweaver i started out with a youtube video https://www.youtube.com/watch?v=pPy0GQJLZUM
[23:37:58] davidh38: it helped me, but i am still missing some basics i think. Would you recommend something?
[23:38:16] baweaver: What are you learning Rails for specifically?
[23:38:23] baweaver: Depending on that, there are a few things
[23:38:35] baweaver: Also see the book list in the channel topic
[23:41:31] sheepman: has joined #RubyOnRails
[23:41:35] davidh38: @baweaver i just want to do simple things, writing and reading to a database, using bootstrap maybe and calling restapis and use this data
[23:42:09] baweaver: Check through the book list, it might give you some ideas.
[23:42:12] davidh38: @baweaver thanks i will check out the book list
[23:47:48] davidh38: @baweaver i think i will be going through this: https://www.railstutorial.org . Looks awesome, thank you
[23:56:01] s2013: has joined #RubyOnRails
[23:58:33] sheepman: has joined #RubyOnRails
[23:59:55] DTZUZO_: has joined #RubyOnRails