« Back to channel list

#RubyOnRails - 26 May 2016

« Back 1 day Forward 1 day »
[00:04:55] Inside: has joined #RubyOnRails
[00:04:55] Inside: has joined #RubyOnRails
[00:07:01] jeanlinux: has joined #RubyOnRails
[00:09:02] Technodrome: has joined #RubyOnRails
[00:09:20] GodFather__: has joined #RubyOnRails
[00:11:37] arBmind1: has joined #RubyOnRails
[00:11:39] neanderslob: has joined #RubyOnRails
[00:11:42] rodfersou: has joined #RubyOnRails
[00:12:30] jm3: has joined #RubyOnRails
[00:19:28] mrgreenfur: has left #RubyOnRails: ()
[00:27:07] gmas: has joined #RubyOnRails
[00:30:02] jstransky: has joined #RubyOnRails
[00:33:29] micahbf: has joined #RubyOnRails
[00:34:45] pawnbox: has joined #RubyOnRails
[00:40:34] jancel: has joined #RubyOnRails
[00:41:26] Dios: has joined #RubyOnRails
[00:41:53] centrx: has joined #RubyOnRails
[00:43:20] Dios: has joined #RubyOnRails
[00:43:30] Ropeney: has joined #RubyOnRails
[00:44:01] Technodrome: has joined #RubyOnRails
[00:44:14] owenjones: has joined #RubyOnRails
[00:45:18] Dios: has joined #RubyOnRails
[00:46:25] centrx: has joined #RubyOnRails
[00:47:15] Dios: has joined #RubyOnRails
[00:47:48] eGGshke: has joined #RubyOnRails
[00:49:39] bronson: has joined #RubyOnRails
[00:50:21] alethea: has joined #RubyOnRails
[00:50:28] hobodave: has joined #RubyOnRails
[00:53:39] hobodave: has joined #RubyOnRails
[00:53:49] rubyonrails808: has joined #RubyOnRails
[00:53:57] sypheren: has joined #RubyOnRails
[00:54:15] emachnic: has joined #RubyOnRails
[00:54:20] s2013: has joined #RubyOnRails
[00:55:04] s2013: dumb quesiton but why would my field that is decimal, scale set to 2 (price field) return one decimal point
[00:56:30] hobodave: has joined #RubyOnRails
[00:56:57] Radar: s2013: t.decimal :price, scale: 2?
[00:58:16] s2013: precision: 8
[00:58:24] s2013: and its all the fields that has that too, not just one
[00:59:19] s2013: for example: add_column :accounts, :available_balance, :decimal, scale: 2, precision: 8
[00:59:21] s2013: thats from the migration
[00:59:38] s2013: Account.last.available_balance.to_f ----> 5.0
[00:59:56] Radar: Wait, 5.0?
[00:59:59] s2013: and also when its being sent in a response
[01:00:08] s2013: should be 5.00
[01:00:12] Radar: That's intentional Ruby floating point behaviour.,
[01:00:25] Radar: Let me introduce you to my friend, the Money gem
[01:00:33] jancel: has joined #RubyOnRails
[01:00:33] Radar: https://rubygems.org/gems/money
[01:01:01] s2013: well i mean is there anyway to return decimals as .00 cause we are returning @account.as_json for example
[01:01:07] Radar: [11:00:41] <Radar> Let me introduce you to my friend, the Money gem
[01:01:09] s2013: yeah i used money gem before
[01:01:09] Radar: [11:00:48] <Radar> https://rubygems.org/gems/money
[01:01:14] Radar: I just gave you the answer.
[01:01:22] s2013: i meant w/o using any gem
[01:01:26] Radar: Decimals in Ruby will only display as many zeros as necessary.
[01:01:39] Ebok: You'd have to turn it into a string
[01:01:47] yfeldblum: has joined #RubyOnRails
[01:01:54] Radar: Could probably do it with some arcane sprintf command
[01:01:59] beilabs: has joined #RubyOnRails
[01:02:06] Radar: OR you could do what sensible Ruby devs do when they want to display money things and use the money gem
[01:02:24] Radar: Did I mention that I like the Money gem?
[01:02:31] Radar: Did I also mention that I think that you should use the money gem?
[01:02:35] Radar: Not sure I got my point 100% across
[01:02:42] Ebok: I think that you liking the oney gem has gotten me to start liking the money gem
[01:02:44] s2013: yeah now i have to do migration
[01:02:48] Radar: please let me know if you're unsure if I am completely sure that you should use the money gem
[01:03:01] Radar: Ebok: yeah it's contagious totes
[01:03:20] Ebok: I love to learn about wellused and muchloved gems
[01:03:38] Ebok: I've not had the opporunity to play with as many as I want to
[01:03:50] tweeeaks: has joined #RubyOnRails
[01:04:05] paradisaeidae: has joined #RubyOnRails
[01:04:12] yfeldblum: has joined #RubyOnRails
[01:04:18] Radar: Surprisingly it doesn't like using the money gem is a Railscast.
[01:04:53] Ebok: I need to watch more railscast that being said
[01:05:15] Ebok: I stard to play with node.js and then realized I like ruby better. lol
[01:05:18] Ebok: Ahem started*
[01:05:22] ensyde: has joined #RubyOnRails
[01:05:36] glasz_: has joined #RubyOnRails
[01:07:44] alxndr: has joined #RubyOnRails
[01:10:32] tweeeaks: you realized because you're smart.
[01:11:01] s2013: someone lend me your eyes for a min. https://gist.github.com/ss2k/4137d23d4d5ea38b450e2b28babde8b3
[01:11:09] s2013: there is a syntax error on line 14.. im not seeing it..
[01:11:43] s2013: app/controllers/api/v1/withdrawals_controller.rb:14: syntax error, unexpected end-of-input, expecting keyword_end
[01:13:14] Ropeney: whole stack trace, whole controller :D
[01:13:29] s2013: that is the whole controller
[01:14:51] yfeldblum: has joined #RubyOnRails
[01:15:19] sevenseacat: has joined #RubyOnRails
[01:15:59] xlegoman: has joined #RubyOnRails
[01:16:03] s2013: Jesus Christ
[01:16:05] s2013: nevermind
[01:16:11] Radar: What was it
[01:16:38] yfeldblum: has joined #RubyOnRails
[01:16:47] Radar: Did you not save the file?
[01:16:55] Radar: Because that code compiles successfully for me.
[01:17:38] triptec: has joined #RubyOnRails
[01:18:39] idefine: has joined #RubyOnRails
[01:18:59] s2013: something like that.. it was saved in a different location orignally but i removed it but when i pressed save it saved in that location instaed of the right one
[01:19:57] Dios: has joined #RubyOnRails
[01:20:40] s2013: has joined #RubyOnRails
[01:22:21] godzillaenlacasa: has joined #RubyOnRails
[01:23:21] KucukMubasir: has joined #RubyOnRails
[01:26:02] pawnbox: has joined #RubyOnRails
[01:30:41] Technodrome: has joined #RubyOnRails
[01:33:17] triptec: has joined #RubyOnRails
[01:36:52] moeabdol: has joined #RubyOnRails
[01:38:09] one_zero: has joined #RubyOnRails
[01:38:14] triptec: has joined #RubyOnRails
[01:39:42] nettoweb: has joined #RubyOnRails
[01:42:37] hayden__: has joined #RubyOnRails
[01:43:55] beilabs: has joined #RubyOnRails
[01:45:15] owenjones: has joined #RubyOnRails
[01:48:08] bronson: has joined #RubyOnRails
[01:48:31] kgrz: has joined #RubyOnRails
[01:49:20] maxz: has joined #RubyOnRails
[01:51:31] datanois1: has joined #RubyOnRails
[01:52:06] Dios: has joined #RubyOnRails
[01:55:20] idefine: has joined #RubyOnRails
[01:55:48] jeanlinux: has joined #RubyOnRails
[01:58:16] jenrzzz: has joined #RubyOnRails
[01:59:14] barhum2013: has joined #RubyOnRails
[02:01:46] DoctorMonocular: has joined #RubyOnRails
[02:02:10] paradisaeidae: has joined #RubyOnRails
[02:02:36] Devalo: has joined #RubyOnRails
[02:02:44] owenjones: has joined #RubyOnRails
[02:05:10] jeyraof: has joined #RubyOnRails
[02:05:34] jord: has joined #RubyOnRails
[02:05:46] akshat: has joined #RubyOnRails
[02:06:37] arBmind: has joined #RubyOnRails
[02:06:38] Sr_X: has joined #RubyOnRails
[02:07:19] markfletcher: has joined #RubyOnRails
[02:10:18] bratsche: has joined #RubyOnRails
[02:11:00] jeyraof: has joined #RubyOnRails
[02:17:56] pawnbox: has joined #RubyOnRails
[02:18:14] jancel: has joined #RubyOnRails
[02:31:54] wolfravenous: has joined #RubyOnRails
[02:32:35] idefine: has joined #RubyOnRails
[02:33:25] maxz: has joined #RubyOnRails
[02:33:54] ziggy: has joined #RubyOnRails
[02:33:54] ziggy: has joined #RubyOnRails
[02:38:32] pawnbox: has joined #RubyOnRails
[02:39:08] wolfraven: has joined #RubyOnRails
[02:40:08] wolfraven: has left #RubyOnRails: ()
[02:40:45] gfvcastro: has joined #RubyOnRails
[02:41:06] wolfravenous: has joined #RubyOnRails
[02:43:11] acovrig: has joined #RubyOnRails
[02:46:32] Rodya_: has joined #RubyOnRails
[02:48:21] eGGshke: has joined #RubyOnRails
[02:48:45] bronson: has joined #RubyOnRails
[02:48:51] Technodrome: has joined #RubyOnRails
[02:50:51] Brando753: has joined #RubyOnRails
[02:53:20] arBmind: has joined #RubyOnRails
[02:53:59] sstubben: has joined #RubyOnRails
[02:54:30] emachnic: has joined #RubyOnRails
[02:55:16] datanois1: has joined #RubyOnRails
[02:57:56] zeknox: has joined #RubyOnRails
[02:58:15] zeknox: has left #RubyOnRails: ()
[02:58:48] robbyoconnor: has joined #RubyOnRails
[03:02:26] dionysus69: has joined #RubyOnRails
[03:02:52] gfvcastro: has joined #RubyOnRails
[03:04:24] robbyoconnor: has joined #RubyOnRails
[03:04:57] DoctorMonocular: has joined #RubyOnRails
[03:10:39] qsun: has joined #RubyOnRails
[03:10:56] maxdoubt: has joined #RubyOnRails
[03:11:20] emachnic: has joined #RubyOnRails
[03:12:16] DoctorMonocular: has joined #RubyOnRails
[03:14:09] braincrash: has joined #RubyOnRails
[03:14:19] pawnbox: has joined #RubyOnRails
[03:21:18] k3rn31: has joined #RubyOnRails
[03:23:19] owenjones: has joined #RubyOnRails
[03:24:14] sstubben: has joined #RubyOnRails
[03:25:03] moeabdol: has joined #RubyOnRails
[03:28:43] paradisaeidae: has joined #RubyOnRails
[03:32:50] sstubben: Hi folks :) I have a question regarding the Ransack gem, and using it for conditional filtering/searching. I've created a gist with my files for the issue in question:
[03:33:05] sstubben: https://gist.github.com/sstubben/259b495682b4cf65daebf98e8ed356b9
[03:33:23] Dios: has joined #RubyOnRails
[03:34:50] sstubben: I am trying to compare attributes of two models with a predicate selector in between. Of all the examples I can find online (Stackoverflow, Railscast and other Googling..) it doesn't seem possible to compare/filter two attributes wih Ransack
[03:36:04] sstubben: Anyone has experience with Ransack and using for different filtering purposes?
[03:36:54] idefine: has joined #RubyOnRails
[03:37:03] JesseH: has joined #RubyOnRails
[03:40:15] moeabdol: has joined #RubyOnRails
[03:43:10] jaequery: has joined #RubyOnRails
[03:46:20] Caerus|Away: has joined #RubyOnRails
[03:46:26] barhum2013: has joined #RubyOnRails
[03:47:17] tjvc: has joined #RubyOnRails
[03:47:17] tjvc: has joined #RubyOnRails
[03:48:28] tgeeky: has joined #RubyOnRails
[03:49:20] Inside: has joined #RubyOnRails
[03:49:20] Inside: has joined #RubyOnRails
[03:49:32] bronson: has joined #RubyOnRails
[03:52:27] han`: has joined #RubyOnRails
[03:52:51] triptec: has joined #RubyOnRails
[03:56:24] siaw23: has joined #RubyOnRails
[03:59:50] sillypog: has joined #RubyOnRails
[04:00:49] markelite: has joined #RubyOnRails
[04:02:22] bronson: has joined #RubyOnRails
[04:04:20] chintanparikh: has joined #RubyOnRails
[04:06:23] Devalo: has joined #RubyOnRails
[04:08:08] pawnbox: has joined #RubyOnRails
[04:08:23] centrx: has joined #RubyOnRails
[04:10:39] han`: has joined #RubyOnRails
[04:13:52] rickmasta: has joined #RubyOnRails
[04:14:06] stardiviner: has joined #RubyOnRails
[04:15:26] indianowl: has joined #RubyOnRails
[04:18:10] zenbae: has joined #RubyOnRails
[04:19:16] chintanparikh: Hey all - I have an interesting polymorphic association question. I have the following models: Deal, Task, File and Folder. A task belongs_to :deal, and has_many :folders and :documents, as: :parent. A folder has_many :documents, as: :parent. Is there a clean way to get the parent's deal_id from both a Folder and a Document? From folder, I could easily do a parent.deal_id but from folder, I don't know if I have to go up one level or two to get
[04:19:17] chintanparikh: ikh/5e9abe80375a266c9fecfd569c768f73
[04:19:58] zenbae: Hi. I have a serious job offer from Rogers to work as a Ruby On Rails developer, on-site at the Rogers Campus in Toronto, Ontario, Canada. I've had 1 Ruby on Rails job in the past, QRIDit Home Watch Edition (SaaS) and one Ruby job in the past, 1ShoppingCart. I would like to know how best to get this job with a cover letter and resume. I'd like to see some examples. I'm, in all honesty, asking for guidance to really score this Ruby
[04:20:00] tgeeky: chintanparikh: that does not look like it pasted correctly.
[04:20:36] zenbae: Also Ruby syntax makes emoitocons in XChat. You might want to look into that. It's hard to read.
[04:20:39] chintanparikh: Message looks okay
[04:20:54] chintanparikh: Gist should explain everything
[04:21:10] tgeeky: chintanparikh: the gist link, in particular, did not paste right
[04:21:29] chintanparikh: Strange, here it is again: https://gist.github.com/chintanparikh/5e9abe80375a266c9fecfd569c768f73
[04:21:36] chintanparikh: Any issues this time?
[04:21:47] chintanparikh: The first one works for me
[04:21:52] tgeeky: chintanparikh: looks fine. the issue was the fact that your message was very long and went over the limit for one line.
[04:21:59] chintanparikh: Ah gotcha, thanks!
[04:22:02] tgeeky: the last words of your line were: two to get
[04:22:10] tgeeky: ikh/5e9abe80375a266c9fecfd569c768f73
[04:22:14] tgeeky: on the next line
[04:22:30] chintanparikh: Ah okay here's the last line for that explanation
[04:22:34] chintanparikh: I could easily do a parent.deal_id but from folder, I don't know if I have to go up one level or two to get the deal_id.
[04:22:45] chintanparikh: I could easily do a parent.deal_id but from folder, I don't know if I have to go up one level or two to get the deal_id for Document
[04:23:50] owenjones: has joined #RubyOnRails
[04:23:56] tgeeky: man, I'm so lost. I'm trying to get the 'sb-admin-2' from boostrap working, to see *anything*, and I can't figure out if I'm including the right files, the right javascripts, etc
[04:24:05] tgeeky: bower was supposed to handle much of this
[04:24:21] tgeeky: but I'm not sure I'm even pointing to the right places correctly (I am trying to point to vendor/assets/bower_components/**, more or less)
[04:24:29] chintanparikh: Updated the gist to show what I'm trying in folder.rb
[04:25:41] zenbae: http://imgur.com/b2RyRlZ
[04:27:21] tgeeky: to be very particular, i'm trying to follow these instructions: http://stackoverflow.com/questions/30387593/how-to-add-sb-admin-v2-in-ruby-on-rails-app
[04:28:01] Rodya_: has joined #RubyOnRails
[04:31:29] kgrz: has joined #RubyOnRails
[04:31:35] chintanparikh: tgeeky: You're using bower-rails?
[04:31:49] tgeeky: chintanparikh: yes
[04:31:53] tgeeky: well, trying to.
[04:32:30] diegoaguilar: has joined #RubyOnRails
[04:33:02] chintanparikh: Can you post code?
[04:33:05] chintanparikh: And directory structure
[04:37:57] nettoweb: has joined #RubyOnRails
[04:39:29] idefine: has joined #RubyOnRails
[04:41:24] triptec: has joined #RubyOnRails
[04:42:09] GnuYawk: has joined #RubyOnRails
[04:42:12] GnuYawk: has joined #RubyOnRails
[04:43:26] tgeeky: https://gist.github.com/technogeeky/8f01b7ddba5f1d958f7f7ed47eb1cacd
[04:43:29] tgeeky: chintanparikh: sorry that took so long...
[04:44:09] gfvcastro: has joined #RubyOnRails
[04:44:41] tildes_: has joined #RubyOnRails
[04:44:54] ziggy: has joined #RubyOnRails
[04:45:46] GnuYawk: HAHAH its ok tgeeky
[04:46:07] tgeeky: i don't even understand how to *check* if any .js or .css assets are loaded
[04:47:03] zenbae: https://gist.github.com/jmcveigh/f0344c969188a699828c
[04:47:11] GnuYawk: add an alert() or background-color: pink
[04:47:18] zenbae: has left #RubyOnRails: ()
[04:47:52] tgeeky: GnuYawk: ah, in the js?
[04:47:55] Alazoral: has joined #RubyOnRails
[04:47:58] tgeeky: or... the css respectively. i see
[04:48:12] artemaminov: has joined #RubyOnRails
[04:48:13] GnuYawk: thats what i do, at least
[04:48:47] datanois1: has joined #RubyOnRails
[04:48:52] Tempesta: has joined #RubyOnRails
[04:49:18] eGGshke: has joined #RubyOnRails
[04:51:19] jenrzzz: has joined #RubyOnRails
[04:53:33] arBmind: has joined #RubyOnRails
[04:54:14] edwinvdgraaf: has joined #RubyOnRails
[04:54:58] alfie_max15: has joined #RubyOnRails
[04:56:21] pawnbox: has joined #RubyOnRails
[05:03:19] bronson: has joined #RubyOnRails
[05:03:45] Terens: has joined #RubyOnRails
[05:05:30] idefine: has joined #RubyOnRails
[05:10:01] maxz: has joined #RubyOnRails
[05:10:33] beilabs_: has joined #RubyOnRails
[05:10:55] mrgreenfur_: has joined #RubyOnRails
[05:12:57] Devalo: has joined #RubyOnRails
[05:16:09] beilabs: has joined #RubyOnRails
[05:17:58] jenrzzz: has joined #RubyOnRails
[05:18:48] sneakersec: has joined #RubyOnRails
[05:20:36] alfie_max15: has joined #RubyOnRails
[05:23:12] dionysus69: has joined #RubyOnRails
[05:23:35] han`: has joined #RubyOnRails
[05:36:01] sillypog: has joined #RubyOnRails
[05:37:44] cgfbee: has joined #RubyOnRails
[05:38:03] DoctorMonocular: has joined #RubyOnRails
[05:38:05] rvanlieshout: has joined #RubyOnRails
[05:39:53] datanois1: has joined #RubyOnRails
[05:39:56] andrew9184: has joined #RubyOnRails
[05:40:14] Cohedrin: has joined #RubyOnRails
[05:50:03] jenrzzz: has joined #RubyOnRails
[05:54:34] moeabdol: has joined #RubyOnRails
[05:56:49] barhum2013: has joined #RubyOnRails
[06:00:04] maxz: has joined #RubyOnRails
[06:02:25] stardiviner: has joined #RubyOnRails
[06:03:58] hahuang65: has joined #RubyOnRails
[06:04:10] bronson: has joined #RubyOnRails
[06:08:09] Macaveli: has joined #RubyOnRails
[06:08:12] alfie_max15: has joined #RubyOnRails
[06:08:18] aiguu_: has joined #RubyOnRails
[06:08:44] aiguu_: Is it safe to make application.js application.coffee? How come application is the only js file generated when all others are coffee?
[06:08:55] Radar: yes it's safe
[06:10:00] jancel: has joined #RubyOnRails
[06:10:13] aiguu_: @Radar: Thanks!
[06:10:33] aiguu_: Does anyone know why Rails would generate application.js instead of application.coffee if it prefers cs everywhere else?
[06:10:41] aiguu_: I'm just curious :p
[06:12:39] duncannz: has joined #RubyOnRails
[06:12:49] pwnd_nsfw`: has joined #RubyOnRails
[06:13:36] Axy: has joined #RubyOnRails
[06:14:18] njero: has joined #RubyOnRails
[06:15:49] alfie_max15: has joined #RubyOnRails
[06:18:11] lxsameer: has joined #RubyOnRails
[06:20:45] tgeeky: outdated generator code?
[06:21:13] qsun_: has joined #RubyOnRails
[06:21:58] Radar: Submit a patch to fix it.
[06:22:24] Radar: You might get a response from DHH himself. Just like I got with this one I submitted just this week: https://github.com/rails/rails/pull/25115
[06:22:44] tgeeky: did he call you an unbelievable twat?
[06:22:59] Radar: He claimed I was "discharging bile"
[06:23:21] Radar: And that I was the one being antagonistic.
[06:23:48] tgeeky: i'm too busy doing work to care, but were you? :o
[06:24:59] Radar: Part of my job description is harassment of DHH
[06:25:14] tgeeky: that's kind of cool actually
[06:25:25] tgeeky: i mean, not because he's e-famous (I couldn't care less)
[06:25:32] tgeeky: but to be able to do it on the regular, how delightful
[06:25:44] Radar: It's pretty much a yearly thing for about the past 6 years.
[06:26:01] Radar: I find some novel way of getting some rage out of him and we all have a good laugh and move on.
[06:26:21] Radar: I continue evangelising his framework and writing books about it, so he is actually getting the better end of the deal.
[06:26:22] tgeeky: you could upgrade and do the same to linus torvalds
[06:26:29] yfeldblum: has joined #RubyOnRails
[06:26:30] comrad: has joined #RubyOnRails
[06:27:16] yfeldblum: has joined #RubyOnRails
[06:27:47] Radar: Linus at least cares about the non-bloatiness of Linux...
[06:27:58] Radar: I would have to go an exceptionally different tact with Linus.
[06:28:10] tgeeky: yeah, but he could probably crush your soul more effectively.
[06:30:52] pawnbox: has joined #RubyOnRails
[06:33:44] tgeeky: like turning coal into diamond
[06:36:35] Pazician: has joined #RubyOnRails
[06:37:18] roelof: has joined #RubyOnRails
[06:37:47] roelof: Hello, Am I right that Model.limit(10).order('updated_at desc') gives me the last 10 updated items ?
[06:37:56] Radar: roelof: Yes that's right.
[06:39:42] conta: has joined #RubyOnRails
[06:39:54] roelof: Then I hope I get find_or_create working to update or create things and im a happy man. then i have a project ready which has to be due tomorrow afternoon
[06:41:40] roelof: I think I can use this idea : http://lpaste.net/164573
[06:42:58] okdas: has joined #RubyOnRails
[06:42:58] okdas: has joined #RubyOnRails
[06:43:10] tetraktys: has joined #RubyOnRails
[06:44:45] Cohedrin: has joined #RubyOnRails
[06:47:22] alfie_max15: has joined #RubyOnRails
[06:49:51] eGGshke: has joined #RubyOnRails
[06:50:00] armyriad: has joined #RubyOnRails
[06:50:58] roelof: Radar: one more question : I m looking for a record which has some name
[06:52:20] roelof: So I do this : Painting.find(name: "Piero di Cosimo") and I see this message : Couldn't find Painting with 'id'={:name=>"Piero di Cosimo"}
[06:52:44] roelof: why on earth is rails looking for a id ?
[06:52:52] armyriad: has joined #RubyOnRails
[06:52:54] roelof: I want to search for a name
[06:52:54] njero: roelof: find_by
[06:54:08] arBmind: has joined #RubyOnRails
[06:54:19] sstubben: has joined #RubyOnRails
[06:55:16] tildes: roelof: ActiveRecord#find expects id or an array of ids as argument: http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method-i-find
[06:55:31] tildes: whenever in doubt about a method, take a look at documentation
[06:55:38] roelof: n_e_o: does find_by only finds the first record ?
[06:56:18] njero: roelof: then you're looking for .where() :)
[06:56:33] njero: tildes: +1
[06:59:58] njero: i asked some doubt regarding rails passenger deployment yesterday. can i repost? could n't figure out the reason yet :(
[07:01:10] roelof: Now I see this problem. Maybe use a if before the find_by ? or must I put Painting before the create and update function ?
[07:01:15] roelof: link : https://gist.github.com/rwobben/8bb0e7465ef95dc6af61d1e59fa42c36
[07:01:26] Megamos: has joined #RubyOnRails
[07:01:33] njero: silence.. i take it as a yes :)
[07:01:43] GorillaApe: has joined #RubyOnRails
[07:02:06] Dimik: has joined #RubyOnRails
[07:02:10] sevenseacat: roelof: what is that code meant to do?
[07:02:23] GorillaApe: hello I have product and reviews model and controller.
[07:02:37] Devalo: has joined #RubyOnRails
[07:02:38] GorillaApe: I want to embded review form into product show action
[07:02:59] roelof: it 's mean to look if a record exist, if so update it , if the record do not exist, create it sevenseacat
[07:03:19] sevenseacat: roelof: that code is finding a record, and then... trying to create it?
[07:03:20] GorillaApe: how can I handle form submission errors ? Because It would navigate from product show to reviews create
[07:04:20] roelof: sevenseacat: oke, so I need a if then else solution ?
[07:04:56] roelof: I see what you mean the update and create are mixed up
[07:04:57] njero: roelof: http://guides.rubyonrails.org/active_record_querying.html go through it
[07:05:19] tildes: n_e_o: +1
[07:07:03] pipework: roelof: you mean upsert?
[07:07:34] roelof: pipework: sorry, I do not know upsert ? What does it mean ?
[07:07:38] pipework: roelof: google
[07:08:41] triptec: has joined #RubyOnRails
[07:09:27] alfie_max15: roelof, try not to use if-else there are better active record methods to handle these kind of cases
[07:10:08] AimlessRAven: has joined #RubyOnRails
[07:10:33] njero: Reposting:
[07:10:34] njero: Hi, I have a rails app running on passenger standalone. Iam trying to figure out req/sec.
[07:10:34] njero: With 100req concurrent => I got 100 response success
[07:10:34] njero: with 110req concurrent => Iam losing 107req all together and 3req with non 2xx
[07:10:34] njero: What's the reason for such behavour instead on handling what it can handle max?
[07:10:40] AimlessRAven: https://gist.github.com/anonymous/e75823c43b169ae0060407c8e5574ccd
[07:10:45] AimlessRAven: how to set this in model method
[07:10:47] AimlessRAven: then rend here
[07:10:51] AimlessRAven: to looks pretty
[07:11:39] roelof: alfiemax: oke, I will try to find one
[07:12:40] njero: GorillaApe: i think you're looking for some ajax reqsts
[07:13:37] roelof: alfiemax: you mean a solution like this one : https://codebrahma.com/implementing-upsert-in-rails/
[07:13:55] lxsameer: has joined #RubyOnRails
[07:13:55] lxsameer: has joined #RubyOnRails
[07:14:57] ferr: has joined #RubyOnRails
[07:15:04] alfiemax: roelof, yes
[07:15:05] GorillaApe: n_e_o: indeed but I hate writing jquery to hightlight
[07:15:19] GorillaApe: so I would return whole form maybe
[07:15:31] roelof: oke, I hope I can find out how to put my arguments in it
[07:15:33] alfiemax: GorillaApe, in that case you need to alter the current flow
[07:16:12] PlasmaStar: has joined #RubyOnRails
[07:16:35] alfiemax: the for in the show method should not post to `create` action, instead have it post to some other action, within which you validate, and on occurence of errors, render the show page again
[07:16:38] hive-mind: has joined #RubyOnRails
[07:16:47] roelof: oke, I see it I have to put the record in the attributes , Right, alfiemax
[07:17:42] AimlessRAven: can anyone help me
[07:17:44] AimlessRAven: https://gist.github.com/anonymous/e75823c43b169ae0060407c8e5574ccd
[07:17:44] alfiemax: roelof, in your case i wouldn't say you should use the exact same method described t=in that blog
[07:17:53] AimlessRAven: i wanna set this in model method and rend here
[07:17:58] AimlessRAven: how would be looks like my method
[07:18:27] xibalba: is rails5 out?
[07:18:44] sevenseacat: xibalba: https://rubygems.org/gems/rails
[07:19:10] roelof: alfiemax: oke, now im confused now
[07:19:55] roelof: I think I let the database get filled once , making it dynamic with upsert is more then I can chew
[07:20:23] sstubben: Hi all :) I have submitted a question to Stackoverflow regarding an issue with Ransack: http://stackoverflow.com/questions/37452048/advanced-search-with-ransack-1-7-0-and-rails
[07:20:34] sstubben: I've created a Gist for it here as well: https://gist.github.com/sstubben/259b495682b4cf65daebf98e8ed356b9
[07:21:44] alfiemax: roelof, Painting.find_or_initialize_by().update()
[07:21:55] sstubben: Anyone with Ransack experience, more specifically conditional search/filtering and selecting attributes?
[07:22:20] alfiemax: roelof, something like that, i didn't try that out, mostly wont work :)
[07:24:05] roelof: oke, and between the () I could put my record definition like I did on my earlier code
[07:24:06] jstransky: has joined #RubyOnRails
[07:24:59] alfiemax: yes, the first one would take in the name, second your update params
[07:26:53] alfiemax: roelof, just tried it.. and it will work :)
[07:28:12] roelof: oke, so something like : https://gist.github.com/rwobben/2f3275fc2b787a8272ff5971e76d2850
[07:28:45] alfiemax: roelof, yes
[07:29:07] fcser_: has joined #RubyOnRails
[07:29:47] DoubleMalt: has joined #RubyOnRails
[07:30:13] xall: has joined #RubyOnRails
[07:30:15] hinokata: has joined #RubyOnRails
[07:31:35] roelof: here it does not work : SyntaxError: /home/ubuntu/workspace/lib/tasks/read_database.rake:22: syntax error, unexpected tLABEL title: data["artObject"]["title"],
[07:31:58] MatthewAllan93: has joined #RubyOnRails
[07:32:20] alfiemax: roelof, you have a typo
[07:33:01] alfiemax: maybe a space after `name:` ?
[07:33:04] MatthewAllan93: has left #RubyOnRails: ("WeeChat 1.5")
[07:33:11] roelof: Oke, Im trying to find out where
[07:33:27] roelof: I just pasted what I maked in the gist
[07:33:42] alfiemax: there you have `ollectie`
[07:33:53] artto: has joined #RubyOnRails
[07:33:54] alfiemax: i think it should have been `collectie`
[07:34:38] roelof: yep, here is the failing code : https://gist.github.com/rwobben/5d60f56f533ba85121886804c78e9476
[07:34:53] roelof: at some way I cannot handle the title: part
[07:36:10] alfiemax: roelof, should it be title or name?
[07:39:52] codeshah: has joined #RubyOnRails
[07:40:46] roelof: I use both name is the name of the painter and title is the name of the painting
[07:41:22] roelof: or is the problem I cannot use title: for updating
[07:41:44] roelof: the error message points to the : behind title
[07:44:46] alfiemax: ruby version?
[07:44:47] artto_: has joined #RubyOnRails
[07:46:02] roelof: alfiemax: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
[07:46:13] darutoko: has joined #RubyOnRails
[07:47:13] ziggy: has joined #RubyOnRails
[07:47:30] alfiemax: oh got it..
[07:48:53] universal: roelof: add the error message with trace.
[07:50:33] mark_66: has joined #RubyOnRails
[07:50:45] roelof: universal: here you have : https://gist.github.com/rwobben/c1e8133a591c8af2f910acff77ca2d8e
[07:51:18] eGGshke: has joined #RubyOnRails
[07:51:21] roelof: alfiemax: I still do not get it but it looks update , updates only 1 item , not muliple items
[07:51:50] FooMunki: has joined #RubyOnRails
[07:52:17] universal: roelof: yes, update only updates ONE item.
[07:52:34] aganov: has joined #RubyOnRails
[07:52:44] roelof: then that's seem to be the problem I think
[07:52:45] universal: roelof: can you add the read_database.rake to that gist please.
[07:53:24] mikecmpbll: has joined #RubyOnRails
[07:53:59] roelof: universal: done
[07:55:36] universal: roelof: https://gist.github.com/rwobben/c1e8133a591c8af2f910acff77ca2d8e#file-read_database-rake-L22
[07:55:38] universal: you have a space!
[07:56:08] universal: title: "value" is the short form for: :title => "value"
[07:56:21] universal: so if you have symbol keys, you don't have to write the => ;)
[07:57:42] roelof: I changed the code and updated the gist
[07:57:51] roelof: and still the same problem
[07:57:53] universal: you have title : data
[07:57:58] universal: you want title: data..
[07:58:05] roelof: yep see the gists
[07:58:06] universal: see the space between title and colon
[07:58:18] roelof: I have changed that
[07:58:27] roelof: see the updated gist
[07:58:36] universal: https://gist.github.com/rwobben/c1e8133a591c8af2f910acff77ca2d8e#file-read_database-rake-L21
[07:58:51] jancel: has joined #RubyOnRails
[07:59:53] universal: roelof: for simpler debugging i'd separate those lines.
[07:59:54] roelof: yes, another space problem
[08:00:12] roelof: I see now that there are records in the database
[08:01:03] roelof: and it works for a second time. I see still 10 records :)
[08:01:13] universal: https://gist.github.com/rwobben/c1e8133a591c8af2f910acff77ca2d8e#file-read_database-rake-L28
[08:01:21] universal: curly braces where you want normal braces!
[08:01:23] roelof: both thanks
[08:02:21] roelof: the { are for the map
[08:02:25] tvw: has joined #RubyOnRails
[08:02:27] alfiemax: has joined #RubyOnRails
[08:02:39] universal: roelof: you have a curly closing brace at line 28
[08:02:48] pawnbox: has joined #RubyOnRails
[08:02:52] universal: which "closes" your opening brace at 22
[08:03:27] alfiemax: roelof, still stuck on that?
[08:03:34] roelof: no, it closes the { at 12
[08:03:40] roelof: nope, it seems to work
[08:03:55] universal: https://gist.github.com/universal/7c0120f078ab44c1a496b706d9bd1eb7
[08:04:00] roelof: when I run it two times I still see the same records
[08:04:07] roelof: and that is good
[08:04:16] universal: i'd write it more like this
[08:04:26] roelof: I think the data changes once a week or once a few days
[08:04:50] universal: and i personally dislike using the {|i|} syntax for multi-line blocks, there i'd use the do end syntax.
[08:05:03] universal: and also fix your indentation ;)
[08:05:03] bronson: has joined #RubyOnRails
[08:05:10] roelof: universal: I know
[08:05:20] universal: two spaces per level ;)
[08:05:27] roelof: for the identation
[08:05:52] roelof: I will look how to change the { |i| to a do notation
[08:06:04] Guest: has joined #RubyOnRails
[08:06:14] universal: roelof: just replace the opening curly brace with do, and the closing one with end
[08:06:33] universal: cleanly formatted code helps in finding bugs ;)
[08:07:15] mikecmpbll: has joined #RubyOnRails
[08:07:21] roelof: that is the next part , running rubocop to find anything that is against the "rules"
[08:07:22] alfiemax: universal, +1
[08:07:50] jsrn: has joined #RubyOnRails
[08:08:02] universal: you don't need rubocop for formatting.
[08:08:23] roelof: and after that using whenever to make the read_database in a cron job
[08:08:31] srinidhi: has joined #RubyOnRails
[08:08:46] roelof: I know ,my editor changes everytimes from 2 to 4 spaces
[08:08:57] universal: then configure it properly once ;)
[08:09:10] roelof: and this this project is done within the due date :)
[08:09:25] universal: propably because you're switching between 2 and 4 spaces and the editor tries to guess it from the file ;)
[08:11:31] weckl: has joined #RubyOnRails
[08:12:25] adre: has joined #RubyOnRails
[08:12:50] roelof: no, because someone told the editor that ruby is 2 spaces and html 4 spaces
[08:18:55] xibalba: https://tutorials.railsapps.org , anyone know if the guide/tutorials worth the $95
[08:19:00] artto: has joined #RubyOnRails
[08:19:44] universal: roelof: so change it?! ;)
[08:21:46] Coldblackice: has joined #RubyOnRails
[08:21:49] pawnbox: has joined #RubyOnRails
[08:21:49] peterretief: has joined #RubyOnRails
[08:23:39] roelof: universal: I will do, thanks for the help . you and alfiemax saved my project
[08:26:11] pawnbox: has joined #RubyOnRails
[08:28:41] andywww: has joined #RubyOnRails
[08:28:42] rvanlieshout: has joined #RubyOnRails
[08:29:14] andywww: what is the text editor of choise for relatively small (2-3 controller, 5-6 model) rails app nowadays?
[08:29:24] andywww: i’m on textmate. am i a dinosaur?
[08:29:30] universal: andywww: emacs, vim, textmate, sublime, ...
[08:29:32] andywww: choice, even
[08:29:35] universal: in no particular order
[08:31:37] universal: andywww: textmate seems to be somewhat dead, but sublime isn't a well of activity either, but there is still work going on from time to time ;)
[08:32:13] emachnic: has joined #RubyOnRails
[08:33:48] edwinvdgraaf: has joined #RubyOnRails
[08:34:37] Devalo: has joined #RubyOnRails
[08:35:56] BaNzounet: As it possible to change the table name with self.table_name is it possible to change the default foreign_key without adding foreign_key: ... to all relations?
[08:36:47] universal: is there a specific reason you are not using rails conventions?
[08:38:45] vedu: BaNzounet: ^
[08:40:33] vedu: I just added `dependent: :destroy` to my polymorphic association. Now how I can delete the existing orphaned records? Doing something like `Photo.where(photoable: nil).count` give me 0
[08:40:51] BaNzounet: I used to have a User model, but now due to specification I also need to have organization, and since there are almost the same as an user, I want to create to make user and organization inherite from a main type let's say UserType. and to keep everything working with the current `users` table i thought setting the table_name & foreign_key of UserType to users and user_id would be a good idea
[08:41:40] vedu: BaNzounet: rename the column?
[08:42:38] vedu: BaNzounet: oh sorry, disregard that
[08:43:23] BaNzounet: (and fyi I'm using single table inheritance)
[08:44:17] BaNzounet: vedu: that could be a solution, but renaming all the user_id into user_type_id is a bit of a pain :(
[08:44:26] universal: BaNzounet: whoa!
[08:44:32] vedu: BaNzounet: What?!
[08:44:34] universal: BaNzounet: rename the users table to user_types.
[08:44:42] davee_: has joined #RubyOnRails
[08:44:51] vedu: exactly!
[08:44:52] universal: then think twice/thrice if organizations and users are really the same thing
[08:45:10] vedu: BaNzounet: for once I thought you need both users table and organization table
[08:45:23] universal: and you really want sti!
[08:45:51] BaNzounet: I went down that path, having 2 models and polymorphic assossiations, thing went ugly :/
[08:46:07] vedu: Looks like you don't need the user table.
[08:46:14] BaNzounet: sti are not recommended?
[08:46:52] andywww: universal: i’m looking at emacs now
[08:46:58] universal: it is ok, if you know what you are doing and the use case fits, but often people don't know what they are doing and the use case doesn't really fit ;)
[08:47:14] Devalo: has joined #RubyOnRails
[08:47:21] andywww: i remmeber being intimidated by this some 15 years ago
[08:47:49] universal: andywww: :-) yeah... ...still not jumping on the vim/emacs bandwagon! i love my millions of colors ;)
[08:48:09] andywww: not a lot has changed here...
[08:48:27] andywww: open directory gives me a ‘ls’ listing
[08:48:54] vedu: (re-asking) I just added `dependent: :destroy` to my polymorphic association. Now how I can delete the existing orphaned records? Doing something like `Photo.where(photoable: nil).count` gives me 0
[08:49:31] BaNzounet: universal: ok :) I agree that renaming the table and my current foreign key to match the new model is what i should do, I was just looking to a 2 lines solutions, like self.table_name = 'users'; self.foreign_key = 'user_id'; to get thing done with less changes
[08:50:51] universal: vedu: Photo belongs_to :photoable?
[08:51:06] beilabs: has joined #RubyOnRails
[08:51:11] arBmind: has joined #RubyOnRails
[08:51:21] universal: s/belongs_to/has_one/many/
[08:52:07] universal: vedu: Photo.all.select{|p| p.photoable.nil? }.each &:destroy
[08:54:05] edwinvdgraaf: has joined #RubyOnRails
[08:56:38] y2mq37: has joined #RubyOnRails
[08:57:49] artto: has joined #RubyOnRails
[08:58:04] xall_: has joined #RubyOnRails
[08:58:40] ferr: has joined #RubyOnRails
[09:01:20] Devalo: has joined #RubyOnRails
[09:01:48] KucukMubasir: has joined #RubyOnRails
[09:03:44] ur5us: has joined #RubyOnRails
[09:04:46] srinidhi: has joined #RubyOnRails
[09:05:45] xall: has joined #RubyOnRails
[09:05:57] bronson: has joined #RubyOnRails
[09:06:02] pawnbox: has joined #RubyOnRails
[09:09:09] pawnbox: has joined #RubyOnRails
[09:12:52] antgel: has joined #RubyOnRails
[09:13:18] edwinvdg_: has joined #RubyOnRails
[09:13:33] Circuit8: has joined #RubyOnRails
[09:15:20] stardiviner: has joined #RubyOnRails
[09:23:02] pawnbox: has joined #RubyOnRails
[09:25:04] Diabolik: has joined #RubyOnRails
[09:26:49] emachnic: has joined #RubyOnRails
[09:29:58] srinidhi: has joined #RubyOnRails
[09:32:06] pawnbox: has joined #RubyOnRails
[09:33:51] Devalo: has joined #RubyOnRails
[09:35:46] triptec: has joined #RubyOnRails
[09:36:28] quazimodo: has joined #RubyOnRails
[09:41:19] lxsameer: has joined #RubyOnRails
[09:42:22] alfiemax: has joined #RubyOnRails
[09:43:07] andywww: has left #RubyOnRails: ()
[09:43:07] ql6wlld: has joined #RubyOnRails
[09:44:14] datanois1: has joined #RubyOnRails
[09:44:20] edwinvdgraaf: has joined #RubyOnRails
[09:44:46] Devalo: has joined #RubyOnRails
[09:45:39] futilegames: has joined #RubyOnRails
[09:46:17] Mia: has joined #RubyOnRails
[09:46:34] pawnbox: has joined #RubyOnRails
[09:49:34] futilegames: has joined #RubyOnRails
[09:52:03] triangles: has joined #RubyOnRails
[09:52:54] mdw: has joined #RubyOnRails
[09:55:17] eGGshke: has joined #RubyOnRails
[09:55:38] Devalo: has joined #RubyOnRails
[09:56:32] pawnbox: has joined #RubyOnRails
[09:58:06] gingray: has joined #RubyOnRails
[09:58:20] artto: has joined #RubyOnRails
[10:05:07] siaw23: has joined #RubyOnRails
[10:07:36] AimlessRAven: https://gist.github.com/anonymous/755f091b7702cfc8ca44afd9467e4a4b
[10:07:40] AimlessRAven: can somebody help me with this
[10:08:18] universal: what is this?
[10:08:37] universal: state your question/problem in the channel!
[10:09:54] AimlessRAven: this is decorator in my order i wanna show this method name in my card index view
[10:10:43] universal: read the sentence again before you hit enter.
[10:11:22] universal: because for me, it makes literally no sense to me, what you just wrote. that is neither a question/nor a problem.
[10:12:29] pawnbox: has joined #RubyOnRails
[10:12:36] universal: https://github.com/drapergem/draper#decorating-individual-elements
[10:16:13] elaptics: AimlessRaven: from what I can infer from your gist you haven't decorated your orders in your controller
[10:16:32] mdw: has joined #RubyOnRails
[10:19:08] artto_: has joined #RubyOnRails
[10:21:54] ur5us: has joined #RubyOnRails
[10:23:11] pawnbox: has joined #RubyOnRails
[10:25:19] startupality: has joined #RubyOnRails
[10:27:33] stardiviner: has joined #RubyOnRails
[10:27:39] Devalo: has joined #RubyOnRails
[10:29:16] artto: has joined #RubyOnRails
[10:30:56] triptec: has joined #RubyOnRails
[10:31:42] edwinvdgraaf: has joined #RubyOnRails
[10:32:16] triangles2: has joined #RubyOnRails
[10:32:26] gambl0re: has joined #RubyOnRails
[10:32:26] gambl0re: has joined #RubyOnRails
[10:35:42] Ergo: has joined #RubyOnRails
[10:36:09] ql6wlld: has joined #RubyOnRails
[10:39:34] srinidhi1: has joined #RubyOnRails
[10:41:39] triptec: has joined #RubyOnRails
[10:42:25] GodFather__: has joined #RubyOnRails
[10:45:14] datanois1: has joined #RubyOnRails
[10:47:48] quazimodo: has joined #RubyOnRails
[10:49:40] ziggy: has joined #RubyOnRails
[10:49:54] artto: has joined #RubyOnRails
[10:50:10] workmad3: has joined #RubyOnRails
[10:52:19] jmignault: has joined #RubyOnRails
[10:52:48] Palsson: has joined #RubyOnRails
[10:52:54] startupality: has joined #RubyOnRails
[10:59:54] Devalo: has joined #RubyOnRails
[11:00:18] alfiemax: has joined #RubyOnRails
[11:02:06] Ergo: has joined #RubyOnRails
[11:04:55] Circuit8: If I have a controller thats acting as a JSON API front, which has a create method. At which point should I parse the JSON coming in? Or does Rails do that automatically?
[11:06:36] njero: Circuit8: yup. you have everything inside params
[11:06:52] bronson: has joined #RubyOnRails
[11:07:34] Circuit8: n_e_o: At which point, is it when you call permit?
[11:08:25] njero: Circuit8: suppose you have model to be created with those params and you need to pass the reqd and permitted once.. there you go
[11:08:40] njero: take a look at strong params
[11:09:16] njero: Circuit8: http://edgeguides.rubyonrails.org/action_controller_overview.html
[11:09:46] hcnewsom: has joined #RubyOnRails
[11:09:53] tetraktys: has joined #RubyOnRails
[11:09:56] njero: examples in following shows some kind of structure http://edgeapi.rubyonrails.org/classes/ActionController/StrongParameters.htmlhttp://edgeapi.rubyonrails.org/classes/ActionController/StrongParameters.html
[11:10:21] njero: i mean controller structure and how to use strong params
[11:14:58] emachnic: has joined #RubyOnRails
[11:16:19] Circuit8: Ah I see, the issue I was having was that in my request specs the params weren't automatically parsing the JSON string, but that's because i wasn't sending "CONTENT_TYPE" => "application/json" with my headers
[11:16:31] Circuit8: n_e_o: All sorted thanks
[11:16:40] njero: Circuit8: np :)
[11:17:06] tetraktys: has joined #RubyOnRails
[11:17:45] roelof: has joined #RubyOnRails
[11:20:20] roelof: Can someone help me with this problem : https://gist.github.com/rwobben/175bb6053ee4cc46ba08e2128c0ab009
[11:20:24] prudhvi: has joined #RubyOnRails
[11:20:32] prudhvi: can somebody please help
[11:20:45] prudhvi: i want to start rails server in Linux
[11:21:03] prudhvi: I have a rails project running on server
[11:21:11] prudhvi: but i need to run it locally
[11:21:16] k3rn31: has joined #RubyOnRails
[11:21:26] prudhvi: i am new to rails somebody please help
[11:21:45] njero: prudhvi: are you looking for a cmd to startup the server?
[11:21:47] rvanlieshout: prudhvi: git clone it, run bundle and rails server?
[11:23:09] prudhvi: thanks for the reply rvanlieshout
[11:23:23] prudhvi: i dont understant where to run the server
[11:23:27] prudhvi: at which path?
[11:23:34] elaptics: wherever you clone it to
[11:23:36] prudhvi: the folder structure is too complex
[11:23:58] elaptics: you just need to be in the root of the project directory
[11:24:20] conta: has joined #RubyOnRails
[11:24:22] prudhvi: yes i have gone to the root but i am not seeing the home page
[11:24:34] prudhvi: i will send you the screen shot pls
[11:24:37] universal: roelof: what is this problem? please don't just post links with a gneeric message.
[11:25:20] elaptics: roelof: where is the spec file located?
[11:25:41] elaptics: oh I can see it - what version of rspec?
[11:25:47] prudhvi: spec file is located in the root
[11:26:03] roelof: I solved it already. I forget to say type: :controller
[11:26:05] elaptics: prudhvi: sorry, that was to roelof
[11:26:08] triptec: has joined #RubyOnRails
[11:26:15] roelof: sorry for the noise
[11:26:18] prudhvi: how to check the version of rspec, please tell me
[11:26:29] aadam21: has joined #RubyOnRails
[11:26:35] elaptics: prudhvi: that's not relevant to your problem
[11:27:01] prudhvi: ok, elaptics. please guide me to run the server
[11:27:02] tildes: prudhvi: gem which rspec ?
[11:27:12] aadam21: has left #RubyOnRails: ()
[11:27:14] elaptics: prudhvi: if you have done a git clone of the project, then you just need to change into the directory it would have created. That's the root of the project and that's where you would run your commands, i.e. rails server
[11:27:18] doodlehaus: has joined #RubyOnRails
[11:27:38] prudhvi: we have not git clone it actually.
[11:27:58] elaptics: prudhvi: where is the source code then?
[11:28:32] prudhvi: @tildes the gem file and gemfilelock files are in root
[11:29:02] pwnd_nsfw`: has joined #RubyOnRails
[11:29:03] elaptics: roelof: if you are running a recent version of rspec and your specs are in the standard locations then you shouldn't need to tag them
[11:29:03] prudhvi: @elaptics i have source code in my local pc
[11:29:04] tildes: prudhvi: run 'gem which rspec' on the command line
[11:29:27] prudhvi: @tildes ok, i am doing
[11:29:36] elaptics: tildes: prudhvi doesn't need to worry about rspec right now. They just want to run a rails server
[11:29:51] universal: elaptics: if you have enabled the infer_spec_type_from_location option ;)
[11:29:58] elaptics: prudhvi: so just change into the directory containing the source code
[11:30:22] elaptics: universal: that's usually set by default
[11:30:30] tildes: elaptics: oh, I just responded to 2:26:18
[11:30:32] Ropeney: has joined #RubyOnRails
[11:30:46] roelof: I have rspec 3.23 and the test is on /spec/controller , elaptics
[11:30:46] prudhvi: @tildes, I am getting this error: ERROR: Can't find ruby library file or shared library rspec
[11:30:55] tildes: but yeah, sounds like someone new to rails has started their first rails project today :)
[11:31:20] elaptics: prudhvi: are you sitting in the project root directory?
[11:31:22] prudhvi: @elaptics, please tell me what excatly i should change
[11:31:35] prudhvi: i am in root
[11:31:41] Circuit8: Hey guys, if I have an external API giving me objects with an ID, shall I just have these set my Model ID's or is this bad practise?
[11:31:53] elaptics: prudhvi: what directories do you see in there? Tell me the first 3
[11:31:58] prudhvi: @tildes you are right tildes.
[11:32:12] prudhvi: need help please
[11:32:27] Devalo: has joined #RubyOnRails
[11:32:42] alfiemax: Circuit8, don't do that
[11:32:57] alfiemax: i doubt you can do that
[11:33:04] artto: has joined #RubyOnRails
[11:33:41] Circuit8: Circuit8: Right so that will cause problems then?
[11:33:42] elaptics: Circuit8: what are you trying to do? But generally you probably don't want to do that. Be in control of your own ids, just store a reference to the external source ids
[11:33:43] universal: you can, but you should absolutely not ;-) imho
[11:34:29] prudhvi: @elaptics please guide me through
[11:34:43] k3rn31: has joined #RubyOnRails
[11:34:58] jmignault: has joined #RubyOnRails
[11:35:00] elaptics: prudhvi: do you know how to use a terminal and the shell? Or are you new to everything?
[11:35:38] prudhvi: @elaptics i am familiar with terminal, i am actually a js dev
[11:35:38] prudhvi: new to rails
[11:35:39] Circuit8: OK, because thats what I was doing, I was storing a reference to the ID but using my own rails default IDs. However, I'm getting a JSON POST create object which has the ID of the object stored in the hash as `ID`. I want this to be saved as `Id_reference` but I can't override my id=() method on my Model. Should I instead map id => id_reference in my controller?
[11:35:59] elaptics: prudhvi: so you know how to list a directory. I'm just trying to make sure you are indeed in the rails root directory
[11:36:34] prudhvi: @ yes elaptics
[11:36:35] prudhvi: i am in root directory
[11:36:39] prudhvi: in my terminal
[11:36:50] syndikate: has joined #RubyOnRails
[11:36:56] Circuit8: elaptics: Sorry forgot to tag you, see my last post
[11:36:56] elaptics: prudhvi: ok run the command 'bundle install'
[11:37:50] prudhvi: @elaptics: i have ran bundle install few mins before
[11:37:54] Didac: has joined #RubyOnRails
[11:38:06] elaptics: prudhvi: and that ran and installed lots of gems with no errors?
[11:38:18] GarethAdams: has joined #RubyOnRails
[11:38:44] prudhvi: @ elaptics: yes perfectly installed
[11:39:16] elaptics: prudhvi: what version of rails is the project and what database is it using?
[11:39:42] syndikate: hello guys, I need some direction here. I have two rails app running locally. Now I need to make a post request from app A to app B, how do I define the button in rails?
[11:39:42] prudhvi: rails version is 4.2.6
[11:39:58] prudhvi: @elaptics: the db is sqlite
[11:40:18] tildes: prudhvi: type 'gem list' in rails root folder, and gist the output
[11:40:57] prudhvi: @tildes ok tildes, i will gist you
[11:41:36] artto: has joined #RubyOnRails
[11:43:17] elaptics: Circuit8: not sure I understand the specific flow of how you're creating your app records from the json...can you explain more?
[11:43:42] syndikate: I am using activeresource and connecting the applications
[11:43:59] prudhvi: @tildes: please find the gist here: https://gist.github.com/anonymous/f69c312236652802d824d5d09619ae51
[11:44:08] elaptics: prudhvi: so depending on how the app's been put together you might have a bin/setup command that will get your database set up
[11:44:49] elaptics: prudhvi: to be clear run 'bin/setup'
[11:45:00] elaptics: prudhvi: let us know what output that provides, if any
[11:45:02] prudhvi: @elaptics: ok elaptics, i will do
[11:45:10] Circuit8: elaptics: sure, Basically I get a JSON POST request coming in which is routed to my create action on my controller. The trouble is that the names of some of the fields in the JSON request don't map perfectly to the names in my database. One of which is ID, which I would rather store as `shopify_id`. Should I just map the attribute names from the JSON request to the attribute names I want at the controller or model
[11:45:54] Circuit8: elaptics: I'm thinking the controller, because I would have a tough time overriding `id=()` at the Model for obvious reasons
[11:46:25] elaptics: Circuit8: ah gotcha. I would create a service object style thing which would take the json and massage it to suit your needs to create the model as you want it to be
[11:46:53] prudhvi: @elaptics: i have the bin folder and setup file in it, please tell me how to run it
[11:47:04] elaptics: prudhvi: just type it like I showed
[11:48:08] prudhvi: @elaptics: it throws a bash eror, command not found
[11:48:09] Circuit8: elaptics: Ah right I see, so something like `ProductCreator.create( json )` which would return an instance of `Product`
[11:49:47] Circuit8: elaptics: Sound good to you?
[11:49:56] Circuit8: elaptics: (thanks for your help btw)
[11:50:49] skroon: has joined #RubyOnRails
[11:51:08] prudhvi: @elaptics: i am not able to run bin/setup
[11:51:14] prudhvi: it throws error
[11:51:37] prudhvi: Command not found
[11:52:07] universal: prudhvi: ok. so it is not there. try --> rake db:setup
[11:52:25] ferr: has joined #RubyOnRails
[11:52:25] prudhvi: @universal: ok i will do it
[11:53:29] prudhvi: @universal: i have run it, it says db/development.sqlite3 already exists
[11:54:08] daveomcd: has joined #RubyOnRails
[11:54:09] prudhvi: @universal: and also it says: Run `rake db:migrate` to create it, then try again. If you do not intend to use a database
[11:54:24] tildes: prudhvi: maybe you were able to run some parts of bin/setup after all?
[11:54:31] tildes: previously you said the file exist
[11:54:50] prudhvi: @tildes, the file do exist, but i am not able to run
[11:54:51] universal: prudhvi: ok, so run rake db:migrate; rake db:seed; rails s
[11:55:03] universal: prudhvi: what is the content of bin/setup ?
[11:55:16] tildes: prudhvi: what is in bin/setup and what was the bash error exactly?
[11:55:47] artto: has joined #RubyOnRails
[11:56:02] prudhvi: @universal: i am following the commands you have given and will gist you the setup file
[11:56:30] prudhvi: @tildes: bash error is like it doesnt find the command "bin/setup"
[11:58:06] dblessing: has joined #RubyOnRails
[11:59:01] Ducky-: has joined #RubyOnRails
[11:59:10] tetraktys: has joined #RubyOnRails
[11:59:18] prudhvi: @universal: please find the gist of setup file:https://gist.github.com/anonymous/f382996377eeac1f0458a4cf39163229
[11:59:33] godzillaenlacasa: has joined #RubyOnRails
[11:59:48] srinidhi: has joined #RubyOnRails
[12:00:27] universal: ok. so nothing really done there.
[12:00:35] universal: did the other 3 commands work?
[12:00:45] prudhvi: @universal: i have followed all the commands
[12:01:01] universal: then open your browser and open localhost:3000
[12:01:04] prudhvi: its running the server and saying that home page is not setup
[12:02:19] prudhvi: please check the screenshot here: https://www.dropbox.com/home?preview=Screenshot+from+2016-05-26+17%3A29%3A06.png
[12:02:53] universal: we can not see that image.
[12:03:03] universal: you need to share it.
[12:03:28] prudhvi: @universal, i will share it please
[12:04:00] KucukMubasir: is @Radar here :/ his test of my-saas-stripe fails with two features,
[12:05:21] prudhvi: @universal: ;please find it here https://www.dropbox.com/s/poy7fu5a9i4a1cc/Link%20to%20Screenshot%20from%202016-05-26%2017%3A29%3A06.png?dl=0
[12:05:45] universal: file is being uploaded.
[12:06:19] godzillaenlacasa: has joined #RubyOnRails
[12:07:40] Alazoral: has joined #RubyOnRails
[12:07:50] beilabs: has joined #RubyOnRails
[12:08:19] epistrephein: has joined #RubyOnRails
[12:08:39] prudhvi: @universal: kindly check this link its working https://www.dropbox.com/s/0yl9hrpive2aka1/Screenshot%20from%202016-05-26%2017%3A29%3A06.png?dl=0
[12:08:53] doodlehaus: has joined #RubyOnRails
[12:09:44] rubyonrails076: has joined #RubyOnRails
[12:09:59] rubyonrails076: hi, how to run shell scrip in rails ?
[12:10:04] prudhvi: @universal: please check the folder structure too: https://www.dropbox.com/s/ty7jdftojeo0gfw/Screenshot%20from%202016-05-24%2022%3A19%3A04.png?dl=0
[12:11:14] antgel: has joined #RubyOnRails
[12:12:26] universal: prudhvi: look at config/routes.rb and what is in app/controllers
[12:13:21] prudhvi: @univerasl: i have to tell you that there is another folder inside shared folder where all the views, controllers etc are stored
[12:13:50] prudhvi: I will send you the screeen shot of that folder structure, it is inside /shared
[12:13:57] universal: rubyonrails076: !rules
[12:15:09] universa1: rubyonrails076: !rules
[12:15:09] helpa: rubyonrails076: https://gist.github.com/996779
[12:15:54] mdw: has joined #RubyOnRails
[12:18:19] hous: has joined #RubyOnRails
[12:18:55] dANOKELOFF_: has joined #RubyOnRails
[12:19:08] aadam21: has joined #RubyOnRails
[12:21:22] prudhvi: @universal: have you checked the folder structure please
[12:21:29] beilabs: has joined #RubyOnRails
[12:21:46] universa1: what should i check there?
[12:21:51] antgel: has joined #RubyOnRails
[12:22:30] prudhvi: @universal: just to le you know how the files are organised
[12:23:49] universa1: prudhvi: ok, you are now at the point where you need to learn at least some basics about rails, else you will be lost a lot.
[12:23:57] universa1: prudhvi: !getting_started
[12:23:57] helpa: prudhvi: http://guides.rubyonrails.org/getting_started.html - Getting started with Ruby on Rails guide written by Mike Gunderloy
[12:25:48] universa1: prudhvi: look at config/routes.rb and what is in app/controllers
[12:26:05] kgrz: has joined #RubyOnRails
[12:26:33] prudhvi: @universal: i have two config folders thats why i am confused
[12:26:38] dANOKELOFF_: hi, I'd cut my text in two ( depending on a number of character ) but without cutting the middle of a word, for example : I like text : "Example Example" and I'd cut to 5 characters , but suddenly , it would give me the result : " Examp " and "le Example" but I don't want it to cut in two , so I 'd like it gives me : "Example" and "Example", it's possible ?
[12:26:47] universa1: prudhvi: APP_ROOT/config/routes.rb
[12:26:55] prudhvi: @helpa: thank you
[12:27:53] prudhvi: @universal: almost everhything is commennted in that page except:Rails.application.routes.draw do
[12:27:56] prudhvi: which is the first line
[12:31:04] lxsameer: has joined #RubyOnRails
[12:31:55] prudhvi: @universal: please see the second config folder residing inside releases folder: https://www.dropbox.com/s/fqxvk147bt6khke/Screenshot%20from%202016-05-26%2017%3A59%3A59.png?dl=0
[12:32:30] prudhvi: In this second config folder there is another routes,rb file where i have all the code and there is root: "welcome#index"
[12:32:32] tildes: dANOKELOFF_: "Example Example".split(" ") # => ["Example", "Example"]
[12:33:03] acovrig: has joined #RubyOnRails
[12:33:04] tildes: (assuming I understood your question)
[12:33:33] prudhvi: @universal: please guide me where i have to run the rails server in order that it should point to the second config folder which i have recently sent you on screenshot
[12:33:49] dANOKELOFF_: tildes, yeah but if I have 3 word like : "Example Example Example ", and I want for result: ["Example","Example Example"] ?
[12:34:03] universa1: prudhvi: well you need to find the folder which contains the apps code first... you have some weird collection of files there...
[12:34:20] universa1: prudhvi: when you have found it, you need to run: bundle; rake db:create db:migrate db:seed; rails s
[12:34:33] hcnewsom: has joined #RubyOnRails
[12:34:48] prudhvi: @universal: i have all the app code not in root
[12:34:59] prudhvi: but inside the releases folder of root
[12:35:08] universa1: so move to the folder in your terminal!
[12:35:13] tildes: dANOKELOFF: ["Example", "Example"].join(" ") # => "Example Example"
[12:35:26] prudhvi: @universal ok i am in that folder now
[12:35:43] tildes: so, if you first get an array with all the words, then find the index at which you want to split the array, you can finally join the individual words back together
[12:36:23] universa1: "Example foo bar muh kuh".split(' ', 2)
[12:36:44] universa1: prudhvi: when you have found it, you need to run: bundle; rake db:create db:migrate db:seed; rails s
[12:37:08] prudhvi: @universal: when i have run bundle it throws an error
[12:37:33] prudhvi: <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- bundler (LoadError) from <internal:lib/rubygems/custom_require>:29:in `require' from /usr/bin/bundle:7:in `<main>'
[12:38:01] prudhvi: @universal: But i am able to run these commands from root
[12:38:10] prudhvi: hence i am confused
[12:38:54] universa1: prudhvi: it would probably best if you find someone local to sit with you in front of the machine and show you the ropes. there is so many things going on, and it is hard solving those things with someone who has no clue (no offense)
[12:39:05] universa1: prudhvi: or you spent some time on learning the basics of ruby / rails
[12:39:50] prudhvi: @universal: Thanks a lot, but i am not understanding in which path i have to run the server
[12:40:21] universa1: the path that contains your code(!) the path that contains the app, config, etc... directories of your actual app...
[12:40:30] universa1: looks like your root has some dummy rails app
[12:40:54] universa1: you or someone else probably ran rails new . || rails new somedirectory
[12:41:03] skroon: can I use an encryption method that uses the rails secret key?
[12:41:15] universa1: skroon: yes, why not?
[12:41:29] skroon: universa1: like how are cookies at the moment encrypted inr ails?
[12:41:31] prudhvi: @universal: should i have to run this command in root
[12:41:43] universa1: skroon: what is your actual question?
[12:42:05] universa1: prudhvi: you have to run it in the APP_ROOT (which is the base folder containing app, config, db, ...
[12:42:05] tildes: prudhvi: with any normal server setup yes. with abnormal server setup, very difficult to sort it out over irc
[12:42:18] GodFather__: has joined #RubyOnRails
[12:42:19] skroon: universa1: I want to encrypted some "json hash" and use that encrypted string as a URL param
[12:42:31] prudhvi: @universal: ok, i will do
[12:42:33] skroon: universa1: so when the request comes in, I can decrypt that string again, to figure out the params that are there
[12:42:54] universa1: skroon: why do you want to encrypt some json hash?
[12:43:00] prudhvi: @tildes: you are absolutely right, i am confused with this and not able to resolve the error
[12:43:10] prudhvi: and run the server
[12:43:20] tildes: prudhvi: irc works best for problems that can be solved in 15 minutes or less
[12:43:34] universa1: skroon: and you DO NOT WANT the rails_secret to ever leave the server(!)
[12:44:09] prudhvi: @tildes: Hahha, you are right
[12:44:21] tildes: prudhvi: there must be someone in your organization who can help with it?
[12:44:30] GarethAdams: skroon: params are generally be for user-supplied data. If you're setting an encrypted value just to receive the same value, what's the use in sending it to the user?
[12:44:39] skroon: universa1: because I need some cron job, which screenshots a page on the same rails side
[12:45:05] universa1: skroon: for what do you need an encrypted url param?
[12:45:46] GarethAdams: skroon: are you saying, you want an external process to make a request and be authenticated as a user?
[12:46:05] refinerysource: has joined #RubyOnRails
[12:46:19] |2701: has joined #RubyOnRails
[12:46:59] doodlehaus: has joined #RubyOnRails
[12:47:44] datanois1: has joined #RubyOnRails
[12:47:45] prudhvi: @universal: thank you very much for your time
[12:47:55] Devalo: has joined #RubyOnRails
[12:47:59] prudhvi: @tildes: many thanks
[12:49:06] skroon: GarethAdams: indeed ;-)
[12:49:44] universa1: skroon: so if you want to make a screenshot, use something like phantomjs, login, then navigate to the page in question and do a screenshot.
[12:49:46] skroon: GarethAdams: I only use it for a single controller, to generate a "secret url" so they have access to just that report page
[12:49:54] snowy: has joined #RubyOnRails
[12:50:02] skroon: universa1: I would have to login with thousands of users and do that
[12:50:32] universa1: why do you need to make a screenshot? sounds like you want a different output for your report.
[12:50:40] srinidhi: has joined #RubyOnRails
[12:50:54] universa1: so Report.first.to_pdf and then store that somewhere.
[12:51:57] universa1: so you want to store some report page for download?
[12:53:20] beilabs: has joined #RubyOnRails
[12:56:51] macsteps: has joined #RubyOnRails
[12:58:09] sevenseacat: has joined #RubyOnRails
[13:00:31] MaDErroR123: has joined #RubyOnRails
[13:02:00] artto: has joined #RubyOnRails
[13:02:50] doodlehaus: has joined #RubyOnRails
[13:02:59] ramortegui: has joined #RubyOnRails
[13:05:54] MaDErroR123: has joined #RubyOnRails
[13:07:48] ferr: has joined #RubyOnRails
[13:08:05] artto: has joined #RubyOnRails
[13:09:21] ferr: I used 'cache do' in Rails view, however, now I am responding with json, how would I achieve the same cache results as with views 'cache do'?
[13:10:15] hcnewsom: has joined #RubyOnRails
[13:10:18] universa1: ferr: no clue if this is still current and applies to you: https://robots.thoughtbot.com/fast-json-apis-in-rails-with-key-based-caches-and -- first hit on google for: rails json caching
[13:12:06] Malgorath: has joined #RubyOnRails
[13:12:09] universa1: ferr: https://blog.codeship.com/building-a-json-api-with-rails-5/ --some more information ;)
[13:12:24] fujinuma: has joined #RubyOnRails
[13:13:18] tetraktys: has joined #RubyOnRails
[13:14:25] triptec: has joined #RubyOnRails
[13:16:34] macsteps: has joined #RubyOnRails
[13:17:05] artto: has joined #RubyOnRails
[13:18:02] Malgorath: Anyone here ever used a custom generate command to start an engine and it has no bin/rails? if so how can I get bin/rails so i can generate things? or do i need to do things from hand and if so, anyone got a link on how to do that with migration files since they are named specially
[13:18:14] edwinvdgraaf: has joined #RubyOnRails
[13:19:21] universa1: Malgorath: sounds like your custom generate command is "somewhat broken", why not just generate a dummy engine and copy the file from there?
[13:19:40] Ergo^: has joined #RubyOnRails
[13:19:45] triptec: has joined #RubyOnRails
[13:20:02] Malgorath: universa1: when I did the cp ../dummyengine/bin ./ -R (from inside the generated engine) the rails file is not setup correctly
[13:20:18] universa1: define: not setup correctly.
[13:20:33] Malgorath: universa1: I'm using this 'guide' and i use this term loosely: https://www.openproject.org/open-source/development/create-openproject-plugin/
[13:21:34] gopz: has joined #RubyOnRails
[13:22:23] artto: has joined #RubyOnRails
[13:22:51] doodleha_: has joined #RubyOnRails
[13:22:52] godzillaenlacasa: has joined #RubyOnRails
[13:23:11] universa1: okay, so either ask them, or provide more information.
[13:24:55] Malgorath: universa1: what else is there I can provide, their 'support' is very minimal. There is no bin/rails to do generation from, so thats what I'm trying to fix as step one.
[13:27:36] JakFrist: has joined #RubyOnRails
[13:27:45] universa1: <Malgorath> universa1: when I did the cp ../dummyengine/bin ./ -R (from inside the generated engine) the rails file is not setup correctly
[13:27:45] universa1: <universa1> define: not setup correctly.
[13:28:20] Mia: has joined #RubyOnRails
[13:29:48] aegis3121: has joined #RubyOnRails
[13:29:53] mdw: has joined #RubyOnRails
[13:30:31] universa1: you must have an idea why it is not setup correctly... compare the dummy engine with whatever that other thing generated...
[13:30:44] Malgorath: universa1: There is no bin/rails to do bin/rails g model List title:string
[13:31:00] yellow5: has joined #RubyOnRails
[13:31:15] fmcgeough: has joined #RubyOnRails
[13:31:30] universa1: how can there be none, if you jsut copied it from a dummy engine?
[13:32:00] Palsson: has joined #RubyOnRails
[13:32:01] Malgorath: I mean there isn' tone when it is initially generated (using the open_project:plugin)
[13:32:25] universa1: so?! sounds like a bug in the generator. or they do not want you to use it...
[13:32:49] Malgorath: So I have to generate by hand?
[13:33:13] universa1: copy it from a dummy engine!!!!!!!!!!!!!
[13:34:27] Malgorath: universa1: I'm creating a gist to show you what happens when i do that
[13:35:56] Malgorath: universa1: https://gist.github.com/malgorath/338d0691fca31401e8723544f1f28cea
[13:36:46] universa1: Malgorath: so. what does the bin/rails file look like? changing a path in there should NOT be too hard...
[13:37:07] edwinvdg_: has joined #RubyOnRails
[13:38:57] artto: has joined #RubyOnRails
[13:39:00] Malgorath: universa1: I edited the gist with some more info, like trying the rake rails:update:bin erro I get, and as far as changing the path I can by hand, I'll paste the output
[13:41:45] universa1: so have you compared whatever your generator generated with a freshly generated plain rails engine?
[13:42:23] Malgorath: universa1: yes, i am coping and just updating paths from dummyengine to new method
[13:42:34] edwinvdgraaf: has joined #RubyOnRails
[13:42:38] Malgorath: universa1: I updated the gist with rails g output and the rails file contents
[13:43:00] chipotle: has joined #RubyOnRails
[13:44:58] artto: has joined #RubyOnRails
[13:45:13] Malgorath: personally the file paths seem wrong to me but they seem to work in the dummyengine when I try them. I thougth bin/rails would reference the root as ../ not ../..
[13:45:14] snowy: has joined #RubyOnRails
[13:45:55] Malgorath: but the issue seems to be the open_project/plugin in the engine
[13:47:32] Malgorath: universa1: I figured your going to ask for the engine.rb file, so I added that to the gist just now
[13:48:21] universa1: Malgorath: sorry, i haven't done much with engines, and i can't be bothered to check out whatever weird thing the openproject guys are doing.
[13:49:24] qsun: has joined #RubyOnRails
[13:49:28] TvL2386: has joined #RubyOnRails
[13:50:01] Malgorath: universa1: I guess I'll just google on how to generate migrations without rails g
[13:50:32] idefine: has joined #RubyOnRails
[13:50:33] cabinB: has joined #RubyOnRails
[13:52:37] aadam21: has joined #RubyOnRails
[13:53:13] aadam21: has joined #RubyOnRails
[13:54:39] gvz108: has joined #RubyOnRails
[14:00:15] k3rn31: has joined #RubyOnRails
[14:02:27] startupality: has joined #RubyOnRails
[14:02:29] Circuit8: Hey guys. If I have an app that listens for API requests to create products, update products, delete products etc etc. What shall I do for the situations where an API request gets missed, e.g if my app is down for maintenance and our db is now out of sync with the one using the API?
[14:03:36] pixilla: has joined #RubyOnRails
[14:03:49] Devalo: has joined #RubyOnRails
[14:04:17] tildes: Circuit8: send the request into a queue rather than directly to the application?
[14:04:48] tildes: or check for response on sender side
[14:04:49] akshat: has joined #RubyOnRails
[14:06:43] lukec: has joined #RubyOnRails
[14:07:18] mdw: has joined #RubyOnRails
[14:09:25] xibalba: has joined #RubyOnRails
[14:11:06] moeabdol: has joined #RubyOnRails
[14:12:05] han`: has joined #RubyOnRails
[14:14:12] akshat: has joined #RubyOnRails
[14:14:15] macsteps: has joined #RubyOnRails
[14:14:36] artemaminov: has joined #RubyOnRails
[14:15:36] doodlehaus: has joined #RubyOnRails
[14:15:43] Circuit8: tildes: OK thanks
[14:15:46] Guest17_: has joined #RubyOnRails
[14:16:02] Circuit8: tildes: I've just seen the request will get tried many times for 48 hours so should be all cool
[14:16:30] tildes: Circuit8: it's good to hear someone has thought about it already :)
[14:16:36] han`: has joined #RubyOnRails
[14:17:44] fox_mulder_cp: has joined #RubyOnRails
[14:17:54] Circuit8: tildes: Haha yeah
[14:18:02] dopamean_: has joined #RubyOnRails
[14:18:13] emachnic: has joined #RubyOnRails
[14:20:30] artto: has joined #RubyOnRails
[14:20:34] triptec: has joined #RubyOnRails
[14:20:52] tildes: Circuit8: publish-subscribe pattern is another option, kind of variation of a message queue
[14:23:01] emachnic: has joined #RubyOnRails
[14:23:06] maxz: has joined #RubyOnRails
[14:23:55] aadam21: has left #RubyOnRails: ()
[14:25:45] edwinvdg_: has joined #RubyOnRails
[14:26:22] artto: has joined #RubyOnRails
[14:30:22] Macaveli: has joined #RubyOnRails
[14:30:44] JesseH: has joined #RubyOnRails
[14:30:47] edwinvdgraaf: has joined #RubyOnRails
[14:32:55] dionysus69: has joined #RubyOnRails
[14:35:30] hcnewsom: has joined #RubyOnRails
[14:36:08] Devalo: has joined #RubyOnRails
[14:36:53] bronson: has joined #RubyOnRails
[14:39:01] Technodrome: has joined #RubyOnRails
[14:39:58] yellow5: has joined #RubyOnRails
[14:42:37] beilabs_: has joined #RubyOnRails
[14:42:40] polishdub: has joined #RubyOnRails
[14:43:07] Circuit8: tildes: Cool I'll check it out
[14:44:08] snowy: has joined #RubyOnRails
[14:46:26] godzillaenlacasa: has joined #RubyOnRails
[14:47:10] tetraktys: has joined #RubyOnRails
[14:49:21] jancel: has joined #RubyOnRails
[14:49:46] datanois1: has joined #RubyOnRails
[14:49:53] Devalo: has joined #RubyOnRails
[14:51:18] jokke: hey. anyone here use a mac?
[14:51:30] universa1: jokke: !anyone
[14:51:31] helpa: jokke: Nope. No one. Ever. In the history of the world.
[14:51:40] jokke: could that someone please enter the following command and paste the output?
[14:51:51] jokke: openssl enc -h 2>&1 | grep '\-gcm'
[14:53:02] ziggy: has joined #RubyOnRails
[14:54:02] rogue_koder: has joined #RubyOnRails
[14:54:03] beilabs: has joined #RubyOnRails
[14:54:21] fryguy: jokke: aes-128, 192, 256
[14:54:40] jokke: fryguy: all with -gcm?
[14:54:45] fryguy: jokke: yes
[14:54:49] jokke: fryguy: hm weird...
[14:54:52] jokke: https://travis-ci.org/crystal-lang/crystal/jobs/133120016
[14:55:13] MaDErroR123: has joined #RubyOnRails
[14:55:50] beilabs_: has joined #RubyOnRails
[14:56:04] MaDErroR123: has joined #RubyOnRails
[14:57:21] fryguy: jokke: check configure flags for openssl, maybe it needs to be explicitly built?
[14:57:28] jokke: fryguy: :/
[14:57:45] jokke: fryguy: yeah i was afraid of sth like that
[14:58:13] rashkov: has joined #RubyOnRails
[14:58:32] gfvcastro: has joined #RubyOnRails
[14:59:46] jokke: fryguy: did you install openssl with homebrew?
[14:59:55] Seanzie: has joined #RubyOnRails
[15:00:00] jokke: (if that's even possible, i wouldn't know)
[15:00:17] fryguy: jokke: i am not on osx
[15:00:21] jokke: fryguy: ah :D
[15:00:26] SteenJobs: has joined #RubyOnRails
[15:00:27] jokke: hey. anyone here use a mac?
[15:01:08] jokke: fryguy: i know that the algos are available on linux
[15:01:15] jokke: but not on mac it seems
[15:03:13] rashkov: If I'm returning a deeply nested model with lots of "includes" (ie. @item = Item.includes(deeply_nested_object).find(params[:id]), is there a way to reuse that deeply_nested_object in the call to "as_json" (ie. render json: item.as_json(include: deeply_nested_object)? I don't think it works when I try that because the call to as_json requires a slightly different structure for deeply_nested_object,
[15:03:19] rashkov: unfortunately
[15:03:39] bruce_lee: has joined #RubyOnRails
[15:07:06] jokke: oh ok... mac doesn't know _any_ gcm algos
[15:07:37] triptec: has joined #RubyOnRails
[15:07:39] aegis3121: has joined #RubyOnRails
[15:11:17] filter85: has joined #RubyOnRails
[15:11:32] filter85: How are you guys ?
[15:14:26] maucar: has joined #RubyOnRails
[15:15:17] edwinvdgraaf: has joined #RubyOnRails
[15:18:03] tens0r: has joined #RubyOnRails
[15:18:22] redondo: has joined #RubyOnRails
[15:18:53] tens0r: has joined #RubyOnRails
[15:20:38] desnudopenguino: has joined #RubyOnRails
[15:20:43] redondo: Hi all. Thanks for being there. Question: generators usage produce typical output: "create path/to/file", "insert ...", "gsub ..."... What does mean "gsub"?
[15:21:27] techsethi: has joined #RubyOnRails
[15:21:50] alfiemax: redondo, http://apidock.com/ruby/String/gsub%21
[15:25:01] roamingdog: has joined #RubyOnRails
[15:27:24] startupality: has joined #RubyOnRails
[15:29:21] kdough: has joined #RubyOnRails
[15:30:27] jancel: has joined #RubyOnRails
[15:31:02] doodlehaus: has joined #RubyOnRails
[15:33:33] noobRORDev_: has joined #RubyOnRails
[15:33:45] Dbugger: has joined #RubyOnRails
[15:34:15] Dbugger: Hey everyone. I set up a project a long time ago, and now Im logged into the server, but I cant remember what webserver did I use for it... is there a way to find out?
[15:35:06] davidw: has joined #RubyOnRails
[15:36:50] disgrntld: has joined #RubyOnRails
[15:37:33] kallisti5: rails should really stop be before I do stupid things like:
[15:37:35] kallisti5: add_column :events, :class, :string
[15:38:06] bronson: has joined #RubyOnRails
[15:38:13] kallisti5: after around 20 minutes of wondering why "omg everything is weird" before I realize naming my activerecord column "class" is likely a bad idea :-D
[15:38:13] mohsenjalalian: has joined #RubyOnRails
[15:40:16] mohsenjalalian: has left #RubyOnRails: ()
[15:42:07] mr-spoon: has joined #RubyOnRails
[15:42:09] gfvcastro: has joined #RubyOnRails
[15:44:13] idefine: has joined #RubyOnRails
[15:44:55] i: has joined #RubyOnRails
[15:47:39] jancel: has joined #RubyOnRails
[15:47:39] King_Rex: has joined #RubyOnRails
[15:48:19] gopz: has joined #RubyOnRails
[15:50:10] datanois1: has joined #RubyOnRails
[15:51:16] benlieb: has joined #RubyOnRails
[15:52:27] norc: has joined #RubyOnRails
[15:52:30] pawnbox: has joined #RubyOnRails
[15:56:25] Terens: has joined #RubyOnRails
[15:58:34] akshat_: has joined #RubyOnRails
[16:01:41] triptec: has joined #RubyOnRails
[16:02:13] idefine: has joined #RubyOnRails
[16:02:17] moeabdol: has joined #RubyOnRails
[16:02:49] idefine: has joined #RubyOnRails
[16:02:54] Coldblackice: has joined #RubyOnRails
[16:03:11] jhack: has joined #RubyOnRails
[16:05:43] eljimmy: has joined #RubyOnRails
[16:05:50] aegis3121: has joined #RubyOnRails
[16:05:50] zave: has joined #RubyOnRails
[16:06:01] IFrank00: has joined #RubyOnRails
[16:06:02] IFrank004: has joined #RubyOnRails
[16:07:59] cabinB: has joined #RubyOnRails
[16:08:18] shinnya: has joined #RubyOnRails
[16:08:24] ferr: has joined #RubyOnRails
[16:08:33] sillypog: has joined #RubyOnRails
[16:10:02] KucukMubasir: has joined #RubyOnRails
[16:10:33] neha-: hey for general style, is it better to use self.save! or just save!
[16:10:50] neha-: similarly is it better to use self.some_association or just some_association
[16:10:54] neha-: in a Model class for example
[16:11:20] wmoxam: IMO its best to omit self when you can
[16:11:34] neha-: oh really?
[16:11:58] IFrank004: Hi! im trying to use the remotipart gem for file upload using ajax. when I send the form with a image I get a No route matches [POST] "/inspection_components/10622"
[16:13:58] IFrank004: https://gist.github.com/Frank004/d9821951346dab1b2472b40c9fe503ec
[16:14:23] techsethi: has joined #RubyOnRails
[16:16:21] jhass: neha-: I agree, omit self. where you can
[16:16:33] neha-: cool, thanks :)
[16:19:31] antgel: has joined #RubyOnRails
[16:21:51] Talltree: can someone point me to a reference on how to post multible json entries properly?
[16:22:15] borodin: has joined #RubyOnRails
[16:22:49] Talltree: i have an array multible records(?) just like the jbuilder output... i would like to be able to post them too, while still being save.
[16:24:44] Talltree: http://pastie.org/10853627 like this without the id and url obviously
[16:31:58] smathy: has joined #RubyOnRails
[16:32:52] roamingdog: has joined #RubyOnRails
[16:33:18] mdw: has joined #RubyOnRails
[16:36:08] gfvcastro: has joined #RubyOnRails
[16:37:01] andrew9184: has left #RubyOnRails: ()
[16:37:55] filter85: has joined #RubyOnRails
[16:37:55] filter85: has joined #RubyOnRails
[16:38:18] andrew9184: has joined #RubyOnRails
[16:39:01] bronson: has joined #RubyOnRails
[16:40:38] stardiviner: has joined #RubyOnRails
[16:41:50] jeredepp: has joined #RubyOnRails
[16:41:54] jeredepp: Hello everybody, anyone can point me to the direction why this isn't grouping and summing my data ? @entries.group("project_task_user_id","day").order("day").select("day, SUM(duration) as total_duration, project_task_user_id")
[16:43:15] jhass: seems okay on first glance, grabbed the generated query from the log yet?
[16:43:58] macsteps: has joined #RubyOnRails
[16:44:15] jeredepp: Right now i'm working on the console, i'm storing it into @groupedEntries
[16:44:31] jeredepp: there's no error, but also not the expected result
[16:44:31] manfrin: has joined #RubyOnRails
[16:44:39] jeredepp: sweet learnings
[16:45:42] jeredepp: jhass: i'm expecting an array with the field day, total_duration and project_task_user_id
[16:46:24] smathy: jeredepp, you need to call a retrieval method on it, right now it's just storing the query. Call `.first` on the result to force the SQL to be actually executed.
[16:47:05] SteenJobs: has joined #RubyOnRails
[16:47:40] KucukMubasir: @Radar , just posted a new issue for my-saas-stripe https://github.com/radar/twist/issues/13
[16:49:20] ziggy: has joined #RubyOnRails
[16:49:41] jaequery: has joined #RubyOnRails
[16:49:51] jeredepp: smathy: i just tried it by @group = the query i posted before (@entries) and then @group.first
[16:50:08] jeredepp: but it's still the whole dataset :S
[16:51:23] smathy: Oh, the problem here isn't that the query isn't running properly, it's that Rails is returning an array of Entry models, instead of some other data structure that you want.
[16:52:35] jhass: s/select/pluck/?
[16:53:58] jeredepp: i tried pluck(:day, :total_effort, :xy) which isn't working because obviously there's no total_effort in my model, but i'm just not getting how i would group and sum a collection then
[16:54:22] jeredepp: *except writing a function
[16:54:51] jhass: in yours above, where you wrote select(, write pluck(
[16:55:47] triptec: has joined #RubyOnRails
[16:55:53] jeredepp: jhass: allright RL regex now i got it
[16:56:34] smathy: Can also just use the Rails `sum` method, although you'll get a hash, rather than a straight array.
[16:56:52] jeredepp: and its working, thanks alot. So select will just do the query but will not alter the data i got inside my var
[16:57:05] jeredepp: where pluck will actually return those results
[16:57:11] mooru: has joined #RubyOnRails
[16:58:29] jhass: they both return the same data, just represented differently
[16:59:47] jeredepp: It's times like these where i wish i neaver learned PHP
[17:00:17] jeredepp: thanks guys, i appreciate your help, take this beer (。・__・)―且
[17:02:42] speakingcode: has joined #RubyOnRails
[17:02:44] alfiemax: has joined #RubyOnRails
[17:03:23] mikecmpbll: has joined #RubyOnRails
[17:03:38] jancel: has joined #RubyOnRails
[17:04:23] frem_: has joined #RubyOnRails
[17:05:36] adre: has joined #RubyOnRails
[17:06:03] tildes_: has joined #RubyOnRails
[17:07:27] aegis3121: has joined #RubyOnRails
[17:08:06] lukeco: has joined #RubyOnRails
[17:08:08] macsteps: has joined #RubyOnRails
[17:09:05] n1lo: has joined #RubyOnRails
[17:09:45] sbarg: has joined #RubyOnRails
[17:09:48] sbarg: has left #RubyOnRails: ()
[17:11:07] Cohedrin: has joined #RubyOnRails
[17:12:40] sillypog: has joined #RubyOnRails
[17:15:01] filter85: has joined #RubyOnRails
[17:16:24] gopz: has joined #RubyOnRails
[17:17:13] desnudopenguino: I've got a namespace called account, with some custom routes to account/profiles (account_profile GET /account/profile(.:format) account/profiles#show
[17:17:25] desnudopenguino: I'm having trouble getting the form to work
[17:18:08] datanois1: has joined #RubyOnRails
[17:18:27] desnudopenguino: I can't get the form action to set correctly
[17:21:44] smathy: desnudopenguino, you have a form for a simple show?
[17:22:49] pawnbox: has joined #RubyOnRails
[17:23:57] syndikate: has joined #RubyOnRails
[17:24:00] conta: has joined #RubyOnRails
[17:24:43] alevy: has joined #RubyOnRails
[17:25:50] netzfisch: has joined #RubyOnRails
[17:26:45] srinidhi: has joined #RubyOnRails
[17:26:52] hahuang65: has joined #RubyOnRails
[17:26:55] alfiemax: has joined #RubyOnRails
[17:30:40] desnudopenguino: smathy: https://gist.github.com/desnudopenguino/2c084e17b88cab231bd35875d83800d0
[17:31:03] skroon: anyone using google cloud storage to serve static files?
[17:31:06] startupality: has joined #RubyOnRails
[17:31:18] skroon: are you using a gem to sync those assets to the bucket?
[17:31:50] i: has joined #RubyOnRails
[17:32:40] HalcyonicStorm: has joined #RubyOnRails
[17:33:01] noobRORDev_: has joined #RubyOnRails
[17:34:36] desnudopenguino: i have an account_profile_path but no account_profiles_path
[17:35:03] RegulationD: has joined #RubyOnRails
[17:36:13] xibalba: has joined #RubyOnRails
[17:38:07] DoctorMonocular: has joined #RubyOnRails
[17:39:55] bronson: has joined #RubyOnRails
[17:40:25] Macaveli: has joined #RubyOnRails
[17:40:51] DoctorMonocular: has joined #RubyOnRails
[17:42:21] xibalba: has joined #RubyOnRails
[17:42:22] hashrocket: has joined #RubyOnRails
[17:42:48] djbkd: has joined #RubyOnRails
[17:43:08] aegis3121: has joined #RubyOnRails
[17:47:45] filter85: has joined #RubyOnRails
[17:48:50] 7YUAA7IYC: has joined #RubyOnRails
[17:49:04] B1n4r10: has joined #RubyOnRails
[17:49:36] filter85: has joined #RubyOnRails
[17:49:49] triptec: has joined #RubyOnRails
[17:50:03] startupality: has joined #RubyOnRails
[17:50:24] sneakerhax: has joined #RubyOnRails
[17:51:00] benlieb: chrome console question: I'm debugging at this line: values = this.fields ? this.getValue() : this.model.toJSON(); When I hover over this.getValue, the inspector offers to jump to the source file and line where it's defined. When I hover over this.fields, it just shows me the value. Is there a way to get to where this.fields is declared?
[17:51:26] benlieb: damn, wrong room
[17:51:28] ksmutthu: has joined #RubyOnRails
[17:53:11] MEATCHICKEN: has joined #RubyOnRails
[17:53:24] MEATCHICKEN: is there a difference between include ActionView and include ActionView::RecordIdentifier?
[17:53:26] rakm: has joined #RubyOnRails
[17:53:35] MEATCHICKEN: Shouldn't include ActionView include all of the submodules?
[17:53:43] filter85: has joined #RubyOnRails
[17:54:29] DoctorMonocular: has joined #RubyOnRails
[17:55:56] filter85: has joined #RubyOnRails
[17:55:56] filter85: has joined #RubyOnRails
[17:56:33] stardiviner: has joined #RubyOnRails
[17:56:43] IFrank004: has joined #RubyOnRails
[17:56:43] IFrank00: has joined #RubyOnRails
[17:58:33] sandroqz: has joined #RubyOnRails
[17:59:12] yfeldblum: has joined #RubyOnRails
[17:59:50] yfeldblum: has joined #RubyOnRails
[17:59:51] agit0: has joined #RubyOnRails
[18:00:04] brendan-: has joined #RubyOnRails
[18:00:24] DoctorMonocular: has joined #RubyOnRails
[18:01:52] pawnbox: has joined #RubyOnRails
[18:02:49] jancel: has joined #RubyOnRails
[18:04:24] Devalo: has joined #RubyOnRails
[18:05:52] iamvery: has joined #RubyOnRails
[18:13:49] filter85: has joined #RubyOnRails
[18:16:54] jancel: has joined #RubyOnRails
[18:17:59] gingray: has joined #RubyOnRails
[18:19:05] apawl: has joined #RubyOnRails
[18:19:30] startupality: has joined #RubyOnRails
[18:20:08] acovrig: I have a very old rails app I’m trying to upgrade (didn’t write it); can someone explain what this means: map.signup '/register', :controller => 'users', :action => 'new' (routes.rb)
[18:20:36] djbkd: has joined #RubyOnRails
[18:20:51] noobRORDev_: has joined #RubyOnRails
[18:22:02] noobRORDev_: has left #RubyOnRails: ()
[18:22:12] noobRORDev_: has joined #RubyOnRails
[18:22:22] njero: has joined #RubyOnRails
[18:23:03] desnudopenguino: acovrig: I think that is saying get "/register", to: "users#new"
[18:23:23] desnudopenguino: or route /register url to users new action
[18:23:34] acovrig: could the map.’signup’ be as: ‘signup’ for signup_path?
[18:24:00] startupality: has joined #RubyOnRails
[18:24:28] apawl: At what point in the starting process does ActiveRecord connect to the database?
[18:24:38] replay: has joined #RubyOnRails
[18:24:55] apawl: Does that happen automatically, or do I have to run ActiveRecord::Base.establish_connection(ENV['DATABASE_URL']) manually
[18:25:08] desnudopenguino: acovrig: could be, I haven't seen a route like that before.
[18:25:12] apawl: not manually, but in the code somewhere
[18:25:29] acovrig: yea, this is from the rails 1.8 era…
[18:25:48] njero: apawl: rails will take care of you
[18:25:55] noobRORDev_: has joined #RubyOnRails
[18:26:58] apawl: n_e_o: I need to create that database, set that URL at sometime during the startup process. I'm using a pre:dedeploy task. Trying to figure out when the database connection happens so that I can do it beforehand.
[18:27:16] startupality: has joined #RubyOnRails
[18:28:00] diegoviola: has joined #RubyOnRails
[18:28:11] idefine: has joined #RubyOnRails
[18:28:30] Guest38693: has joined #RubyOnRails
[18:28:57] noobRORDev_: I have a text_field_tag with this name default_unit[0][mr_ss_small] what would I put in the strong params to be able to pass it to a model?
[18:29:17] roamingdog: has joined #RubyOnRails
[18:29:34] macsteps: has joined #RubyOnRails
[18:29:36] startupality: has joined #RubyOnRails
[18:29:37] aadam21: has joined #RubyOnRails
[18:30:07] njero: apawl: why do you want to create db each time you deploy? or you mean migration?
[18:30:12] jstransky: has joined #RubyOnRails
[18:31:07] apawl: n_e_o: not each time I deploy, but when DATABASE_URL isn't set that means I need to create the database/set it
[18:31:58] njero: apawl: yeah, then this will be happening way before you starting your rails server rt?
[18:32:24] gfvcastro: has joined #RubyOnRails
[18:32:24] njero: so won't try connecting to db unless you already running it
[18:34:16] apawl: So I'm running the rake task first
[18:34:32] apawl: But it's has " task pre: [:environment, 'assets:precompile'] do"
[18:34:48] apawl: Which mean the environment starts up, right?
[18:35:09] chouhoulis: has joined #RubyOnRails
[18:35:16] njero: apawl: thats rake not rails app
[18:35:56] njero: apawl: won't be an issue until you hit db like through migrate etc
[18:35:59] chouhoulis: has joined #RubyOnRails
[18:36:32] gusrub: has joined #RubyOnRails
[18:37:43] apawl: n_e_o: so when it has :environment there, I thought that was requiring the rails database? To have access to the models and such?
[18:38:29] njero: apawl: If you are doing an AR query you'll need it
[18:38:44] njero: till then it wont try hitting db
[18:38:59] jancel: has joined #RubyOnRails
[18:39:29] njero: actually.. I am not sure. anyone correct me if I'm wrong.
[18:40:52] bronson: has joined #RubyOnRails
[18:40:58] njero: just checked in development mode.. It's not hitting db until you make a query
[18:41:19] KucukMubasir: has joined #RubyOnRails
[18:41:19] KucukMubasir: has joined #RubyOnRails
[18:41:20] njero: apawl: actually there are some difference in old versions of rais
[18:42:44] njero: IIRC .. it used to query db for attribute types previously.. No it's all lazy :P
[18:42:57] apawl: Ok, :environment was failing with a bad URI, but I don't think it was actually trying to connect
[18:43:23] apawl: "URI::InvalidURIError: the scheme postgres does not accept registry part: postgres@ (or bad hostname?)"
[18:43:57] triptec: has joined #RubyOnRails
[18:45:13] njero: apawl: which rake task are you running?
[18:45:30] aadam21: has joined #RubyOnRails
[18:45:35] apawl: n_e_o: it's a pre:deploy, which requires :environment
[18:45:53] apawl: in it, it's just checking if DATABASE_URL is set, and if it isn't, creates that database and sets the URL
[18:47:12] njero: apawl: is it a custom task created by u?
[18:47:42] choke: has joined #RubyOnRails
[18:48:28] njero: by the looks of it, you messed up url structure provided. it expects only url.. not user
[18:49:07] apawl: n_e_o: here's a sanitized version of what I'm talking about
[18:49:11] aadam21_: has joined #RubyOnRails
[18:49:16] apawl: n_e_o: http://pastebin.com/raw/mUypymMf
[18:49:41] njero: what happened to helpa :P
[18:50:27] startupality: has joined #RubyOnRails
[18:51:11] tubbo: !botsnack
[18:51:11] helpa: Nom nom. Thanks, tubbo!
[18:51:15] tubbo: there you are
[18:51:16] alfiemax: has joined #RubyOnRails
[18:51:29] tubbo: pastebin != pastie if that's why you're wondering
[18:51:36] njero: tubbo: yeah
[18:52:33] tubbo: acovrig: i think that's what it is, yeah. map.ROUTE_NAME, URL, OPTIONS was the format iirc
[18:53:28] apawl: Is there a preferred pastebin-type service? Sorry.
[18:53:33] tubbo: apawl: to create a database with rake tasks, try using `rake db:create`, which doesn't actually load the rails environment.
[18:53:55] choke: Radar you around? Have a quick question about your twist repo and multi-tenancy book ( that I bought 6 months ago and am just barely getting around to reading )
[18:54:23] tubbo: apawl: i'd also do something about that rake task, it looks way too coupled to the chain of tasks surrounding it
[18:55:00] tubbo: apawl: `ENV['DATABASE_URL'] = url = PgUtil.build_database("n#{cluster}")` is a bad practice.
[18:55:16] tubbo: changing DATABASE_URL, or any ENV setting inside your app code, is basically setting yourself up for pain
[18:55:38] hcnewsom: has joined #RubyOnRails
[18:55:56] Talltree: does someone have experience with ransack and the search_form_for helper of it?
[18:56:14] HalcyonicStorm: has left #RubyOnRails: ()
[18:57:06] Talltree: if i try to use remote:true with it and search for something the chrome console shows a 500 internal server error, if i click the link its completly fine tho...
[18:57:11] Dimik: has joined #RubyOnRails
[18:57:17] tubbo: apawl: https://gist.github.com/tubbo/d7c08cdce288881a8c60b08da955b57d is closer to what i would do. but i still don't see the point for the deploy:pre task..
[18:57:47] tubbo: Talltree: !gist the logs for that request and your usage of the search_form_for helper.
[18:57:47] helpa: Talltree: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[18:58:23] aadam21: has joined #RubyOnRails
[18:58:53] noobRORDev_: has joined #RubyOnRails
[18:59:54] Talltree: tubbo: i'm just an idiot
[19:00:00] Talltree: i had the js.erb file wrong
[19:00:04] Talltree: thanks anyway
[19:01:03] Talltree: tubbo: didnt you help me get an ajax loading bar too?
[19:01:14] Talltree: NProgress ?
[19:02:42] tubbo: i don't remember
[19:02:44] tubbo: probably not
[19:03:08] netzfisch: has joined #RubyOnRails
[19:03:18] JakFrist: has joined #RubyOnRails
[19:03:47] Talltree: ah, got that too
[19:04:08] Talltree: weird, i should ask about everything, i seem to solve it after i do
[19:05:24] skroon: i'm using assets precompile, but the assets_url('image.png') doesn't use the image.fingerprint.png , what am I forgetting todo?
[19:07:04] tubbo: Talltree: please don't :P
[19:07:26] tubbo: skroon: pass in the correct file name?
[19:08:10] Talltree: tubbo: just one thing i've not been able to solve and not been able to find good info. when i want to post an array of records to rails via json, how would i do that properly?
[19:08:48] tubbo: Talltree: !g post json array of records to rails
[19:08:52] tubbo: like for real man
[19:09:18] RegulationD: has joined #RubyOnRails
[19:09:40] skroon: tubbo: yes in development it's working, but in the css file that get's generated in production (assets:precompile) just doesn't have the fingerprint attached
[19:10:01] tubbo: skroon: oh i see what you mean, yeah
[19:10:16] tubbo: not sure. you're probably not showing me an actual line of code
[19:10:29] tubbo: or you're confused as to where the line is coming from that's causing the error
[19:10:35] Talltree: everything purple, or mostly, if i do that i'm running into multible problems, mostly with .require
[19:10:39] tubbo: because that line right there looks fine to me if app/assets/images/image.pn
[19:10:58] tubbo: if app/assets/images/image.png exists*
[19:16:38] jancel: has joined #RubyOnRails
[19:24:45] roamingdog: has joined #RubyOnRails
[19:25:52] SteenJobs: has joined #RubyOnRails
[19:26:21] Darmani: has joined #RubyOnRails
[19:26:32] Darmani: Hello everyone! ^.^
[19:28:15] LastWhisper____: has joined #RubyOnRails
[19:28:56] LastWhisper____: hey there. I'm running into an issue trying to make use of "asset_path" inside of an .erb file
[19:28:57] LastWhisper____: var image = "#{asset_path('picture.png')}";
[19:29:14] LastWhisper____: Is there a preferred approach instead of using asset_path?
[19:29:18] LastWhisper____: if I want that image to be vendored
[19:30:23] alfiemax: has joined #RubyOnRails
[19:31:24] LastWhisper____: nvm figured it out, syntax needed to be <%= and image_path
[19:32:43] gambl0re: has joined #RubyOnRails
[19:38:02] triptec: has joined #RubyOnRails
[19:38:38] roamingdog: has joined #RubyOnRails
[19:39:18] startupality: has joined #RubyOnRails
[19:41:46] bronson: has joined #RubyOnRails
[19:42:32] choke: has joined #RubyOnRails
[19:52:06] xall: has joined #RubyOnRails
[19:52:26] startupality: has joined #RubyOnRails
[19:52:30] lukec: has joined #RubyOnRails
[19:54:57] macsteps: has joined #RubyOnRails
[19:56:34] Terens: has joined #RubyOnRails
[20:03:28] Terens1: has joined #RubyOnRails
[20:04:42] startupality: has joined #RubyOnRails
[20:09:18] mdw: has joined #RubyOnRails
[20:09:42] meoblast001: has joined #RubyOnRails
[20:11:44] chouhoul_: has joined #RubyOnRails
[20:13:41] chouhoul_: has joined #RubyOnRails
[20:14:14] mrichman: has joined #RubyOnRails
[20:14:59] DoctorMonocular: has joined #RubyOnRails
[20:18:54] Devalo: has joined #RubyOnRails
[20:19:54] artto: has joined #RubyOnRails
[20:25:17] art-solopov: has joined #RubyOnRails
[20:26:45] skroon: i'm trying to load fonts from google cloud storage, but i'm getting CORS blocked in my browser, where should I configure cors, on my rails side to allow fetching from other origins? or at the google cloud storage bucket side?
[20:27:41] King_Rex: has joined #RubyOnRails
[20:29:01] B1n4r10: has joined #RubyOnRails
[20:29:11] jokke: has joined #RubyOnRails
[20:31:53] aadam21: has joined #RubyOnRails
[20:32:05] triptec: has joined #RubyOnRails
[20:34:26] kdough: has joined #RubyOnRails
[20:36:05] aadam21: has joined #RubyOnRails
[20:36:17] srinidhi: has joined #RubyOnRails
[20:37:46] akshat: has joined #RubyOnRails
[20:38:10] mrichman: skroon: Do you see the HTTP header Access-Control-Allow-Origin:* ?
[20:39:03] mrichman: skroon: If not, see "Configuring CORS on a Bucket" https://cloud.google.com/storage/docs/cross-origin#client_side_support
[20:39:59] mrichman: skroon: FYI, that header comes from the Google resources, not your Rails app
[20:41:36] skroon: mrichman: ah oke! :-) thanks
[20:41:58] djbkd: has joined #RubyOnRails
[20:42:16] jhack: has joined #RubyOnRails
[20:42:18] bruce_lee: has joined #RubyOnRails
[20:42:24] mrichman: skroon: hope it works for you
[20:43:13] ur5us: has joined #RubyOnRails
[20:43:24] LastWhisper____: has joined #RubyOnRails
[20:43:37] groatyoats: has joined #RubyOnRails
[20:46:28] groatyoats: has joined #RubyOnRails
[20:47:11] GodFather__: has joined #RubyOnRails
[20:47:14] djbkd: has joined #RubyOnRails
[20:48:10] pawnbox: has joined #RubyOnRails
[20:48:43] pawnbox: has joined #RubyOnRails
[20:49:00] jhack: has joined #RubyOnRails
[20:49:25] skroon: mrichman: btw those headres, should be on the response from google cloud storage right?
[20:49:44] mrichman: skroon: yes see my comment ^^^
[20:50:18] jhack: has joined #RubyOnRails
[20:50:24] skroon: mrichman: yes, but sorry I wans't clear if I need to send that header as the request object to google
[20:51:04] mrichman: skroon: No, it's configured server-side at Google. You just have to enable it with the steps in that link.
[20:51:11] petor: has joined #RubyOnRails
[20:51:37] skroon: mrichman: yeah I did, but still get the same issue, so I'm checking the headers now, but don't see that Access-Control-Allow-Origin:*
[20:51:58] mrichman: skroon: sorry i can't be of more help, but this is a google issue, not a rails one.
[20:52:06] skroon: mrichman: thanks
[20:52:23] groatyoats: has joined #RubyOnRails
[20:52:26] Radar: choke: I'm around now
[20:54:55] eljimmy: has joined #RubyOnRails
[20:55:33] alfiemax: has joined #RubyOnRails
[20:56:21] chouhoulis: has joined #RubyOnRails
[20:56:56] diegoviola: has joined #RubyOnRails
[20:57:08] diegoviola: has joined #RubyOnRails
[20:58:43] banister: has joined #RubyOnRails
[20:58:56] banisterfiend: has joined #RubyOnRails
[20:59:12] banisterfiend: anyone using https://github.com/shakacode/react_on_rails ?
[20:59:43] datanois1: has joined #RubyOnRails
[21:00:31] banisterfiend: where is the convention for storing app files? i notice their hello world example goes in client/app/bundles/HelloWorld/startup/HelloWorldApp.jsx but i assume the 'bundles/' but that seems a lil weird, where do people typically organize their react files when using react_on_rails ?
[21:00:39] arBmind: has joined #RubyOnRails
[21:00:50] djbkd: has joined #RubyOnRails
[21:02:12] queuetip: has joined #RubyOnRails
[21:03:23] datanoise: has joined #RubyOnRails
[21:03:27] queuetip: not sure this is the right channel for this, but i'm using sidekiq and while using sidekiq live poll or just manually refreshing, i'm seeing very different numbers. on one instance i'll have all numbers 0 (queued, busy, etc), and on the next refresh or poll, there will be thousands. why is that?
[21:05:45] eljimador: has joined #RubyOnRails
[21:06:43] FooMunki: has joined #RubyOnRails
[21:07:39] jhack: has joined #RubyOnRails
[21:09:03] bronson: has joined #RubyOnRails
[21:09:20] artto: has joined #RubyOnRails
[21:11:11] JesseH: has joined #RubyOnRails
[21:12:33] yfeldblum: has joined #RubyOnRails
[21:13:14] alfiemax: has joined #RubyOnRails
[21:13:15] akshat_: has joined #RubyOnRails
[21:13:39] yfeldblum: has joined #RubyOnRails
[21:14:21] FCser: has joined #RubyOnRails
[21:14:58] crystal77: has joined #RubyOnRails
[21:22:31] queuetip: is there maybe a better channel to ask my question in?
[21:24:16] macsteps: has joined #RubyOnRails
[21:25:38] B1n4r10: has joined #RubyOnRails
[21:26:12] triptec: has joined #RubyOnRails
[21:26:12] _3by8: has joined #RubyOnRails
[21:28:34] darwingr: has joined #RubyOnRails
[21:28:59] startupality: has joined #RubyOnRails
[21:29:15] _3by8: Trying to get a jQuery plugin working with rails. Installed it via Bower and I've included the package in my project. For reference, it's the jquery-validation plugin and it's got an optional file called "additional-methods" that isn't loading with the rest. No idea what I'm doing.
[21:30:52] queuetip: has left #RubyOnRails: ()
[21:32:04] |2701: has joined #RubyOnRails
[21:32:50] djbkd: has joined #RubyOnRails
[21:34:34] startupality: has joined #RubyOnRails
[21:39:57] datanoise: has joined #RubyOnRails
[21:40:23] DoctorMonocular: has joined #RubyOnRails
[21:41:00] cleopatra: has joined #RubyOnRails
[21:43:56] stardiviner: has joined #RubyOnRails
[21:44:20] choke: has joined #RubyOnRails
[21:44:26] hcnewsom: has joined #RubyOnRails
[21:45:57] mac10: has joined #RubyOnRails
[21:46:14] mac10: hey guys! question. looks like my api is not working on heroku but it works on local host. any ideas?
[21:47:44] noobRORDev_: mac10 did you check the logs?
[21:49:55] mac10: it’s a static site so theres not much to it. I only have 2 gems.
[21:50:08] mac10: noobRORDev_: do i need to do a lot more to use an API on heroku?
[21:50:30] fruitstand: has joined #RubyOnRails
[21:52:11] k1t: has joined #RubyOnRails
[21:52:16] artto: has joined #RubyOnRails
[21:52:30] noobRORDev_: not really if you have the all your gems and can run your migrations and seed it should work
[21:53:14] macsteps: has joined #RubyOnRails
[21:54:38] stardiviner: has joined #RubyOnRails
[21:54:38] jaequery: has joined #RubyOnRails
[21:55:51] godzillaenlacasa: has joined #RubyOnRails
[21:57:11] jancel: has joined #RubyOnRails
[21:59:29] benlieb: has joined #RubyOnRails
[22:01:21] niku: has joined #RubyOnRails
[22:02:25] Technodrome: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[22:05:03] marr: has joined #RubyOnRails
[22:05:09] mdw: has joined #RubyOnRails
[22:05:25] yfeldblum: has joined #RubyOnRails
[22:09:05] fruitstand: has left #RubyOnRails: ("Leaving")
[22:09:12] jancel: has joined #RubyOnRails
[22:09:20] fruitstand: has joined #RubyOnRails
[22:10:20] bronson: has joined #RubyOnRails
[22:15:03] Krands: has joined #RubyOnRails
[22:15:37] fruitstand: Hey, I'm cleaning out the mess of gems I have, and I can't seem to find a straight answer on the internet, will I run into any sort of problems if I just install all my gems as a non-privledged account?
[22:16:03] fruitstand: Or does something need elevated privledges to work properly
[22:19:06] dopie: has joined #RubyOnRails
[22:19:12] Darmani: Hey guys, I created a method to hide links from users that aren't the author of a post but I keep getting a nil-class error.
[22:19:14] Darmani: https://gist.github.com/mfifth/df8622b1e9b5803274c4cba1830e7147
[22:19:20] mac10: has joined #RubyOnRails
[22:19:21] Darmani: Could someone take a look?
[22:20:35] triptec: has joined #RubyOnRails
[22:30:14] jancel: has joined #RubyOnRails
[22:30:21] _3by8: Darmani: could you show us the view as well?
[22:31:02] djbkd: has joined #RubyOnRails
[22:31:12] Darmani: _3by8: Sure give me a sec
[22:31:24] banister: has joined #RubyOnRails
[22:32:02] Darmani: https://gist.github.com/mfifth/df8622b1e9b5803274c4cba1830e7147
[22:32:07] Darmani: _3by8: done
[22:32:23] KucukMubasir: Radar, are you there? I am reading your twist code, now chapters.js but I am confused at a particular line. There is no $('div#sidebar h3') element on #sidebar, so this selector is redundant ?
[22:33:05] idefine_: has joined #RubyOnRails
[22:33:29] KucukMubasir: oh I found the problem now, I think I will push the fix now
[22:37:06] _3by8: Darmani: it looks like the error is originating from the time_ago_in_words method
[22:37:44] Darmani: _3by8: wat
[22:38:01] _3by8: The error is being generated by the view, correct?
[22:38:21] _3by8: Darmani: oh, sorry...
[22:38:24] _3by8: Darmani: one second...
[22:38:28] owenjones: has joined #RubyOnRails
[22:39:11] Radar: KucukMubasir: Did you push a fix for that yet?
[22:39:45] _3by8: Darmani: show us your author and comment classes please
[22:39:50] KucukMubasir: Radar, nope. I think you typed h3, instead of hr selector for the page to scroll to top
[22:39:51] JesseH: has joined #RubyOnRails
[22:40:14] KucukMubasir: did you mean that by that selector, because that’s the only thing that can make sense
[22:40:16] macsteps: has joined #RubyOnRails
[22:40:35] KucukMubasir: I will push it with other changes if that was your intention
[22:40:50] Darmani: _3by8: I don't have an author class it's it's just a foreign key that points to the users table.
[22:41:04] Radar: KucukMubasir: I think that might be a legacy thing that doesn't do anything now that I've changed the sidebar to have back / forward navigation links
[22:41:24] Darmani: _3by8: Updated https://gist.github.com/mfifth/df8622b1e9b5803274c4cba1830e7147
[22:43:21] KucukMubasir: but back / forward navigation links don’t scroll page to top or bottom. anwyay, I added selectors to bottom and top hr elements to scroll :/
[22:43:55] KucukMubasir: yeah they are barely clickable, lol
[22:44:50] KucukMubasir: shall I push or just ignore it :)
[22:44:53] emachnic: has joined #RubyOnRails
[22:45:22] diegoaguilar: has joined #RubyOnRails
[22:45:59] Radar: KucukMubasir: hrs are not navigation elements
[22:46:09] roamingdog: has joined #RubyOnRails
[22:46:17] diegoaguilar: has joined #RubyOnRails
[22:46:46] Radar: they're there to separate the other navigation links
[22:47:37] diegoaguilar: has joined #RubyOnRails
[22:47:50] _3by8: Darmani: usually a nil:NilClass error indicates that the association doesn't exist. Have you verified that the author of that comment exists in the database?
[22:48:19] stootles: has joined #RubyOnRails
[22:48:49] Darmani: _3by8: Well that's the thing there are no comments as of yet.
[22:49:14] KucukMubasir: Radar, oh ok I also ignore that then :) then just add these lines of code to the bottom $(‘#sidebar a’) to fix header color change and location.hash when sidebar headers are clicked:
[22:49:23] KucukMubasir: $(location.hash).css("background", "white");
[22:49:23] KucukMubasir: location.hash = "#"+section_id;
[22:49:24] KucukMubasir: $(location.hash).css("background", "cornsilk");
[22:49:33] Radar: KucukMubasir: ok :)
[22:49:34] _3by8: If the database is empty then that's probably why it's erroring out. Seed the database first.
[22:50:31] Darmani: _3by8: It already has data to work with like users and forums and topics.
[22:50:58] KucukMubasir: Radar, now, when you click the navigation elements on sidebar, headers should highlight :)
[22:52:03] stardiviner: has joined #RubyOnRails
[22:52:12] _3by8: Darmani: can you show the controller also please?
[22:53:11] Darmani: _3by8: Sure hang on.
[22:53:24] _3by8: Darmani: while you're at it, can you rename the files to what they are?
[22:53:41] _3by8: Helps when you're reading.
[22:53:57] Darmani: _3by8: Yeah I should probably start doing that lol
[22:54:41] moeabdol: has joined #RubyOnRails
[22:55:05] Radar: Darmani: Or you could link to the repo on GitHub too. That would help.
[22:55:46] Darmani: Radar: Meh this is new work. I haven't made a commit for the comment system I've been building.
[22:56:55] aegis3121: has joined #RubyOnRails
[22:59:46] _3by8: Radar: do you use Bower?
[22:59:52] Radar: _3by8: nope
[22:59:56] Radar: We use Webpack at Marketplacer
[23:00:13] Radar: No idea how it was setup. Went home one day when it wasn't there, came to work next day and it was there.
[23:00:19] Radar: Seems to work
[23:00:29] tildes_: has joined #RubyOnRails
[23:00:50] m_antis: has joined #RubyOnRails
[23:01:27] aegis3121: has joined #RubyOnRails
[23:02:50] Darmani: _3by8: Sorry I'm revising something within the controller hold on one sec.
[23:02:59] _3by8: Darmani: no problem
[23:03:27] aegis3121: has joined #RubyOnRails
[23:04:14] xlegoman: has joined #RubyOnRails
[23:05:09] aegis3121: has joined #RubyOnRails
[23:07:01] emachnic: has joined #RubyOnRails
[23:08:40] sillypog: has joined #RubyOnRails
[23:10:27] Darmani: _3by8: https://gist.github.com/mfifth/df8622b1e9b5803274c4cba1830e7147
[23:10:55] Darmani: So I changed the view a bit to have the form render right on the page instead of on a /new/ url and updated the controller to correspond to that.
[23:11:01] Darmani: Still doesn't work tho
[23:11:03] Darmani: ACTION sighs
[23:11:14] bronson: has joined #RubyOnRails
[23:11:43] banister: has joined #RubyOnRails
[23:13:03] Darmani: Could this be because I don't have a comment in my database yet? o.o
[23:14:34] triptec: has joined #RubyOnRails
[23:14:52] jstransky: has joined #RubyOnRails
[23:16:05] sillypog: has joined #RubyOnRails
[23:16:08] _3by8: Pretty sure I asked you if you had seeded your database.
[23:16:17] _3by8: That might be the reason!
[23:16:23] sillypog: has joined #RubyOnRails
[23:18:08] jhack: has joined #RubyOnRails
[23:18:17] rickmasta: has joined #RubyOnRails
[23:18:54] emachnic: has joined #RubyOnRails
[23:19:38] jenrzzz: has joined #RubyOnRails
[23:20:19] emachnic_: has joined #RubyOnRails
[23:20:37] Darmani: _3by8: yeah I guess lol
[23:20:45] Darmani: I'm not sure how to seed my database with a comment though.
[23:20:58] Darmani: I suppose I could take off the method for now and put it on afterwards.
[23:21:13] barhum2013: has joined #RubyOnRails
[23:22:05] _3by8: I'm not great at programming in general but that doesn't seem "right". You probably want the code to check if there are any comments at all in the first place.
[23:22:14] macsteps: has joined #RubyOnRails
[23:22:29] _3by8: Or else the first person to comment will always get that error and you'll never have any comments.
[23:23:23] Palsson: has joined #RubyOnRails
[23:27:40] Darmani: _3by8: Well thanks for your advice(:
[23:27:44] Darmani: I do appreciate it ^^
[23:29:02] LastWhisper____: has joined #RubyOnRails
[23:32:46] pawnbox: has joined #RubyOnRails
[23:37:05] neanderslob: has joined #RubyOnRails
[23:37:11] JoshGlzBrk: has joined #RubyOnRails
[23:38:34] diegoaguilar: has joined #RubyOnRails
[23:39:34] bronson: has joined #RubyOnRails
[23:39:39] stardiviner: has joined #RubyOnRails
[23:43:17] yfeldblum: has joined #RubyOnRails
[23:43:54] yfeldblum: has joined #RubyOnRails
[23:47:02] rickmasta: has joined #RubyOnRails
[23:48:36] stardiviner: has joined #RubyOnRails
[23:50:41] nickenchuggets: has joined #RubyOnRails
[23:50:41] nickenchuggets: has joined #RubyOnRails
[23:50:52] braincrash: has joined #RubyOnRails
[23:51:09] bronson: has joined #RubyOnRails
[23:54:05] barhum2013: has joined #RubyOnRails
[23:54:16] choke: logic issues are fun... @comment is nil, so in theory it shouldn't hit that code bit of code, but either case i'd do something like a begin/ensure/rescue in set_comment, and change the logic within the author_comments_only function to run unless @comment is nil... though even with that, i'm sure there are much better ways of handling it -- just my noob look at how to get it to work
[23:56:40] dalbusch1t: has joined #RubyOnRails
[23:57:13] jhack: has joined #RubyOnRails
[23:59:10] B1n4r10: has joined #RubyOnRails