« Back to channel list

#RubyOnRails - 14 September 2015

« Back 1 day Forward 1 day »
[00:03:44] nya: has joined #RubyOnRails
[00:05:16] pontiki: has joined #RubyOnRails
[00:07:07] annlewis: has joined #RubyOnRails
[00:08:13] Coreys: has left #RubyOnRails: ()
[00:08:48] cbrunk: has joined #RubyOnRails
[00:10:57] cbrunk: Quick question -- I've added a bunch of attributes that I want to add to a resource using migrations
[00:11:01] cbrunk: Added to the .rb files
[00:11:23] cbrunk: Is there a fast way to add the corresponding columns to my model?
[00:11:32] cbrunk: There are a bunch of attributes
[00:11:33] Radar: cbrunk: which .rb files?
[00:11:38] rhizome: i already suggested migrations
[00:11:43] Radar: Did you add them to the migrations after running them already?
[00:11:57] cbrunk: rake db:migrate didn't add columns to my models
[00:12:04] rhizome: you must have done it wrong
[00:12:24] GridIronPigSkin: has left #RubyOnRails: ()
[00:13:59] cbrunk: when I run rake db:migrate it doesn't say anything
[00:14:05] cbrunk: So not sure how to figure out what the issue is
[00:14:22] Ergo: has joined #RubyOnRails
[00:15:03] FailBit: https://i.imgur.com/SAMECum.png
[00:15:45] rhizome: gist your migration
[00:16:16] cbrunk: Not sure what that means
[00:16:43] rromanch_: has joined #RubyOnRails
[00:17:15] rhizome: gist.github.com ...paste the text from your migration file there and paste the url here
[00:17:39] pontiki: also, paste the output from the rake db:migrate command. it would be interesting to see what you actually mean.
[00:18:06] cbrunk: https://gist.github.com/anonymous/f76344bfddeb73f34e06
[00:18:31] cbrunk: when I do rake db:migrate it doesn't say anything
[00:18:48] cbrunk: So I basically created that migration
[00:19:07] choke: has joined #RubyOnRails
[00:19:08] cbrunk: But then when I go into scheme it only has t.string and .text
[00:19:13] cbrunk: *schema.rb
[00:19:27] pontiki: what did you name the migration file?
[00:19:27] cbrunk: Which are the original items I had in my model/migration file
[00:19:47] cbrunk: 20150913201206_create_tshirts.rb
[00:20:03] cbrunk: I added it to the existing migration file that I had
[00:20:09] pontiki: is it a *new* migration file, or did you just edit the existing one?
[00:20:18] cbrunk: edited existing
[00:20:31] pontiki: ACTION curtsies
[00:20:49] cbrunk: So over the course of the project you just build up migration files?
[00:20:51] bqqay33qvu: has joined #RubyOnRails
[00:21:03] cbrunk: Doesn't that get messy?
[00:21:20] bqqay33qvu: hi from the syrian nigger bros
[00:21:22] bqqay33qvu: bqqay33qvu \13k _fortis a1fa abracadaniel AckZ acti0nman adam12 adamholt adavia adre aeffle aep Aeyrix aguynamedben alexblom AlHafoudh alxndr amitchellbullard andatche andrew9184 angelixd Ankhers AnoHito AntiSpamMeta apeiros arathald arcanez armyriad ArTiSTiX artmann asdffff ashleyis asi_ astrodog atmosx atomical atrius aujt74 avelldiroll Avon badeball bahar_ banister BaNzounet bartj3 bauruine bbhoss beauby blowmage bmurts bodie_ bo
[00:21:24] bqqay33qvu: llullera BongoShaftsbury borkdude bourbon bphogan braidn braincrash Brando753 brandon buhman Caius cajone calleerlandsson camilasan cball cbrunk certainty cfloare cgfbee cgrieger^away ChadyG chancancode charliesome CheckYourSix choke chouhoulis chridal chrisarcand chuy cina ciree cjk101010 clamstar closer codelahoma coffeejunk Coldblackice confact Contigi contradictioned cookiez corioliss Cork cornerman crankharder craysiii crdpink c
[00:21:26] bqqay33qvu: reature Criten cschneid csmb culturelabs DanKnox danlucraft danshultz DarkBushido darrik daveomcd Davey davidcelis daxroc daynaskully dcope ddv DEac- deavid dede deface defswork DefV Denarii Depili dfoolz Diabolik dideler diegoviola differentreality digitalknk djinni` dlitz dmz doge__ dopamean_ dotty DoubleMalt draig drale2k Dreamer3 drupald drzel dualbus ducklobster dukedave dustinm` DylanJ EasyCo ebryn eduardodeoh eggoez EiNSTeiN_
[00:21:28] bqqay33qvu: ejnahc ekem elaptics ELCALOR elektronaut elton emeka Emily Encapsulation eoy epitron epochwolf epochwolf|vps Ergo erichmenge ernesto_jimenez euphoriaa ewilliam exchgr existensil eyck FailBit FastJack fcser feignt finges_ fluchtreflex fluxsource FooBarWidget FrankD freedrull frigidco1e fryguy frzn_ fumduq funnel G Gabriel403 gambl0re GarethAdams gavit george2 ghostlines ght Glyphik Gm4n GnuYawk goodcodeguy graft_ gregf_ greister greml
[00:21:30] bqqay33qvu: y GreySyntax Guest37085 Guest5 Guest987 hackeron hahuang61 Hamled Haydos hefest_ Helheim hellschreiber helpa herenow hfp_work hightower4 hive-mind hoodow hosh humding3r hyperdrive hypnosb Iacobus iamayam iamdevnul IceBear icedp inoperable insu iooner ipstatic Isthar iszak_ itkin j0llyr0tten j_suth jalcine Jamo Jamo_ janno Jasaka jayne jbrinkmusic jcm jeadre JEEB jgladwill jhass JimmyNeutron jkwood jlpeters jlyndon joaomdmoura jocuman
[00:21:32] bqqay33qvu: joelsmith jokke- Jon30 JonasOSDever jozan jpterry jso jsrn_ jsvgoncalves jtdowney jtperreault Junaos justin2 jxf jxie_ K0nserv- kadoppe kalzz kanzure kapowaz kaspergrubbe kies kiki_lamb Killerkeksdose Kilo`byte kitallis Klumben KnownSyntax Kovensky krainboltgreene kramsee kumavis Kuukunen lacrosse lagweezle larissa LateralOctober LBRapid lea Leeky leex leifcr lele leonardoajim_ leslie_ levifig Liothen lipoqil LiquidInsect livcd llak
[00:21:34] bqqay33qvu: ey Lloyd loglaunch lord4163 lorn_ lsone_ ltd lukad lupine lxkm__ lxsameer machty machuga maloik many_ marcoceppi marienz markelite Marquel martinbjeldbak masscrx matrixise matt_d max_Q maxmanders Mchl mclee_ mcr-credil melonstorm Meow-J Mession mheld mhenrixon Mia michael_mbp mikajo mike___1234 MiracleBlue MissionCritical mist mjc_ mloy moei moneylotion monoprotic Moonlight-Angel mostlybadfly mozzarella mrtomme MuffinPimp n1lo neande
[00:21:36] bqqay33qvu: rslob neanias neilf newton nfsnobody ngr nickenchuggets nickfausnight nickjj nickyd nightsh nizmow noodle notori0us nouhh Nowaker NuckingFuts null__ nyandoge nygrenh_ Obfuscate oddalot okdas Olipro one_zero p7r Papierkorb Paradox pavelz petersaints pfg phrozen77 PlasmaStar platosha pokmo poli pontiki prasselpikachu Prira proboszc1 profdoidao Pro| psmolen ptierno pwnd_nsfw QKO_ quazimodo queequeg1 Quintasan Radar raenk RandyT Ratler r
[00:21:37] cbrunk: banhammer?
[00:21:38] bqqay33qvu: edondos Rennex rezzack1 rhinon rhizome richipargo Rickmast_ Rixius rj-code rlomax robotbrain Ropeney royvandermeij rromanch_ rromanchuk RTG` rtl RubyNewbey_ russt rzhovnirchyk sam_weerasinghe sami saneki SanguineAnomaly Scient seank_ segy Seich sekrit Senjai sethetter sfr^ sgre shaman42_ shamanime shapeshifter shawnatyger Shidash shoutsid shtirlic shwoodard siddart_ siemprefresco Sigma00 siksi Silex silverdust simkessy sininen sireco
[00:21:40] bqqay33qvu: te Siyo skakri skarn Skelz0r skmp skyjumper slani slash_nick SloggerKhan SmOkE_RU soahccc someish sonOfRa sparr spastorino speakingcode spectra sppp sptq ss_much sshuff|gone stevednd StevePotayTeo stonecolddevin Stuffness suffice sung svkurowski svkurowsl swhitt swistak35_ Symbiosisz synfinatic Synthbread Takumo tbuehlmann TDJACR teegee543 tejasmanohar tekk Tempesta tercenya terrellt thang thejoecarroll TheMonster TheMoonMaster TheSh
[00:21:42] bqqay33qvu: aun timnovins tomaw toretore totimkop1 toydestroyer triptec tris troyready Trynemjoel tskogberg tubbo twohlix unholycrab universa1 unreal Uptime urkle uxp vedu Veejay veg VeryBewitching vij- vircung|afk voxxit w0bni w0rd-driven waltz waseem_ weaksauce webdestroya webhat weltzooo wenchenx wethu WhereIsMySpoon_ widith_ WillAmes Wingar wldcordeiro wwalker x-light xhoy Xiti` xMopxShell xybre xye yardenbar yfeldblum yie_ yopp Zackio Zarth
[00:21:44] bqqay33qvu: us zeitue zeknox zemmihates Ziggy zly zrl zz_denym_
[00:21:46] Radar: +q bqqay33qvu!*@*
[00:21:51] cbrunk: Well...he's through the alphabet
[00:21:54] Radar: Shut upa your face.
[00:21:59] krainboltgreene: What the hell is that?
[00:22:01] x-light: well done Radar
[00:22:03] IceBear: Radar: second time he is around
[00:22:05] FootballJones: has joined #RubyOnRails
[00:22:11] melonstorm: Someone needs a k-line~
[00:22:14] Radar: IceBear: Yeah, I'm going to put the register mode back
[00:22:18] Radar: register required*
[00:22:19] cbrunk: Emeka's cousin escaped out of the chicken coop
[00:22:22] IceBear: Radar: thanks
[00:22:24] Radar: Good timing too. I'm about to fly out.
[00:22:33] bqqay33qvu: has left #RubyOnRails: ()
[00:22:43] bjdasd343: has joined #RubyOnRails
[00:22:45] krainboltgreene: What I wouldn't give for pre-send-to-channel hooks for ops.
[00:22:46] bjdasd343: hi from the syrian nigger bros
[00:22:47] bjdasd343: bjdasd343 Radar \13k _fortis a1fa abracadaniel AckZ acti0nman adam12 adamholt adavia adre aeffle aep Aeyrix aguynamedben alexblom AlHafoudh alxndr amitchellbullard andatche andrew9184 angelixd Ankhers AnoHito AntiSpamMeta apeiros arathald arcanez armyriad ArTiSTiX artmann asdffff ashleyis asi_ astrodog atmosx atomical atrius aujt74 avelldiroll Avon badeball bahar_ banister BaNzounet bartj3 bauruine bbhoss beauby blowmage bmurts bodie
[00:22:49] pontiki: cbrunk: in the very beginning of a project, it's often just as easy to reset the database and re-edit migrations. but as the project grows, you can't afford to do that, and most definitely after your first production push you won't want to do that at all
[00:22:49] bjdasd343: _ bollullera BongoShaftsbury borkdude bourbon bphogan braidn braincrash Brando753 brandon buhman Caius cajone calleerlandsson camilasan cball cbrunk certainty cfloare cgfbee cgrieger^away ChadyG chancancode charliesome CheckYourSix choke chouhoulis chridal chrisarcand chuy cina ciree cjk101010 clamstar closer codelahoma coffeejunk Coldblackice confact Contigi contradictioned cookiez corioliss Cork cornerman crankharder craysiii crdpin
[00:22:51] x-light: Safe flight, Radar, enjoy your trip.
[00:22:51] bjdasd343: k creature Criten cschneid csmb culturelabs DanKnox danlucraft danshultz DarkBushido darrik daveomcd Davey davidcelis daxroc daynaskully dcope ddv DEac- deavid dede deface defswork DefV Denarii Depili dfoolz Diabolik dideler diegoviola differentreality digitalknk djinni` dlitz dmz doge__ dopamean_ dotty DoubleMalt drale2k Dreamer3 drupald drzel dualbus ducklobster dukedave dustinm` DylanJ EasyCo ebryn eduardodeoh eggoez EiNSTeiN_ ejna
[00:22:53] bjdasd343: hc ekem elaptics ELCALOR elektronaut elton emeka Emily Encapsulation eoy epitron epochwolf epochwolf|vps Ergo erichmenge ernesto_jimenez euphoriaa ewilliam exchgr existensil eyck FailBit FastJack fcser feignt finges_ fluchtreflex fluxsource FooBarWidget FootballJones FrankD freedrull frigidco1e fryguy frzn_ fumduq funnel G Gabriel403 gambl0re GarethAdams gavit george2 ghostlines ght Glyphik Gm4n GnuYawk goodcodeguy graft_ gregf_ greis
[00:22:55] bjdasd343: ter gremly GreySyntax Guest37085 Guest5 Guest987 hackeron hahuang61 Hamled Haydos hefest_ Helheim hellschreiber helpa herenow hfp_work hightower4 hive-mind hoodow hosh humding3r hyperdrive hypnosb Iacobus iamayam iamdevnul IceBear icedp inoperable insu iooner ipstatic Isthar iszak_ itkin j0llyr0tten j_suth jalcine Jamo Jamo_ janno Jasaka jayne jbrinkmusic jcm jeadre JEEB jgladwill jhass JimmyNeutron jkwood jlpeters jlyndon joaomdmoura
[00:22:57] bjdasd343: jocuman joelsmith jokke- Jon30 JonasOSDever jozan jpterry jso jsrn_ jsvgoncalves jtdowney jtperreault Junaos justin2 jxf jxie_ K0nserv- kadoppe kalzz kanzure kapowaz kaspergrubbe kies kiki_lamb Killerkeksdose Kilo`byte kitallis Klumben KnownSyntax Kovensky krainboltgreene kramsee kumavis Kuukunen lacrosse lagweezle larissa LateralOctober LBRapid lea Leeky leex leifcr lele leonardoajim_ leslie_ levifig Liothen lipoqil LiquidInsect liv
[00:22:59] bjdasd343: cd llakey Lloyd loglaunch lord4163 lorn_ lsone_ ltd lukad lupine lxkm__ machty machuga maloik many_ marcoceppi marienz markelite Marquel martinbjeldbak masscrx matrixise matt_d max_Q maxmanders Mchl mclee_ mcr-credil melonstorm Meow-J Mession mheld mhenrixon Mia michael_mbp mikajo mike___1234 MiracleBlue MissionCritical mist mjc_ mloy moei moneylotion monoprotic Moonlight-Angel mostlybadfly mozzarella mrtomme MuffinPimp n1lo neandersl
[00:23:01] bjdasd343: ob neanias neilf newton nfsnobody ngr nickenchuggets nickfausnight nickjj nickyd nightsh nizmow noodle notori0us nouhh Nowaker NuckingFuts null__ nyandoge nygrenh_ Obfuscate oddalot okdas Olipro one_zero p7r Papierkorb Paradox pavelz petersaints pfg phrozen77 PlasmaStar platosha pokmo poli pontiki prasselpikachu Prira proboszc1 profdoidao Pro| psmolen ptierno pwnd_nsfw QKO_ quazimodo queequeg1 Quintasan raenk RandyT Ratler redondos Re
[00:23:03] bjdasd343: nnex rezzack1 rhinon rhizome richipargo Rickmast_ Rixius rj-code rlomax robotbrain Ropeney royvandermeij rromanch_ rromanchuk RTG` rtl RubyNewbey_ russt rzhovnirchyk sam_weerasinghe sami saneki SanguineAnomaly Scient seank_ segy Seich sekrit Senjai sethetter sfr^ sgre shaman42_ shamanime shapeshifter shawnatyger Shidash shoutsid shtirlic shwoodard siddart_ siemprefresco Sigma00 siksi Silex silverdust simkessy sininen sirecote Siyo ska
[00:23:05] bjdasd343: kri skarn Skelz0r skmp skyjumper slani slash_nick SloggerKhan SmOkE_RU soahccc someish sonOfRa sparr spastorino speakingcode spectra sppp sptq ss_much sshuff|gone stevednd StevePotayTeo stonecolddevin Stuffness suffice sung svkurowski svkurowsl swhitt swistak35_ Symbiosisz synfinatic Synthbread Takumo tbuehlmann TDJACR teegee543 tejasmanohar tekk Tempesta tercenya terrellt thang thejoecarroll TheMonster TheMoonMaster TheShaun timnovin
[00:23:07] bjdasd343: s tomaw toretore totimkop1 toydestroyer triptec tris troyready Trynemjoel tskogberg tubbo twohlix unholycrab universa1 unreal Uptime urkle uxp vedu Veejay veg VeryBewitching vij- vircung|afk voxxit w0bni w0rd-driven waltz waseem_ weaksauce webdestroya webhat weltzooo wenchenx wethu WhereIsMySpoon_ widith_ WillAmes Wingar wldcordeiro wwalker x-light xhoy Xiti` xMopxShell xybre xye yardenbar yfeldblum yie_ yopp Zackio Zarthus zeitue zek
[00:23:09] bjdasd343: nox zemmihates Ziggy zly zrl zz_denym_
[00:23:11] bjdasd343: hi from the syrian nigger bros
[00:23:13] bjdasd343: bjdasd343 Radar \13k _fortis a1fa abracadaniel AckZ acti0nman adam12 adamholt adavia adre aeffle aep Aeyrix aguynamedben alexblom AlHafoudh alxndr amitchellbullard andatche andrew9184 angelixd Ankhers AnoHito AntiSpamMeta apeiros arathald arcanez armyriad ArTiSTiX artmann asdffff ashleyis asi_ astrodog atmosx atomical atrius aujt74 avelldiroll Avon badeball bahar_ banister BaNzounet bartj3 bauruine bbhoss beauby blowmage bmurts bodie
[00:23:14] Radar: +q bjdasd343!*@*
[00:23:26] pontiki: you're going to need a deeper hostmask
[00:23:32] TheMoonMaster: The PHP devs striek again.
[00:23:40] Radar: What's the +q mode for registered users again?
[00:23:41] corioliss: yeah I blame PHP
[00:23:43] darrencauthon: has joined #RubyOnRails
[00:23:52] IceBear: chanmode +r usually
[00:23:54] Radar: +q *!*@192.99.217.2
[00:24:02] cbrunk: pont thanks -- that helps. I'm surprised that's how it works. Seems decidedly un-magical
[00:24:32] Radar: That'll stop the unregistered spammers.
[00:24:38] ngcnj2qtb: has joined #RubyOnRails
[00:24:39] VeryBewitching: Parse the logs for everything he wrote and add to stopword list in helpa ;)
[00:24:40] Radar: Now I remember why we had it in the first place :)
[00:24:46] smathy: has joined #RubyOnRails
[00:25:00] pontiki: cbrunk: let me continue :) later in the project, you may end up with so many migration files it become untenable to keep them around, and consolidation is preferrable.
[00:25:30] darrenca_: has joined #RubyOnRails
[00:25:47] iamdevnul: What's his deal anyway?
[00:26:40] cajone: has left #RubyOnRails: ()
[00:26:45] pontiki: cbrunk: rails seems magical, but databases are decidedly unmagical things; rails' migrations actually provide a very clean way of changing them. nevertheless, here be dragons.
[00:27:40] pontiki: cbrunk: don't neglect understanding how migrations, ActiveRecord and databases all work.
[00:28:36] goliathusCZ: has joined #RubyOnRails
[00:28:40] cgzub68qst: has joined #RubyOnRails
[00:28:56] someish: has joined #RubyOnRails
[00:29:49] Cache_Money: has joined #RubyOnRails
[00:29:54] Radar: iamdevnul: Why do script kiddies do what they do? Nobody knows :)
[00:30:01] Radar: Just to be disruptive little shits.
[00:30:20] pwnd_nsfw: Is it safe to assume it's PHP kids? :P
[00:30:27] Radar: pwnd_nsfw: no
[00:30:34] Radar: I experimented with removing the mode to lower the barrier to entry. If spammers are going to do their thing here then I'm going to add the +q back permanently.
[00:31:16] johnflux: has joined #RubyOnRails
[00:31:22] goliathusCZ: has joined #RubyOnRails
[00:31:31] bruno-: has joined #RubyOnRails
[00:32:01] doublemalt_: has joined #RubyOnRails
[00:36:01] wzwpb18ewp: has joined #RubyOnRails
[00:36:51] Limix: has joined #RubyOnRails
[00:37:07] wzwpb18ewp: has left #RubyOnRails: ()
[00:39:49] herbst: has joined #RubyOnRails
[00:43:59] bollullera: has left #RubyOnRails: ()
[00:46:13] Guest16641: has joined #RubyOnRails
[00:49:13] darrencauthon: has joined #RubyOnRails
[00:49:22] sevenseacat: has joined #RubyOnRails
[00:52:11] gummybehr: has joined #RubyOnRails
[00:52:31] gummybehr: has left #RubyOnRails: ()
[00:52:31] gummybehr: has joined #RubyOnRails
[00:52:35] gummybehr: has left #RubyOnRails: ()
[00:54:43] nya: has joined #RubyOnRails
[00:54:58] dopiee: has joined #RubyOnRails
[00:55:01] BlackCoyote: has joined #RubyOnRails
[00:56:18] gravity_pope: has joined #RubyOnRails
[00:57:52] i: has joined #RubyOnRails
[01:03:31] maz-dev: has joined #RubyOnRails
[01:04:43] slayerjain: has joined #RubyOnRails
[01:04:53] pontiki: is this thing still on?
[01:05:34] Aeyrix: literally someone give me ops
[01:05:42] Aeyrix: these bots can gtfo
[01:05:54] pontiki: ACTION cries
[01:05:57] pontiki: has left #RubyOnRails: (""Poets have been mysteriously silent on the subject of cheese" -- G.K.Chesterson")
[01:08:04] annlewis: has joined #RubyOnRails
[01:12:43] lampshades: has joined #RubyOnRails
[01:13:04] rocLv: has joined #RubyOnRails
[01:16:02] lampshades: Whats your favourite way to provision and deploy to aws or any other vps ?
[01:16:15] Lightsword: has joined #RubyOnRails
[01:16:23] Guest28285: has joined #RubyOnRails
[01:16:36] FrankD: has joined #RubyOnRails
[01:17:48] pwnd_nsfw: lampshades, someone told me to git to a vps
[01:18:54] lampshades: but that leaves out the provisioning portion
[01:19:19] FailBit: doesn't everyone use cap these days
[01:19:54] pwnd_nsfw: I think so. It was the first thing that came up when I was looking for a solution to GTFO of heroku
[01:20:00] pwnd_nsfw: Heroku is mad expensive, but I get it
[01:20:34] lampshades: I figured chef would be the answer
[01:20:50] pwnd_nsfw: To have an app not sleep for like 6 hours a day, you'd end up spending like $150/mo
[01:20:52] lampshades: because you could provision a local vagrent vm with it the same way you would provision the vps
[01:21:00] FailBit: we use puppet to build our server and cap to deploy
[01:21:12] fryguy: we use chef to build our servers and cap to deploy
[01:21:51] lampshades: interesting, I think I was looking too deeply into chef. I should really looking to cap more
[01:22:17] pwnd_nsfw: puppet allows you to create a cloud?
[01:22:45] FailBit: we rent a baremetal
[01:22:53] FailBit: puppet just sets up the OS for running stuff
[01:22:53] fryguy: also lol a "create a cloud"
[01:23:02] lampshades: are there any good boilerplate cap, chef, puppet scripts I can use as a starter?
[01:23:02] fryguy: cloud isn't some magical thing, it's just some virtual servers that you don't own
[01:23:19] pwnd_nsfw: I figured it was a network of servers
[01:23:37] lampshades: well, if its virtual or not it depends on the provider
[01:23:43] FailBit: it's not the cloud, it's just someone else's servers
[01:24:02] pwnd_nsfw: IS THE CLOUD EFFECTED WHEN IT RAINS?
[01:24:04] lampshades: I could have a cloud in my basement right now..
[01:25:21] lampshades: there is an ibm based company who actually put physical servers in place for you, and do the upgrades and everything
[01:25:28] fryguy: lampshades: ansible is also really nice if you don't want to buy into the whole chef ecosystem
[01:25:30] lampshades: I forgot what they're called
[01:26:02] fryguy: lampshades: lots of people will do that for you. it's called "managed hosting" rackspace for example will do it
[01:26:04] lampshades: fryguy: I keep on seeing that ansible term popup
[01:27:01] lampshades: is that simpler then chef?
[01:28:09] TheMonster: has joined #RubyOnRails
[01:29:40] lampshades: I looked at the video on the website, it seems like its a massive step ahead from what Ive seen with chef or cap
[01:30:01] lampshades: its almost like openstack for rails
[01:31:31] lampshades: fryguy: Thanks for pointing out Ansible, its really innovative compared to what Im currently setting up here
[01:33:33] cbrunk: has joined #RubyOnRails
[01:36:35] andrew902: has joined #RubyOnRails
[01:36:53] rodfersou: has joined #RubyOnRails
[01:37:55] rhizome: love my = vs == bug
[01:37:58] diego1: has joined #RubyOnRails
[01:38:06] FailBit: the best kind
[01:38:14] diego1: has joined #RubyOnRails
[01:38:20] rhizome: gonna name it Bunky
[01:38:48] andrew902: hello needing help integrating spree with an existing rails app - i can get the store and everything to work but it messes with my existing blog, all the posts disappear
[01:38:59] sevenseacat: rhizome: was it you that recommend the youtube video about working with timezones? watched it the other day - freaking hilarious
[01:39:41] umgrosscol: has joined #RubyOnRails
[01:40:15] diego1: has joined #RubyOnRails
[01:41:05] rromanch_: has joined #RubyOnRails
[01:42:58] diego1: has joined #RubyOnRails
[01:43:50] Pupeno: has joined #RubyOnRails
[01:43:59] lampshades: sevenseacat: can I haz youtub link?
[01:45:13] cbrunk: has joined #RubyOnRails
[01:45:29] huck5: has joined #RubyOnRails
[01:45:31] sevenseacat: lampshades: https://www.youtube.com/watch?v=-5wpm-gesOY
[01:46:41] rhizome: wasn't me! i was pushing the sandi metz videos the other day
[01:47:05] sevenseacat: well its an awesome video anyway!
[01:51:57] lamilami: has joined #RubyOnRails
[01:52:01] lamilami: has left #RubyOnRails: ()
[01:53:25] rhizome: it's just going and going
[01:55:02] mrchris: has joined #RubyOnRails
[01:55:07] mrchris: anyone here using Gitlab ci?
[01:55:23] mrchris: the gitlab channel is basically lifeless
[01:55:38] mrchris: anyone here using Gitlab ci?
[01:57:47] baweaver: has joined #RubyOnRails
[01:58:55] mordocai: has joined #RubyOnRails
[02:01:37] greengriminal: has joined #RubyOnRails
[02:02:01] idd2d: has joined #RubyOnRails
[02:03:47] rromanch_: has joined #RubyOnRails
[02:03:53] havenwood: has joined #RubyOnRails
[02:08:49] annlewis: has joined #RubyOnRails
[02:11:26] jenrzzz: has joined #RubyOnRails
[02:15:06] Creeves: has joined #RubyOnRails
[02:17:26] slayerjain: has joined #RubyOnRails
[02:20:38] michael_mbp: has joined #RubyOnRails
[02:24:24] atomical: has joined #RubyOnRails
[02:28:32] FailBit: can you implement turbolinks as a clientside thing?
[02:28:42] FailBit: like using greasemonkey
[02:28:49] FailBit: because I can't put it on the site :<
[02:34:06] tejasmanohar: has joined #RubyOnRails
[02:34:39] FailBit: use turbolinks as a greasemonkey script.
[02:35:12] sdwrage: has joined #RubyOnRails
[02:35:42] djbkd: has joined #RubyOnRails
[02:42:10] qejk: has joined #RubyOnRails
[02:43:23] Cache_Money: has joined #RubyOnRails
[02:44:38] ledestin: has joined #RubyOnRails
[02:45:40] lampshades: wow.. thats a new one: I tried installing nokogiri 1.6.6.2 on my ubuntu vagrent vm and the error I got was: "Killed" lol
[02:49:13] pulgalipe: has joined #RubyOnRails
[02:49:32] diego1: has joined #RubyOnRails
[02:50:33] lampshades: followed by nothing else
[02:50:58] diego1: has joined #RubyOnRails
[02:51:51] qejk: has joined #RubyOnRails
[02:53:16] pulgalipe: has joined #RubyOnRails
[02:53:29] greengriminal: has joined #RubyOnRails
[02:55:38] pulgalipe: has joined #RubyOnRails
[02:56:17] havenwood: lampshades: Game Over
[02:56:59] pulgalipe: has joined #RubyOnRails
[02:57:44] tejasmanohar: has joined #RubyOnRails
[02:58:21] pawnbox: has joined #RubyOnRails
[03:01:55] fedexo: has joined #RubyOnRails
[03:07:22] qejk: has joined #RubyOnRails
[03:08:21] lampshades: ACTION abruptly leaves the office in search for a new life as a painter in south of france
[03:09:17] huck5: ACTION supports lampshades' decision.
[03:09:37] annlewis: has joined #RubyOnRails
[03:09:49] braincrash: has joined #RubyOnRails
[03:10:37] sevenseacat: sometimes I'd love to make a decision like that
[03:10:45] ngscheurich: has joined #RubyOnRails
[03:11:12] siddart: has joined #RubyOnRails
[03:12:14] Lightsword: has joined #RubyOnRails
[03:12:36] sevenseacat: like today, for example
[03:12:42] huck5: Ugh. I'm going to ask one more question (.. at least) about these nested forms. I have a`<%= f.fields_for :effects, @effect_values do |e| %>`. I tried to use debugger to log '@effect_values`... it crashed.
[03:12:51] johnflux: has joined #RubyOnRails
[03:12:51] johnflux: has joined #RubyOnRails
[03:13:20] huck5: I read that the `@effect_values` should be an array of the nested attributes within the field_for... If this is the case, how should I be accessing it?
[03:13:47] lampshades: ACTION goes for a smoke, remembers his lease and visa statement and sits down like nothing happens
[03:13:48] sevenseacat: you shouldnt need to do that at all - if you have f.fields_for :effects, it will read the effects from whatever f.object is
[03:14:07] lampshades: how would I go diagnosing such a problem?
[03:14:35] huck5: Hum. I tried that, but couldn't establish how to build my Effects from within the (Strain) controller.
[03:15:02] sevenseacat: a Strain has_many Effects?
[03:15:11] sevenseacat: then it would just be something like @strain.effects.build
[03:15:34] huck5: Unfortunately I have set up my relationships so that a Strain HABTM Effects (and vise versa).
[03:16:26] sevenseacat: http://guides.rubyonrails.org/association_basics.html#has-and-belongs-to-many-association-reference
[03:16:41] huck5: Yeah, I tried that... But when I built the collection in my `new` method, and added an additional Effect (so that I could simulate multiple effects), and iterated over the @strain.effects, I only got one result..
[03:16:49] huck5: Code would help.
[03:16:54] sevenseacat: indeed it would
[03:17:17] huck5: One moment please :)
[03:24:30] huck5: sevenseacat, here https://gist.github.com/Huck5/f3e049738c11e717dfdd . Apologies for the delay.
[03:24:36] brunoalano: has joined #RubyOnRails
[03:24:53] huck5: I hate bothering everyone with my questions about this application that is basically a pipe/pet project. I find the subject matter somewhat... questionable.
[03:25:28] sevenseacat: so which part is only showing one effect when you expect multiple?
[03:25:33] crdpink2: has joined #RubyOnRails
[03:26:04] wldcordeiro_: has joined #RubyOnRails
[03:26:36] fedexo: has joined #RubyOnRails
[03:26:48] huck5: That's the logger line in the controller
[03:26:53] brunoalano: Developing a system in Rails, I catched a problem: for example, I've a Company model that has_and_belongs_to_many Users. But when you create a Company, you need to create the first User. So, how it's a good way to do that?
[03:27:05] sevenseacat: huck5: and why do you expect to see more than one
[03:27:27] huck5: Sorry - I took my time trying set up the correct example, and messed up.
[03:27:45] sevenseacat: i think this part is going to cause problems though - https://gist.github.com/Huck5/f3e049738c11e717dfdd#file-strains_controller-rb-L99 effects_attributes is going to be an array of effect data
[03:27:57] sevenseacat: not just a single scalar
[03:28:15] huck5: I added an additional effect in the strains_controller new method. Then there were two fields. But I still only got one result from the list..
[03:28:38] sevenseacat: yeah check your strong parameters
[03:28:52] Shidash: has joined #RubyOnRails
[03:29:07] qejk: has joined #RubyOnRails
[03:29:59] bruno-: has joined #RubyOnRails
[03:30:03] sfr^: has joined #RubyOnRails
[03:30:07] universa1: has joined #RubyOnRails
[03:30:26] urkle: has joined #RubyOnRails
[03:31:40] huck5: sevenseacat, I should be allowing an _array_ of params (e.g. `:effects => []`) ?
[03:31:53] s2013: has joined #RubyOnRails
[03:32:24] sevenseacat: yes, you should be permitting the specific nested values you expect to receive, eg. effects_attributes: [:feeling_id, :adjustment_id]
[03:32:44] huck5: Awesome! Thank yhou.
[03:32:49] sevenseacat: you probably have a message in your logs about the unpermitted parameters, when you submit the form
[03:32:53] sevenseacat: i wish it would raise by default
[03:32:57] huck5: Yeah, I totally do.
[03:33:15] huck5: `Unpermitted parameter: effects_attributes`.
[03:33:24] huck5: Rails even names it for me ! :D
[03:33:37] huck5: Ok, thanks. I'll see if I can finally get this working.
[03:33:47] sevenseacat: if you want to get an exception when that happens instead, you can add this to your config/development.rb https://github.com/rubysherpas/r4ia_examples/blob/master/ticketee/config/environments/test.rb#L46
[03:33:53] sevenseacat: and restart server/spring/etc.
[03:33:55] huck5: Oh, that's good to know!
[03:34:07] huck5: Definitely bookmark that page.
[03:36:42] pontiki: has joined #RubyOnRails
[03:37:36] krz: has joined #RubyOnRails
[03:40:33] xcesariox: has joined #RubyOnRails
[03:41:10] mheld: has joined #RubyOnRails
[03:42:32] huck5: sevenseacat, you, sir, are my saviour. It works.
[03:42:40] Ropeney: `options[:include_show] = true if options[:include_show].nil?` any cleaner way? if include_show comes in false i want it to stay false and comes in true i want it to stay true but default to true if nothing sent through.
[03:42:41] huck5: (obviously now I need to figure out the other logic).
[03:42:54] qejk: has joined #RubyOnRails
[03:43:27] huck5: sevenseacat, just another q. Given that I have the `accepts_nested_attributes_for`, etc. When I go ` @strain.effects.build` Rails should take care of the rest?
[03:43:38] huck5: Regarding my join table, etc
[03:44:03] sevenseacat: Ropeney: yeah the keeping false bit means you can't really use ||= or anything like that
[03:44:10] sevenseacat: huck5: it should - give it a go
[03:44:19] huck5: sevenseacat, good advice ;)
[03:44:31] Ropeney: sevenseacat: thats the issue i was having, just checking if there is a more "ruby" way
[03:52:19] pontiki: Ropeney: does it matter if options[:include_show] is explicitly set to nil?
[03:53:07] Ropeney: pontiki: I would rather not to have to pass include_show: true on a thousand methods, if that's what you mean
[03:53:26] pontiki: not what i mean
[03:53:39] qejk: has joined #RubyOnRails
[03:54:11] iateadonut: has joined #RubyOnRails
[03:54:27] Ropeney: pontiki: I use it in a option down below saying if options[:include_show], if it is nil it would pick up as false?
[03:54:49] pontiki: your test treats the value set to nil the same as if the option was not set. i'm just checking to make sure that's what you want it to mean.
[03:55:16] Ropeney: pontiki: It does sound good, but how do you differentiate between nil and false?
[03:55:21] pontiki: i'm not telling you how it *should* be
[03:55:25] darrencauthon: has joined #RubyOnRails
[03:56:04] pontiki: there's a couple of ways. you can ask options.has_key?(:include_show), which will be false if it hasn't ever been set
[03:56:42] sevenseacat: or options.fetch(:include_show, true)
[03:56:51] pontiki: you can use options.fetch(:include_show, true) which will give a value of true in the case of it being not set
[03:56:53] sevenseacat: may also work
[03:56:58] baweaver: problem with fetch is if it's explicitly nil
[03:57:04] Ropeney: cheers they do look good
[03:57:30] pontiki: baweaver: that's the case to use fetch
[03:57:31] Ropeney: i went with `defaults = { include_show: true }; options = defaults.merge(options)`
[03:57:47] pontiki: fair enough
[03:57:57] baweaver: just saying to watch out for it, I've been hit a few times :D
[03:57:59] pontiki: that's nice and explicit
[03:58:31] Ropeney: but thats pontiki and sevenseacat, just was hoping there was a ||= type operator that dealt with nil only
[03:59:05] willywos: has joined #RubyOnRails
[03:59:07] pontiki: ||= is dealing with falsy
[03:59:57] baweaver: class Object; def nil_to(v) self = v if self.nil? and return self end end
[03:59:58] DmitryBochkarev: has joined #RubyOnRails
[04:00:01] baweaver: ACTION whistles
[04:00:06] johnflux: has joined #RubyOnRails
[04:00:23] baweaver: dirty hack is dirty
[04:00:27] zeknox: has joined #RubyOnRails
[04:00:31] Ropeney: baweaver: nice but as messy as my one above :P
[04:00:59] dionysus69: has joined #RubyOnRails
[04:02:03] SteenJobs: has joined #RubyOnRails
[04:05:48] pontiki: the default options merge? that's not messy at all
[04:09:27] nahtnam: has joined #RubyOnRails
[04:10:24] annlewis: has joined #RubyOnRails
[04:10:37] Ropeney: pontiki: i meant my original solution sorry
[04:12:48] nik_-_: has joined #RubyOnRails
[04:15:54] chipotle: has joined #RubyOnRails
[04:15:56] braincra-: has joined #RubyOnRails
[04:19:43] nya: has joined #RubyOnRails
[04:22:35] johnflux: has joined #RubyOnRails
[04:23:06] rocLv: has joined #RubyOnRails
[04:26:52] nya: has joined #RubyOnRails
[04:31:18] yfeldblum: has joined #RubyOnRails
[04:31:54] rubyonrails525: has joined #RubyOnRails
[04:34:09] mehwork: has joined #RubyOnRails
[04:35:08] rickmasta: has joined #RubyOnRails
[04:36:03] rhizome: has joined #RubyOnRails
[04:37:33] s2013: has joined #RubyOnRails
[04:39:13] CheckYourSix: has joined #RubyOnRails
[04:41:02] quazimodo: has joined #RubyOnRails
[04:41:24] herbst: has joined #RubyOnRails
[04:46:25] rromanch_: has joined #RubyOnRails
[04:50:56] bratsche: has joined #RubyOnRails
[04:52:22] zeknox1: has joined #RubyOnRails
[04:54:39] chipotle: you still in nyc?
[04:56:02] s2013: hello chipotle . nope
[04:56:15] chipotle: where are you?
[04:56:20] chipotle: i just ogt out of the icu
[04:56:24] chipotle: now on a general med floor
[04:56:41] chipotle: i'm very sick :/
[04:59:30] dmz: out of icu & online, go rest! get better!
[04:59:52] dmz: unless you need geek support then we're here :)
[05:03:53] duncannz: has joined #RubyOnRails
[05:06:47] maz-dev: has joined #RubyOnRails
[05:08:05] chipotle: dmz: geek support is good!
[05:08:13] pawnbox: has joined #RubyOnRails
[05:11:01] annlewis: has joined #RubyOnRails
[05:15:19] dhjondoh: has joined #RubyOnRails
[05:20:54] lampshades: omg, it happen again with rbenv!
[05:21:08] lampshades: Installing nokogiri 1.6.6.2 with native extensions
[05:21:37] lampshades: ACTION goes on amazon to find a good set of oil paints
[05:22:59] lampshades: how do I go about debugging something with such an error message?
[05:24:03] djbkd: has joined #RubyOnRails
[05:25:20] lampshades: now this is just strange, when I run bundle install nokogiri outside bundler, nobody dies..
[05:25:37] lampshades: gem install ** (not bundle install)
[05:25:45] srinidhi: has joined #RubyOnRails
[05:28:09] lampshades: could it be because the vm has only 512mb of ram?
[05:30:31] rhizome: does it have libxml2?
[05:33:52] goliathusCZ: has joined #RubyOnRails
[05:34:28] codenapper: has joined #RubyOnRails
[05:35:56] yottanami: has joined #RubyOnRails
[05:36:13] aganov: has joined #RubyOnRails
[05:36:58] yottanami: has left #RubyOnRails: ()
[05:37:04] yottanami: has joined #RubyOnRails
[05:37:10] dhjondoh1: has joined #RubyOnRails
[05:42:28] lampshades: https://github.com/lyosha85/rails-dev-box/blob/master/bootstrap.sh
[05:43:45] yottanami: I want to send a POST request to another site so I used Net::HTTP::Post but I got Errno::ECONNRESET: Connection reset by peer
[05:44:17] yottanami: I tried a simple HTML (without rails) form it can sumbit content to url
[05:45:19] tagrudev: has joined #RubyOnRails
[05:46:57] goliathusCZ: has joined #RubyOnRails
[05:49:07] zpe: has joined #RubyOnRails
[05:50:25] lampshades: can anyone please share a good vagrantfile to be used with rails 4.2 @ 2.2.3
[05:51:15] chouhoulis: has joined #RubyOnRails
[05:51:59] cac: has joined #RubyOnRails
[05:52:13] alexUaN: has joined #RubyOnRails
[05:53:10] lampshades: has joined #RubyOnRails
[05:53:40] pawnbox: has joined #RubyOnRails
[05:59:26] rickmasta: has joined #RubyOnRails
[05:59:26] naftilos76: has joined #RubyOnRails
[05:59:38] n008f4g_: has joined #RubyOnRails
[06:00:11] michael_mbp: has joined #RubyOnRails
[06:03:45] nhhagen: has joined #RubyOnRails
[06:03:47] lwu: has joined #RubyOnRails
[06:05:45] nya: has joined #RubyOnRails
[06:06:15] goliathusCZ: has joined #RubyOnRails
[06:07:28] kimegede: has joined #RubyOnRails
[06:07:43] solars: has joined #RubyOnRails
[06:08:00] iamse7en: has joined #RubyOnRails
[06:08:49] iamse7en: anyone have experience deploying to digital ocean? following tutorials but cap aborted when trying to access a variable defined in my application.yml file
[06:10:56] eGGsha: has joined #RubyOnRails
[06:11:08] toomus: has joined #RubyOnRails
[06:11:09] yottanami: I got "=> #<Net::HTTPFound 302 Found readbody=true>" in Net::HTTP output, is it ok? how should I pass it to Rails response?
[06:11:29] quazimodo: has joined #RubyOnRails
[06:11:45] annlewis: has joined #RubyOnRails
[06:13:05] toomus: I need to make UNION of two queries, and paginate it with Kaminari. The problem is, that find_by_sql function returns Array instead of ActiveRecord::Relation
[06:14:48] rocLv: has joined #RubyOnRails
[06:16:40] sininen: has joined #RubyOnRails
[06:16:58] kp666: has joined #RubyOnRails
[06:18:01] rhizome: yottanami: i think that will just send it off without waiting. i see many people using httparty for that kind of thing
[06:18:23] rhizome: iamse7en: check out rubber
[06:18:56] rhizome: toomus: check to see if kam has an array extension/workaround. will_paginate does
[06:21:42] riotjones: has joined #RubyOnRails
[06:22:06] yottanami: rhinon, As I checked it is redirection, now I need to pass it to Rails output
[06:22:28] yottanami: How should I send Net::HTTP to rails response
[06:23:45] geoffw8_: has joined #RubyOnRails
[06:25:24] geoffw8_: wow, long time since I've been here!
[06:28:25] herbst: has joined #RubyOnRails
[06:28:25] herbst: has joined #RubyOnRails
[06:31:19] Cervajz: has joined #RubyOnRails
[06:33:03] Cervajz_: has joined #RubyOnRails
[06:33:56] comrad: has joined #RubyOnRails
[06:34:02] MartinElvar: has joined #RubyOnRails
[06:35:29] arup_r: has joined #RubyOnRails
[06:39:34] Ergo: has joined #RubyOnRails
[06:40:12] RobPom: has joined #RubyOnRails
[06:43:11] mission712: has joined #RubyOnRails
[06:43:24] jas02: has joined #RubyOnRails
[06:44:19] rocLv: has joined #RubyOnRails
[06:44:27] leonardoajim_: has joined #RubyOnRails
[06:47:05] sandstrom: has joined #RubyOnRails
[06:47:34] towski_: has joined #RubyOnRails
[06:50:00] Pupeno: has joined #RubyOnRails
[06:50:28] pawnbox: has joined #RubyOnRails
[06:50:45] toomus: OK, another question. Why ORDER BY doesn't work in UNION?
[06:50:52] voker57: has joined #RubyOnRails
[06:51:16] skullcrasher: has joined #RubyOnRails
[06:52:00] chouhoulis: has joined #RubyOnRails
[06:53:24] Pupeno_: has joined #RubyOnRails
[06:59:34] arup_r: toomus: http://stackoverflow.com/a/8685199/2767755
[06:59:38] rhizome: not the way you factorygirl: create[:item]
[06:59:47] allenn: has joined #RubyOnRails
[07:00:16] moei: has joined #RubyOnRails
[07:00:28] frzn: has joined #RubyOnRails
[07:00:28] frzn: has joined #RubyOnRails
[07:00:46] ChadyG_: has joined #RubyOnRails
[07:02:20] pawnbox: has joined #RubyOnRails
[07:06:22] artto: has joined #RubyOnRails
[07:06:37] pawnbox: has joined #RubyOnRails
[07:07:37] arup_r: certainty: after long time it seems :)
[07:08:22] maz-dev: has joined #RubyOnRails
[07:09:06] Cervajz: has joined #RubyOnRails
[07:10:09] pontiki: has joined #RubyOnRails
[07:11:53] pnjbr15ant: has joined #RubyOnRails
[07:13:00] annlewis: has joined #RubyOnRails
[07:13:37] nhhagen_: has joined #RubyOnRails
[07:14:32] hwlwk57etv: has joined #RubyOnRails
[07:14:54] dede: has joined #RubyOnRails
[07:17:12] sandstrom: has joined #RubyOnRails
[07:17:51] mylord: has joined #RubyOnRails
[07:22:18] pawnbox: has joined #RubyOnRails
[07:24:31] sandstrom: has joined #RubyOnRails
[07:26:03] rocLv: has joined #RubyOnRails
[07:26:28] zpe: has joined #RubyOnRails
[07:26:56] greenarrow: has joined #RubyOnRails
[07:27:27] Balzrael: has joined #RubyOnRails
[07:31:20] edwinvdgraaf: has joined #RubyOnRails
[07:31:27] bruno-: has joined #RubyOnRails
[07:33:53] redmaverick: has joined #RubyOnRails
[07:34:08] MartinElvar: has joined #RubyOnRails
[07:37:18] redmaverick: I have 20_000+ books in the database. I have a book.rb class. I am trying to make the search run faster. https://gist.github.com/anonymous/d0075371e9136dc93b0d How do I optimize the SQL query
[07:37:57] rhizome: what country uses _ as the thousands separator?
[07:38:38] redmaverick: hmm.. should have used ,
[07:39:40] skullcrasher_: has joined #RubyOnRails
[07:39:41] rhizome: yes, that's going to be an ineffecient query. either do them separately and smoosh the results together, or use a search engine
[07:40:02] sevenseacat: some indexes might help, but probably not much given the query
[07:40:18] baweaver: question is do you really really really need like?
[07:40:28] rhizome: indexes aren't used on LIKE queries in mysql
[07:40:41] sevenseacat: yes well, lol mysql
[07:41:54] ghostlines: has joined #RubyOnRails
[07:42:00] charliesome: has joined #RubyOnRails
[07:42:26] redmaverick: hmmmm.. basically, the user types in J, J.K, J.K Rowling on the mobile interface and it should fire this query and return the result instantly.
[07:42:26] rhizome: pg doesn't use them on front-anchored strings
[07:43:10] baweaver: look into n-grams
[07:43:13] baweaver: like will be slow
[07:43:26] Juanchito: has joined #RubyOnRails
[07:43:41] rhizome: redmaverick: that's not a "oh just do a query" type feature
[07:43:48] sevenseacat: it'll be instant enough, with only 20,000 books
[07:44:17] redmaverick: but the books will eventually grow to 100,000 + but yeah. for now 20k
[07:44:24] sevenseacat: still negligible
[07:44:25] drptbl: has joined #RubyOnRails
[07:44:28] blackmesa: has joined #RubyOnRails
[07:47:40] jsrn_: has joined #RubyOnRails
[07:48:29] Axy: has joined #RubyOnRails
[07:48:46] Axy: has joined #RubyOnRails
[07:49:09] yottanami: I have some API user and passwords and I dont want to put them in my code where is the best place to defining these variables?
[07:49:12] michael_mbp: has joined #RubyOnRails
[07:51:23] arup_r: yottanami: https://github.com/bkeepers/dotenv
[07:51:51] TDJACR: has joined #RubyOnRails
[07:52:26] wellsonjain: has joined #RubyOnRails
[07:53:03] chouhoulis: has joined #RubyOnRails
[07:58:17] yottanami: arup_r, Thanks dude
[07:59:13] yottanami: arup_r, Is it for development? What about Production?
[07:59:41] michael_mbp: has joined #RubyOnRails
[08:01:38] arup_r1: has joined #RubyOnRails
[08:01:45] Pupeno: has joined #RubyOnRails
[08:01:50] jgt: has joined #RubyOnRails
[08:03:53] Linuus: has joined #RubyOnRails
[08:04:04] krisquigley: has joined #RubyOnRails
[08:05:45] wellsonjain: I would like to ask some questions about rails engine
[08:06:15] dideler: has joined #RubyOnRails
[08:07:25] weckl: has joined #RubyOnRails
[08:08:59] maz-dev: has joined #RubyOnRails
[08:09:14] wellsonjain: recentlly i try to move my model layer and db/migration to rails engine and it works fine. But after i try to run cucumber it will drop the db and reset without running seed.
[08:10:08] wildlander: has joined #RubyOnRails
[08:11:51] pawnbox: has joined #RubyOnRails
[08:11:54] Cervajz_: has joined #RubyOnRails
[08:11:57] dhjondoh1: has joined #RubyOnRails
[08:13:23] ledestin: has joined #RubyOnRails
[08:13:46] lampshades: has joined #RubyOnRails
[08:13:48] annlewis: has joined #RubyOnRails
[08:13:53] darutoko: has joined #RubyOnRails
[08:14:31] vasilakisFiL: has joined #RubyOnRails
[08:14:51] darutoko-: has joined #RubyOnRails
[08:15:54] mikecmpbll: has joined #RubyOnRails
[08:17:04] stevednd: has joined #RubyOnRails
[08:17:50] jas02: has joined #RubyOnRails
[08:18:06] jgt1: has joined #RubyOnRails
[08:19:14] x-light: has joined #RubyOnRails
[08:21:13] darutoko: has joined #RubyOnRails
[08:23:54] moeabdol: has joined #RubyOnRails
[08:25:23] p8m: has joined #RubyOnRails
[08:28:18] lampshades: Ive been reading some js manuals lately, .. why would people put themselves through so much pain writing this screwed up language lol
[08:31:51] atmosx: how's life ppl
[08:33:13] arup_r1: atmosx: mine is good.. going to join a company where they write only APIS :) So I will be out of touch CSS and JS hehehe
[08:33:34] arup_r1: can u ppl see me ?
[08:33:43] srinidhi: has joined #RubyOnRails
[08:33:47] srinidhi: has joined #RubyOnRails
[08:35:18] universa1: arup_r_: nope, no one can see you.
[08:35:27] stevednd: has joined #RubyOnRails
[08:35:39] arup_r1: thanks for confirming... :D
[08:36:53] atmosx: arup_r_: I wrote my first api yesterday. Well just a "get" that returns json. It's a side-project, sinatra based :-) cool staff. You'll help me implement oauth2 in version 2 :-P
[08:38:52] DoubleMalt: has joined #RubyOnRails
[08:38:58] arup_r1: atmosx: sure.. :)
[08:39:35] arup_r1: atmosx: Why are you writing so many rails apps :) To get a job or to role your new business :)
[08:39:46] arup_r1: If it too personal don't answer me
[08:41:57] curses: has joined #RubyOnRails
[08:41:59] bruno-: has joined #RubyOnRails
[08:42:18] atmosx: arup_r_: I'd love to get a job as rails dev, but no one hires junior devs remotely. :-)
[08:42:37] arup_r1: hum.. got you now
[08:43:30] atmosx: have some job offers from recruiters every now and then (well interview offers, but some were very straight), but all require relocation and I'm no twilling to relocate.
[08:43:31] arup_r1: atmosx: I also started to write some toy apps while learning Rails.. None of them I finished :( .. I am so lazy in home
[08:43:57] atmosx: arup_r_: I finish them, I'm just too bored to write proper tests.
[08:43:58] arup_r1: atmosx: Ok.
[08:44:09] atmosx: so in a way, there' not "finished".
[08:44:55] arup_r1: relocate to where..? UK, Germany.. ?
[08:45:16] arup_r1: I heard these 2 countries do have too many Rails shops..
[08:45:36] atmosx: Germany mostly and yes, 2 jobs at london
[08:46:04] arup_r1: humm.. see I have correct information
[08:46:36] atmosx: one at a lab, linux sys-admin with ruby knowledge and some biology knowledge (I have a degreein Pharmacy so I was kina perfect fit... I use linux since 2000 so I'm comfortable with admin tasks/setup/etc.), but as I said I didn't wanan relocate.
[08:46:41] atmosx: most of them are for berlin though.
[08:47:25] atmosx: Paycheck wasn't good enough for london anyway. with 45k GBP/year I'm not sure you can do much. i'm not sure what the avg salary for a developer in the UK is though.
[08:47:39] rocLv: has joined #RubyOnRails
[08:47:45] atmosx: arup_r_: would you be willing to relocate?
[08:48:00] wethu: has joined #RubyOnRails
[08:48:14] xrtv: has joined #RubyOnRails
[08:48:34] arup_r1: Hum. After 1 or 2 year
[08:48:53] drptbl: has joined #RubyOnRails
[08:49:12] arup_r1: But it really depends about the offer ..
[08:50:16] lampshades: I first relocated to a place where I dont speak the language, then I got hired as a rails dev lol
[08:50:29] xrtv: has left #RubyOnRails: ()
[08:50:50] lampshades: now Im screwed lololol
[08:51:26] lampshades: there is so much truth to what gandolf said
[08:51:26] arup_r1: lampshades: why ?
[08:52:07] lampshades: It's a dangerous business, arup_r_, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.
[08:52:40] lampshades: long story short, followed a pretty girl across the ocean
[08:52:43] certainty: that's only true for hobbits
[08:53:34] lampshades: my life is all screwed up because of that now lol
[08:53:48] chouhoulis: has joined #RubyOnRails
[08:53:52] lampshades: imagine going to work not being able to read any of the street names, or speak to anybody, and everyone is staring at you
[08:54:11] jgt1: has joined #RubyOnRails
[08:54:12] certainty: also probably not the most clever thing
[08:54:29] lampshades: she was a rich model..
[08:54:34] lampshades: when I met her
[08:54:45] certainty: now she's broke and looks horrible?
[08:54:56] lampshades: wouldnt go that far..
[08:55:18] lampshades: she actually kicked me out on the street, and I had to find a place to stay
[08:55:42] drale2k: has joined #RubyOnRails
[08:55:53] atmosx: lampshades: learn the damn language then
[08:56:19] atmosx: lampshades: interesting, write a book.
[08:56:21] lampshades: atmosx: why dont you learn 10,000 new characters just to read the damn newspaper
[08:56:43] atmosx: lampshades: well, in your case, it's not just about the newspaper... is it? :-)
[08:57:02] lampshades: lol... if thats interesting, you have no idea what long story short entails
[08:59:18] arup_r1: lampshades: :)
[09:00:32] arup_r1: lampshades: You are from ?
[09:00:33] lampshades: you know what, I will write a damn book, I keep on having people suggest that to me. Then instead of telling my tired old story to people I meet, I can just refer them to a pdf
[09:01:46] atmosx: lampshades: yeah, I did with bitcoin and it worked. Instead of answering every question time and again I wrote a blog post. But your story seems more interesting, it's a good idea to use a PDF. Some pics willr ender the story more readable.
[09:02:09] certainty: for example the beautiful model
[09:02:16] rocLv: has joined #RubyOnRails
[09:02:25] atmosx: certainty: if she looks like this https://www.google.gr/search?q=irina+shayk&espv=2&biw=2133&bih=1197&site=webhp&source=lnms&tbm=isch&sa=X&ved=0CAYQ_AUoAWoVChMIvN_kjpX2xwIVhWnbCh2zjgtj&dpr=0.9
[09:02:53] certainty: who's irina shayk?
[09:03:01] certainty: a model apparently
[09:03:09] atmosx: well, yeah.
[09:03:11] arup_r1: brb for lunch
[09:03:12] lampshades: like model view controller
[09:03:16] lampshades: cos that was I was talking about
[09:03:52] certainty: of course :)
[09:03:54] lampshades: mine was shorter, smaller tits, japanese, and a white chick's ass
[09:04:06] atmosx: certainty: I foresee downward spiral and the audience loosing interest...
[09:04:18] atmosx: lampshades: shit, you eneded up an in Japan?
[09:04:20] certainty: atmosx: yepp you could be right
[09:04:30] fxn: has joined #RubyOnRails
[09:04:35] lampshades: right in the center of tokyo
[09:04:43] mylord: has joined #RubyOnRails
[09:04:48] certainty: so you're in japan right now?
[09:04:55] fxn: has joined #RubyOnRails
[09:05:05] certainty: trying to get big in japan?
[09:05:38] certainty: hmm and you don't know a single word?
[09:05:39] atmosx: does anyone speak English there?
[09:05:47] atmosx: certainty: have you been in China/JP?
[09:05:57] certainty: most of the japanese beople can write english but not speak
[09:06:04] mylord: has left #RubyOnRails: ()
[09:06:36] certainty: atmosx: nope. I have some friends that visited japan
[09:06:37] lampshades: the way to break the ice here is to say "Hi, My Name is .." "How are you". Where they 90% of the time answer "Im fine, Thank you. How about you?"
[09:06:37] atmosx: certainty: you can't tell between words and entire phrases.
[09:06:52] lampshades: but reallllly slow
[09:07:19] atmosx: certainty: I was like "If I get lost here, I'd be a year before anyone finds me"... in China. I was a small village (of 3.5 million people) for business w/ my father in 2011 IIRC.
[09:07:43] lampshades: I actually started off in #3dsmax as a cg artist, now I:m a full time rails dev .. I should name the chapters after the irc channels I visit at every different phase
[09:07:49] certainty: atmosx: oh that sounds interesting. How did you get out? google maps?
[09:08:13] atmosx: Our translator was talking about "her villate" and I was talking about "my town". I found out that her "village" has ~ 3m ppl while my "town" had 45k.
[09:08:38] certainty: it's all subjective
[09:08:53] atmosx: I mean... It's another universe. The taste of the food, the real chinese food, is ... there are no words to express the chemical reactions taking place in your mouth. It's not sweet or bitter it's something else.
[09:09:21] lampshades: the thing I fear about writing this book is that if I:ll make it 100% honest, it will piss off a lot of people I know
[09:09:50] atmosx: on the bright side of things, there wer many tall beautiful chinese women. And everyone of them wanted to have a baby... I'm talking about the ones that didn't had one already.
[09:10:08] lampshades: not that it would matter too much, but the tradeoff isnt worth it
[09:10:25] atmosx: lampshades: well, if it's good, they'll forgive you.
[09:10:35] atmosx: ah you know better
[09:10:43] marr: has joined #RubyOnRails
[09:10:58] pontiki: has joined #RubyOnRails
[09:12:00] lampshades: anyways, back to the code
[09:14:34] annlewis: has joined #RubyOnRails
[09:16:58] nya: has joined #RubyOnRails
[09:19:12] andywww: has joined #RubyOnRails
[09:19:58] andywww: has left #RubyOnRails: ()
[09:20:51] arup_r: has joined #RubyOnRails
[09:22:10] ishahnaz: has joined #RubyOnRails
[09:22:11] Veejay: has left #RubyOnRails: ("WeeChat 0.4.2")
[09:24:16] arup_r: I am back
[09:25:18] maz-dev: has joined #RubyOnRails
[09:25:27] bookies: has joined #RubyOnRails
[09:27:56] alex88: has joined #RubyOnRails
[09:28:05] bruno-: has joined #RubyOnRails
[09:29:25] arup_r: But the story is over it seems..
[09:29:51] arup_r: atmosx: In your country no body use Ruby/Rails .. ?
[09:30:41] bookies: I have a timeslots model which belongs_to learners. And the learners model has_many timeslots. Now, timeslots have a learner_id column in the db which is integer. However on that I can save one learner. Well on timeslots I want to assign more than one learners. I am confused. Any idea what is the approach to do that? thank you
[09:31:26] atmosx: arup_r: no there are many that use rails/ruby in my country :-)
[09:32:08] arup_r: Then you shouldn't have problems.. :)
[09:32:26] atmosx: arup_r: I don't have *problems* :-P
[09:32:44] stamina: has joined #RubyOnRails
[09:32:47] drale2k: has joined #RubyOnRails
[09:32:50] atmosx: bookies: gist your models
[09:32:53] arup_r: yes. You started getting calls for remote.. so I felt like that
[09:33:43] atmosx: arup_r: My schedule now is full. I work as a pharmacist, writing the final part of my thesis and working as a part time remote sys-admin :-)
[09:34:01] charliesome: has joined #RubyOnRails
[09:35:04] bookies: atmosx: sure
[09:37:34] bookies: atmpsx: https://gist.github.com/stefioan/67c351774ded90e49188 - this is it.
[09:39:02] srinidhi: has joined #RubyOnRails
[09:39:12] atmosx: bookies: in learner.rb you probably wanna that in belongs_to: group
[09:39:35] atmosx: bookies: each timeslot as 1 learner?
[09:39:40] atmosx: or many learners?
[09:39:58] bookies: atmosx: yes just noticed and corrected that. No. Each timeslot will have several learners.
[09:40:07] atmosx: has_many :learners
[09:40:15] atmosx: you leave the DB alone and rails will handle the rest.
[09:40:51] atmosx: can you paste the group model as well?
[09:41:02] atmosx: just edit the gist and add group.rb
[09:41:27] codenapp_: has joined #RubyOnRails
[09:41:29] bookies: ok. do I not add any kind of learner_id or timeslot_id to the schema? Will rails be able to do something like learners.timeslots with not doing that? Yes sure let me add group.rb as well
[09:42:21] bookies: atmosx : updated the gist file with group.rb as well
[09:42:22] atmosx: bookies: no, with rails you enver touch the schema. You only work through AR
[09:42:49] atmosx: don't edit the schema manually, it's dangerous. AR handles everything
[09:42:51] bookies: atmosx: oh I see. I thought I have to be doing the _id stuff
[09:43:01] Mazhug: has joined #RubyOnRails
[09:43:12] atmosx: bookies: no, that's a sequel pattern
[09:43:32] atmosx: sequel is an alternative ruby ORM (like AR)
[09:44:55] atmosx: bookies: okay just add has_many :learners to your Timeslot class and you should be fine.
[09:45:01] bookies: atmosx: I see. Thank you. I will try that.
[09:51:34] pawnbox: has joined #RubyOnRails
[09:52:25] ishahnaz: have an open question about filtering if someone would like to provide advice: I'd like to filter a resource by the time ago they were created
[09:52:40] ishahnaz: I was thinking in the lines of /bananas?filter[sort]=desc&filter[created][minutes_ago]=5
[09:53:30] arup_r: ishahnaz: Well.. So what is the confusion ?
[09:53:54] ishahnaz: I'm just not sure so wanted to have someone else advice
[09:54:26] bookies: atmosx: if possible please check the gist again, I made a small change to represent what I want. when I try this: "group.timeslots[0].learners" I get the error "#<ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: learners.timeslot_id: SELECT "learners".* FROM "learners" WHERE "learners"."timeslot_id" = ?>". Is this normal?
[09:54:33] chouhoulis: has joined #RubyOnRails
[09:55:15] bookies: it seems I am missing a column..
[09:56:07] rocLv: has joined #RubyOnRails
[09:56:58] ishahnaz: well i guess that's a yes thanks @arup_r
[09:58:37] arup_r: ishahnaz: :)
[09:59:20] arup_r: bookies: show your schema.rb file
[09:59:46] arup_r: I think you ddid not add the column timeslot_id to learners
[10:00:12] iateadonut: has joined #RubyOnRails
[10:00:19] DmitryBochkarev: has joined #RubyOnRails
[10:00:35] bookies: arup_r: sure
[10:01:00] arup_r: bookies: check in rails console if you have the column or not
[10:04:21] Cervajz: has joined #RubyOnRails
[10:05:53] futilegames: has joined #RubyOnRails
[10:12:57] suchness: has joined #RubyOnRails
[10:13:06] rocLv: has joined #RubyOnRails
[10:15:18] annlewis: has joined #RubyOnRails
[10:15:43] suchness: has left #RubyOnRails: ()
[10:15:45] suchness: has joined #RubyOnRails
[10:17:13] suchness: I have a request to make a certain group of pages accessible to a user without them having to log in, providing the click the link from their email. I was first thinking of using devise token authenticatable for it, but that has been deprecated as being insecure. Anyone have any thoughts on a better way to accomplish this?
[10:18:12] maz-dev: has joined #RubyOnRails
[10:18:28] universa1: suchness: you can implement a secure token authentication. or live with the limitations of the original approach
[10:18:55] universa1: which might be fine in your case.
[10:19:35] suchness: I am starting to think secure token authentication is the only way to go, and it's frusterating.
[10:20:26] rickmasta: has joined #RubyOnRails
[10:22:46] platzhirsch: has joined #RubyOnRails
[10:22:58] blackmesa: has joined #RubyOnRails
[10:23:35] platzhirsch: I am too stuipid for Machinist, how do I create an object where the nested object requires the id of the associated parent object? I am running into non-null constraint violation because it tries to save the nested object before the parent object (id doesn't exist yet)
[10:23:54] universa1: platzhirsch: !code
[10:23:54] helpa: platzhirsch: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
[10:24:06] rocLv: has joined #RubyOnRails
[10:24:26] workmad3: has joined #RubyOnRails
[10:27:24] srinidhi: has joined #RubyOnRails
[10:28:04] yfeldblum: has joined #RubyOnRails
[10:31:03] platzhirsch: Thanks, found it out, basically in a Machnist Blueprint you can reference the object itself using object
[10:31:34] platzhirsch: so what I needed was something along the lines of Post.blueprint do { comment { Comment.make post: object } }
[10:32:25] mostlybadfly: has joined #RubyOnRails
[10:33:05] chridal: Anyone have any experience with `rest-client` or `faraday` usage in Rails apps? I'm writing an API.
[10:33:24] aaronr: has joined #RubyOnRails
[10:34:47] waseem_: chridal: !anyone
[10:34:47] helpa: chridal: Nope. No one. Ever. In the history of the world.
[10:35:17] chridal: Well, I was hoping to get some input on one vs. the other or the likes
[10:40:36] kimegede: has joined #RubyOnRails
[10:41:03] rodfersou: has joined #RubyOnRails
[10:41:54] nettoweb: has joined #RubyOnRails
[10:42:19] sandstrom: has joined #RubyOnRails
[10:43:23] charliesome: has joined #RubyOnRails
[10:46:34] strcmp1: has joined #RubyOnRails
[10:51:43] xcesariox: has joined #RubyOnRails
[10:54:22] rocLv_: has joined #RubyOnRails
[10:55:17] chouhoulis: has joined #RubyOnRails
[10:56:08] nhhagen: has joined #RubyOnRails
[10:57:31] Contigi: has joined #RubyOnRails
[10:58:16] alol: has joined #RubyOnRails
[10:59:12] Avon: has joined #RubyOnRails
[11:01:07] m_abdelfattah: has joined #RubyOnRails
[11:02:30] pontiki: has joined #RubyOnRails
[11:03:23] Linuus: has joined #RubyOnRails
[11:03:50] JimmyNeutron: has joined #RubyOnRails
[11:04:45] johnflux: has joined #RubyOnRails
[11:05:19] charliesome: has joined #RubyOnRails
[11:07:03] dhjondoh: has joined #RubyOnRails
[11:07:08] jgt1: has joined #RubyOnRails
[11:07:41] suchness: universa1: I am just not a fan of tokens.
[11:08:17] suchness: chridal: By experience do you mean running into faraday errors?
[11:08:24] suchness: chridal: I have experience with that...
[11:08:34] chridal: suchness: How so?
[11:08:42] chridal: Is it buggy?
[11:08:59] suchness: chridal: No not at all, usually the service I was trying to connect to was not available is all.
[11:09:00] dionysus69: has joined #RubyOnRails
[11:09:11] suchness: chridal: And by usually I mean all the time.
[11:09:36] suchness: I only have experience of faraday through the elasticsearch gem
[11:09:44] chridal: I'm trygint to pick one over the other. Easy testing being a priority
[11:10:00] suchness: chridal: Ah, for that I couldn't help you, sorry.
[11:11:03] m_abdelfattah2: has left #RubyOnRails: ()
[11:12:01] FailBit: Faraday is native, no
[11:12:14] FailBit: and Net::HTTP is agnostic
[11:14:32] tvw: has joined #RubyOnRails
[11:16:08] annlewis: has joined #RubyOnRails
[11:21:19] chridal: FailBit: what do you mean about it being native?
[11:21:38] FailBit: it uses compiled extensions I think
[11:21:39] m_abdelfattah: has joined #RubyOnRails
[11:24:42] Ropeney: has joined #RubyOnRails
[11:24:54] ocx: has joined #RubyOnRails
[11:25:17] artmann: I'm trying to group a bunch(76k) events by date. It's data i will graph later on. But it takes about 5 seconds to run in its current form. Any tips on how I could improve it ? https://gist.github.com/Artmann/a5ee441e1f1aad06f95f
[11:25:52] sandstrom: has joined #RubyOnRails
[11:26:09] m_abdelfattah: Hey, is there anyway to use SQL function in ActiveRecord's update? something like that: Product.update(id, 'EXTRACT (DAY FROM (now()-created_at))')
[11:26:38] suchness: artmann: events.group_by(&:date) ?
[11:26:40] herbst: has joined #RubyOnRails
[11:26:43] greenarrow: has joined #RubyOnRails
[11:26:52] artmann: suchness: Is there such an awesome function?
[11:27:06] arup_r: m_abdelfattah: yes you are close :)
[11:27:08] suchness: artmann: yeah, do events.group_by(&:created-at)
[11:27:40] suchness: artmann: http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-group_by
[11:28:23] alip: has joined #RubyOnRails
[11:28:51] m_abdelfattah: @arpu_r, how close :) ?
[11:29:16] m_abdelfattah: arpu_r: I'm sorry, how close and how can I do it if you don't mind :) ?
[11:29:18] arup_r: Product. update_all("id = EXTRACT (DAY FROM (now()-created_at))")
[11:29:26] arup_r: http://apidock.com/rails/ActiveRecord/Relation/update_all
[11:29:33] arup_r: m_abdelfattah: :) ^^
[11:29:48] m_abdelfattah: arup_r, so I should use update_all instead of update? but update_all doesn't update updated_at :(
[11:30:26] suchness: m_abdelfattah: You can have it set the updated_at as well, doesn't have to be automatic, just manually do it at the same time.
[11:30:37] goliathusCZ: has joined #RubyOnRails
[11:30:49] arup_r: m_abdelfattah: do that manually?
[11:31:04] m_abdelfattah: suchness: aha, will do it manually then :) Thanks a lot
[11:31:09] arup_r: suchness: Yup.. you beat me to it ;)
[11:31:15] m_abdelfattah: arup_r: aha, will do it manually then :) Thanks a lot
[11:32:17] arup_r: suchness: why not SQL `groups`, but Ruby's group_by ?
[11:32:28] syath: has joined #RubyOnRails
[11:33:01] ocx: has joined #RubyOnRails
[11:33:02] suchness: arup_r: Only because I don't know if he is using a database backend or what, but if he is then yes that would greatly optimise it!
[11:33:13] suchness: artmann: ^^
[11:33:28] arup_r: I thought I again misread the question :)
[11:34:04] artmann: Im fetching the events from the database, so I should be able to group it their
[11:34:27] arup_r: yes.. then use SQL group by aka rails `groups`
[11:34:31] suchness: artmann: If that's the case then I would certainly go with arup_r's suggestion.
[11:34:42] artmann: okey, I'll give it a try
[11:34:45] FailBit: artmann: I use elasticsearch for my graphs
[11:34:53] chills42: has joined #RubyOnRails
[11:35:18] artmann: FailBit: yeah I should probably use a timeserier database for it, but that will have to be step 2
[11:35:26] artmann: damn I can't spell today
[11:35:32] arup_r: FailBit: One day I would also like to try that Elastic search.. I saw people to talk about it.. but I never got the chance! :/
[11:35:59] FailBit: it makes a histogram of 4m documents in 80ms
[11:36:12] FailBit: over any indexed field
[11:36:16] FailBit: like a boss
[11:36:22] arup_r: FailBit: in memory ?
[11:36:25] suchness: arup_r: I use it for doing incredibly complicated searches across millions of datasets, I never wait more than a second to get results. It is a fantastic piece of software.
[11:37:00] suchness: arup_r: In fact, the project I have been working on for the last four years would never be where it is today without it.
[11:37:07] FailBit: I don't consider elasticsearch a database
[11:37:10] artmann: How well does ES handle metric data? I thought text was their primary concern
[11:37:36] arup_r: suchness: cool mate!
[11:37:38] FailBit: artmann: text is the primary concern, but ES has e.g. int and date support
[11:37:44] chills42: has joined #RubyOnRails
[11:37:56] FailBit: which are not_analyzed and can be histogrammed
[11:38:24] FailBit: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-datehistogram-aggregation.html
[11:39:00] FailBit: also, just another reason why ES should not be a primary database https://github.com/elastic/elasticsearch/issues/12055
[11:40:32] charliesome: has joined #RubyOnRails
[11:40:57] JoshuaPaling: has joined #RubyOnRails
[11:41:31] ishahnaz: has joined #RubyOnRails
[11:43:09] dminca: has joined #RubyOnRails
[11:43:20] ldnunes: has joined #RubyOnRails
[11:44:21] JoshuaPaling: In a rack middleware, should it be possible to set a cookie BEFORE doing @app.call(env) - ie, passing on the cookie before the request is processed, rather than setting it after the request is processed?
[11:45:38] sheeny: has joined #RubyOnRails
[11:46:38] sandstrom: has joined #RubyOnRails
[11:46:52] sheeny: Hi all, I am having a problem with assets with rails 4.2.4, whenever I deploy, my assets dont get updated, I can see the changes on the files in the server but if i check the compiled css it hasnt been updated. Is there any known issues?
[11:47:26] dminca: Could you please help me with some suggestions: I want to migrate a Rails app from v2.3.18 to Rails 4.2.4 (latest). What gems or any tools could you recommend me that could help my transition ?
[11:47:42] pontiki: has joined #RubyOnRails
[11:48:23] guidohcosta: has joined #RubyOnRails
[11:48:49] pawnbox: has joined #RubyOnRails
[11:48:55] mrchris: has joined #RubyOnRails
[11:50:32] platosha: has joined #RubyOnRails
[11:51:00] Tempesta: has joined #RubyOnRails
[11:54:03] moeabdol: has joined #RubyOnRails
[11:54:34] Kallis: has joined #RubyOnRails
[11:57:19] ishahnaz: has joined #RubyOnRails
[11:58:20] frzn: has joined #RubyOnRails
[11:58:20] frzn: has joined #RubyOnRails
[11:59:06] arup_r: sheeny: probably not doing rake assets precompile ?
[11:59:32] emilkarl: has joined #RubyOnRails
[12:00:00] emilkarl: will config.action_mailer.default_options = {from: 'no-reply@example.com'} override a default from: ???foo@bar.com??? inside the mailer or should the mailers be used?
[12:00:30] sheeny: I tried going on to the server and doing that but it didnt make any difference
[12:00:58] nfk: has joined #RubyOnRails
[12:02:46] arup_r: sheeny: well restarted the server ?
[12:02:58] sheeny: hmm i could try that
[12:03:07] arup_r: In production server restart is needed to reflect the changes
[12:03:42] arup_r: emilkarl: I think what you said is the reverse of the actual fact
[12:06:10] emilkarl: ok so a mailers default from will override the config.
[12:06:32] arup_r: Yes. I think.. try it .. :)
[12:06:35] emilkarl: so why did someone place a default from inside the mailer which just seems stupid when ;)
[12:06:49] arup_r: emilkarl: no it is not stupid
[12:06:59] emilkarl: well if you set it to from@example.com
[12:07:18] emilkarl: it seems kind of because you cannot override with config?
[12:07:27] arup_r: If you have 10 mailers and the default is same.. then config is the perfect place to mention it without mentioning everytime
[12:07:51] arup_r: s/without/instead of
[12:07:56] exadeci: has joined #RubyOnRails
[12:08:02] emilkarl: of course???I mean the person putting into one of the mailers in this app i work on???not in general. I get the idea
[12:08:56] habitullence: has joined #RubyOnRails
[12:10:13] victortyau: has joined #RubyOnRails
[12:10:39] habitullence: I'm trying to write a plugin using TDD but I'm struggling to get started with RSpec, it looks a lot easier with built-in testing, i.e., testing generators relies on yet more gems. Anyone got any input on this?
[12:11:48] bbrowning: has joined #RubyOnRails
[12:12:00] bruno-: has joined #RubyOnRails
[12:12:53] sadaf2605: has joined #RubyOnRails
[12:13:33] sadaf2605: has left #RubyOnRails: ()
[12:14:03] habitullence: Anyone written plugin testing with RSpec?
[12:14:30] sadaf2605: has joined #RubyOnRails
[12:15:46] sadaf2605: has left #RubyOnRails: ()
[12:16:23] rocLv: has joined #RubyOnRails
[12:16:52] annlewis: has joined #RubyOnRails
[12:17:49] voltalio: has joined #RubyOnRails
[12:18:53] sandstrom: has joined #RubyOnRails
[12:19:16] rocLv: has joined #RubyOnRails
[12:20:59] rocLv_: has joined #RubyOnRails
[12:22:28] cameronmalek: has joined #RubyOnRails
[12:22:38] habitullence: Solution is to ditch RSpec I guess..
[12:22:49] voker57: has joined #RubyOnRails
[12:23:07] goodcodeguy: has joined #RubyOnRails
[12:23:10] sadaf2605: has joined #RubyOnRails
[12:23:46] sadaf2605: testing irc
[12:24:12] fschuindt: has joined #RubyOnRails
[12:24:52] rocLv_: has joined #RubyOnRails
[12:25:17] towski_: has joined #RubyOnRails
[12:25:57] Cervajz_: has joined #RubyOnRails
[12:27:38] krisquigley: has joined #RubyOnRails
[12:27:56] blackmesa: has joined #RubyOnRails
[12:29:25] maz-dev: has joined #RubyOnRails
[12:30:08] meatherly: has joined #RubyOnRails
[12:35:08] mrchris: has joined #RubyOnRails
[12:36:18] mary5030: has joined #RubyOnRails
[12:42:59] sadaf2605: has joined #RubyOnRails
[12:43:30] sivinjski: has joined #RubyOnRails
[12:44:20] srinidhi: has joined #RubyOnRails
[12:44:34] errakeshpd: has joined #RubyOnRails
[12:46:01] manzo: has joined #RubyOnRails
[12:46:05] infoget: has joined #RubyOnRails
[12:46:12] michael_mbp: has joined #RubyOnRails
[12:50:03] chouhoulis: has joined #RubyOnRails
[12:50:07] manzo: Hi, I'm trying to implement some single sign-on features and came across CASino, is it the right way to go for this or there is something simpler?
[12:50:39] Pumukel: has joined #RubyOnRails
[12:51:27] hefest_: has left #RubyOnRails: ()
[12:51:35] infoget: Hi guys, I need help... I have article, taggin and tag models. Tagging model is connecting article and tag to many-to-many association. I would like to select article with tag_id = 1 and tag_id 2 from taggings model, but when I do : Article.all.joins(:taggings).where(:taggings => { tag_id: 1 }).where(:taggings => { tag_id: 2 })
[12:51:36] infoget: it doesn't work, how can I achieve "anding" correct way?
[12:52:57] blackmesa: has joined #RubyOnRails
[12:53:33] diegomartinez: has joined #RubyOnRails
[12:53:33] neilf: has joined #RubyOnRails
[12:55:33] mary5030: has joined #RubyOnRails
[12:55:38] pwnd_nsfw: infoget, in what way does it not work?
[12:55:46] pwnd_nsfw: errors, anything? Or just doesn't do anything
[12:56:47] fschuindt: Folks, how to check if @user belongs to scope :dead?
[12:56:56] defsdoor: has joined #RubyOnRails
[12:57:39] pwnd_nsfw: Scient, User.dead.exists(@user) ?
[12:57:52] infoget: pwnd_nsfw: it's working, but it didn't find any article with both tags (with id 1 and id 2)
[12:58:15] pwnd_nsfw: infoget, you're trailing two where's
[12:58:24] Ergo: has joined #RubyOnRails
[12:58:51] pwnd_nsfw: putting both ids in one where
[12:59:26] sdwrage: has joined #RubyOnRails
[12:59:39] bruno-: has joined #RubyOnRails
[13:00:18] infoget: pwnd_nsfw: I think, it will be same sql query with: WHERE tag_id = 1 AND tag_id = 2
[13:00:29] ramortegui: has joined #RubyOnRails
[13:00:30] pwnd_nsfw: print it out to see
[13:00:46] voltalio: has joined #RubyOnRails
[13:00:47] fschuindt: pwnd_nsfw: I saw tis approach, I tought it's was bad cause it seems to query the entire table, but I tested in the console and it works in the right way, thank you
[13:01:05] infoget: SELECT `articles`.* FROM `articles` INNER JOIN `taggings` ON `taggings`.`taggable_id` = `articles`.`id` AND `taggings`.`taggable_type` = 'Article' WHERE `taggings`.`tag_id` = 1 AND `taggings`.`tag_id` = 2
[13:01:40] dminca: What is the proper way to update a Ruby on Rails application from one version to a superior Major Release ?
[13:01:40] hardtail: has joined #RubyOnRails
[13:02:05] srinidhi: has joined #RubyOnRails
[13:02:05] rocLv: has joined #RubyOnRails
[13:02:25] pwnd_nsfw: infoget, shouldn't it be OR
[13:02:27] FailBit: dminca: set the new rails version in the gemfile, then bundle
[13:02:55] infoget: pwnd_nsfw: but I would like to find article with those provides tags (both)
[13:02:57] FailBit: then run all your tests to make sure nothing broke
[13:03:07] pwnd_nsfw: yeah, it OR will return both
[13:03:07] FailBit: infoget: uh
[13:03:30] FailBit: is taggings an array?
[13:03:38] pwnd_nsfw: it's a join table, iirc
[13:03:39] dminca: FailBit: thank you! :)
[13:04:05] pwnd_nsfw: I think you should be able to do where(tag_id: [1, 2])
[13:04:17] FailBit: pwnd_nsfw: yeah but that blows up
[13:04:41] infoget: pwnd_nsfw: its OR logic
[13:04:57] FailBit: infoget: OR can be expressed as IN
[13:05:21] FailBit: when querying on the same field it can be advantageous to use IN
[13:06:05] pwnd_nsfw: How does it blow up? (legitimate question, honestly ignorant to most sql)
[13:06:25] infoget: when I do: tag_id: [1,2]
[13:06:36] infoget: it's generate: WHERE `taggings`.`tag_id` IN (1, 2)
[13:06:48] pwnd_nsfw: Does that not work?
[13:06:56] FailBit: pwnd_nsfw: at least for me, postgres does not like it
[13:07:08] FailBit: it compiles fine, but explodes when I try to use it
[13:07:09] pwnd_nsfw: Good to know, I've taken a preference to postgres
[13:07:11] cameronmalek: has joined #RubyOnRails
[13:07:23] infoget: and it find articles with tag1 or tag2, but I would like to find only article which has both tags
[13:07:43] FailBit: then again I'm not using a join table, so I need a very specific query on my array field
[13:08:19] pwnd_nsfw: infoget, well that clarifies things lol
[13:08:49] FailBit: infoget: you might want to consider using a search engine. :p but what db are you using
[13:09:05] infoget: FailBit: MySQL
[13:09:43] infoget: FailBit: really doesn't exist any solution for that? :O
[13:10:43] FailBit: WHERE taggings.tag_id IN (1) AND taggings.tag_id IN (2)
[13:11:01] FailBit: ACTION is not good at sql
[13:12:35] infoget: FailBit: doesn't work
[13:12:38] infoget: SELECT `articles`.* FROM `articles` INNER JOIN `taggings` ON `taggings`.`taggable_id` = `articles`.`id` AND `taggings`.`taggable_type` = 'Article' WHERE (taggings.tag_id IN (1) AND taggings.tag_id IN (2))
[13:12:40] atomical: has joined #RubyOnRails
[13:13:10] pwnd_nsfw: Do the quotes matter?
[13:13:31] sankaber: has joined #RubyOnRails
[13:14:20] urbanmonk: has joined #RubyOnRails
[13:14:21] infoget: but this works: SELECT `articles`.* FROM `articles` INNER JOIN `taggings` ON `taggings`.`taggable_id` = `articles`.`id` AND `taggings`.`taggable_type` = 'Article' WHERE (taggings.tag_id IN (1))
[13:15:00] cameronmalek: has left #RubyOnRails: ()
[13:15:03] pawnbox: has joined #RubyOnRails
[13:15:53] willywos: has joined #RubyOnRails
[13:15:55] pwnd_nsfw: Wait... why
[13:16:09] Jardayn: has joined #RubyOnRails
[13:16:45] elv: has joined #RubyOnRails
[13:16:59] pwnd_nsfw: I don't think we're looking at this right
[13:17:39] annlewis: has joined #RubyOnRails
[13:17:57] pwnd_nsfw: I feel like where checks per record, so setting tag_id to 2 things isn't valid
[13:19:58] krz: has joined #RubyOnRails
[13:20:58] qejk: has joined #RubyOnRails
[13:22:12] infoget: pwnd_nsfw, FailBit here is the method which is looking for multiple tags, that's what I want, but I don't understand it well how it works... https://github.com/mbleigh/acts-as-taggable-on/blob/master/lib/acts_as_taggable_on/taggable/core.rb#L87
[13:22:38] poli: has joined #RubyOnRails
[13:23:11] pwnd_nsfw: You can't use that method as is?
[13:24:19] infoget: pwnd_nsfw: this gem is too complex for my case
[13:24:21] bmurt: has joined #RubyOnRails
[13:25:01] rocLv: has joined #RubyOnRails
[13:25:34] greengriminal: has joined #RubyOnRails
[13:26:10] JoshL: has joined #RubyOnRails
[13:26:28] rocLv_: has joined #RubyOnRails
[13:26:57] nettoweb: has joined #RubyOnRails
[13:29:26] pwnd_nsfw: infoget, http://stackoverflow.com/questions/7179260/sql-how-to-select-a-single-id-row-that-meets-multiple-criteria-from-a-singl
[13:30:55] Xiti: has joined #RubyOnRails
[13:31:42] maz-dev: has joined #RubyOnRails
[13:32:19] mrchris: has joined #RubyOnRails
[13:34:12] ckinniburgh: has joined #RubyOnRails
[13:34:20] n1lo: has joined #RubyOnRails
[13:35:09] isjaylee1: has joined #RubyOnRails
[13:36:42] chouhoulis: has joined #RubyOnRails
[13:38:19] bodie_: has joined #RubyOnRails
[13:41:26] bratsche: has joined #RubyOnRails
[13:41:39] sevenseacat: has joined #RubyOnRails
[13:43:28] smathy: has joined #RubyOnRails
[13:43:31] Lightsword: has joined #RubyOnRails
[13:45:49] pawnbox_: has joined #RubyOnRails
[13:45:53] Swappticon: has joined #RubyOnRails
[13:46:20] isjaylee1: has left #RubyOnRails: ()
[13:46:36] smathy: has joined #RubyOnRails
[13:51:41] Swappticon: has joined #RubyOnRails
[13:52:07] darrencauthon: has joined #RubyOnRails
[13:53:40] voltalio: has joined #RubyOnRails
[13:54:38] umgrosscol: has joined #RubyOnRails
[13:54:47] jgt1: has joined #RubyOnRails
[13:55:03] centrx: has joined #RubyOnRails
[13:56:06] ishahnaz: hello there ! question: how'd you parse a sort param like "-updated_at" so you could do like scope.sort(updated_at: :desc) or scoped.sort(updated_at: -1)? Something built-in I'm missing? Thanks !
[13:56:30] devdazed: has joined #RubyOnRails
[13:57:02] chills42: has joined #RubyOnRails
[13:57:34] gerep: has joined #RubyOnRails
[13:57:37] MaDErroR123: has joined #RubyOnRails
[13:59:05] s2013: has joined #RubyOnRails
[13:59:54] gerep: Hello good people. Can someone help me find what I'm doing wrong in this query? https://gist.github.com/gerep/12f5513d0313d303af5f It is not returning an expected result based on a where condition
[14:00:18] rocLv: has joined #RubyOnRails
[14:00:56] gerep: I can see I have the record where the column 'from' is 1 and I'm searching for anything where("range_costs.from > ?", 8) but I get an empty AssociationRelation
[14:01:29] sevenseacat: gerep: because there are no results
[14:02:37] gerep: Oh my god!!! Really sorry for this stupid question
[14:03:00] gerep: I'm searching for a value between 'from' and 'to' and made a terrible mess hahaha
[14:03:27] infoget: pwnd_nsfw: man, thank you very much, it's working :)
[14:04:32] HalcyonicStorm: has joined #RubyOnRails
[14:07:35] elv: has joined #RubyOnRails
[14:07:54] infoget: has joined #RubyOnRails
[14:09:23] TDJACR: has joined #RubyOnRails
[14:12:14] Creeves: has joined #RubyOnRails
[14:13:07] chills42: has joined #RubyOnRails
[14:13:59] pawnbox: has joined #RubyOnRails
[14:14:09] The_Phoenix: has joined #RubyOnRails
[14:15:08] rickmasta: has joined #RubyOnRails
[14:15:50] based_pdev: has joined #RubyOnRails
[14:16:40] sadaf2605: has joined #RubyOnRails
[14:17:15] allcentury: has joined #RubyOnRails
[14:17:20] dionysus69: has joined #RubyOnRails
[14:18:43] annlewis: has joined #RubyOnRails
[14:19:06] dionysus69: has joined #RubyOnRails
[14:19:13] pawnbox: has joined #RubyOnRails
[14:19:17] leonardoajim_: has joined #RubyOnRails
[14:21:54] Lightsword: has joined #RubyOnRails
[14:21:58] dopamean_: has joined #RubyOnRails
[14:23:19] leex: Hi, I would like to document my rest api for the rest of the team. do you have some suggestions for gems: apipie, apitome, ...? and a hint on why I would like to use/not use them
[14:23:39] givanse: has joined #RubyOnRails
[14:23:46] dionysus69: has joined #RubyOnRails
[14:24:18] bejar37: has joined #RubyOnRails
[14:25:21] adavia: has joined #RubyOnRails
[14:27:26] cameronmalek: has joined #RubyOnRails
[14:30:08] eosinx: has joined #RubyOnRails
[14:31:37] diegomartinez: has left #RubyOnRails: ()
[14:31:47] mdel: has joined #RubyOnRails
[14:32:50] arup_r: has joined #RubyOnRails
[14:32:58] maz-dev: has joined #RubyOnRails
[14:33:08] momomomomo: has joined #RubyOnRails
[14:35:01] idd2d: has joined #RubyOnRails
[14:36:30] SteenJobs: has joined #RubyOnRails
[14:38:48] bruno-: has joined #RubyOnRails
[14:39:36] paulcsmith: has joined #RubyOnRails
[14:40:19] jimbeaudoin: has joined #RubyOnRails
[14:40:52] lesce: has joined #RubyOnRails
[14:42:03] Axilla: has joined #RubyOnRails
[14:42:20] arBmind: has joined #RubyOnRails
[14:43:01] lesce: hey guys , I'm having trouble getting asset-url to generate a correct url ( it's ignoring config.assets.prefix option ) anyone else encounter this ?
[14:43:13] podman: has joined #RubyOnRails
[14:44:29] emilkarl: has joined #RubyOnRails
[14:44:31] lesce: I'm trying to override the asset_url method like this https://gist.github.com/lesce/ddc50344760216c11aad, but it doesn't work
[14:45:20] habitullence: has joined #RubyOnRails
[14:48:06] sevenseacat: i would not override asset_url like that
[14:48:10] sevenseacat: why are you trying to do that?
[14:48:11] habitullence: Anyone got experience with testing plugins with RSpec, specifically generators?
[14:49:28] aldodelgado: has joined #RubyOnRails
[14:49:39] idd2d: has joined #RubyOnRails
[14:51:07] Swappticon: has joined #RubyOnRails
[14:52:10] havenwood: has joined #RubyOnRails
[14:52:34] codeurge: has joined #RubyOnRails
[14:53:39] goliathusCZ: has joined #RubyOnRails
[14:55:38] vdmo: has joined #RubyOnRails
[14:55:56] chouhoulis: has joined #RubyOnRails
[14:56:14] zeknox: has joined #RubyOnRails
[14:56:14] redondo: has joined #RubyOnRails
[14:56:56] chouhoulis: has joined #RubyOnRails
[14:57:01] Jardayn: has joined #RubyOnRails
[14:57:37] rodferso1: has joined #RubyOnRails
[14:58:36] JoshL: has joined #RubyOnRails
[14:59:51] ckinniburgh_: has joined #RubyOnRails
[14:59:58] beneggett: has joined #RubyOnRails
[15:00:03] mary5030: has joined #RubyOnRails
[15:00:27] redondo: Hi all. A question about concerns and hope it makes sense: If I include a concern in my model/controller which has the method MyConcern::mymethod! and the model/controller has already a method called "mymethod!", which of the two remains: the concern's method or the model/controller' method?
[15:01:14] mary5030: has joined #RubyOnRails
[15:03:28] centrx: redondo, The one defined in the controller overrides the one defined in the module/concern
[15:04:47] krisquigley: has joined #RubyOnRails
[15:05:23] redondo: centrx: thanks!
[15:06:10] sandstrom: has joined #RubyOnRails
[15:08:29] [Butch]: has joined #RubyOnRails
[15:08:38] Jasaka: has joined #RubyOnRails
[15:10:08] mrchris: has joined #RubyOnRails
[15:10:26] chouhoul_: has joined #RubyOnRails
[15:10:35] okdas: has joined #RubyOnRails
[15:10:35] okdas: has joined #RubyOnRails
[15:11:09] rocLv: has joined #RubyOnRails
[15:12:14] thezanke: has joined #RubyOnRails
[15:13:45] idd2d: has joined #RubyOnRails
[15:13:53] SteenJobs: has joined #RubyOnRails
[15:14:10] rromanch_: has joined #RubyOnRails
[15:15:29] s2013: has joined #RubyOnRails
[15:17:01] ngscheurich: has joined #RubyOnRails
[15:19:21] annlewis: has joined #RubyOnRails
[15:19:22] hahuang65: has joined #RubyOnRails
[15:19:30] lesce: sevenseacat : it's not setting the asset.prefix , I was thinking I could override it and set the correct path
[15:23:13] sadaf2606: has joined #RubyOnRails
[15:24:40] beauby: has joined #RubyOnRails
[15:25:24] frzn: has joined #RubyOnRails
[15:25:24] frzn: has joined #RubyOnRails
[15:25:46] thezanke: has left #RubyOnRails: ("Leaving")
[15:26:48] habitullence: has joined #RubyOnRails
[15:26:58] maz-dev: has joined #RubyOnRails
[15:27:07] disgrntld: has joined #RubyOnRails
[15:27:21] catcher: has joined #RubyOnRails
[15:27:41] annlewis: has joined #RubyOnRails
[15:29:09] annlewis_: has joined #RubyOnRails
[15:29:16] catcher: what's the best way to post a file without multipart content-type?
[15:29:23] Cache_Money: has joined #RubyOnRails
[15:30:04] andatche: has joined #RubyOnRails
[15:30:06] dionysus69: has joined #RubyOnRails
[15:33:56] rocLv: has joined #RubyOnRails
[15:34:32] idd2d: has joined #RubyOnRails
[15:34:59] sonofdirt: has joined #RubyOnRails
[15:36:32] arup_r: catcher: Why don't you want to set the multipart as true ?
[15:36:51] catcher: arup_r: I'm using an API endpoint that requires explicit content-type
[15:37:51] ecnalyr: has joined #RubyOnRails
[15:37:54] lxsameer: has joined #RubyOnRails
[15:37:54] lxsameer: has joined #RubyOnRails
[15:41:33] chouhoulis: has joined #RubyOnRails
[15:43:58] platzhirsch: has left #RubyOnRails: ()
[15:47:57] Lightsword: has joined #RubyOnRails
[15:48:00] greenarrow: has joined #RubyOnRails
[15:51:58] moeabdol: has joined #RubyOnRails
[15:52:39] sadaf2605: has joined #RubyOnRails
[15:52:43] safetypin: has joined #RubyOnRails
[15:53:00] drptbl: has joined #RubyOnRails
[15:53:08] safetypin: has joined #RubyOnRails
[15:54:54] petricore: has joined #RubyOnRails
[15:56:51] chipotle: has joined #RubyOnRails
[15:57:13] drPoggs: has joined #RubyOnRails
[15:57:15] Scriptonaut: has joined #RubyOnRails
[15:57:37] DEA7TH: has joined #RubyOnRails
[15:58:14] sadaf2605: has joined #RubyOnRails
[15:58:48] Swappticon: has joined #RubyOnRails
[15:59:59] jtthedev: has joined #RubyOnRails
[16:01:04] riotjones: has joined #RubyOnRails
[16:01:38] TomyLobo: has joined #RubyOnRails
[16:03:17] DmitryM: has joined #RubyOnRails
[16:04:48] DmitryM: hey everyone, any pointers for testing RESTful APIs? I'm slightly overwhelmed by choice and would appreciate a nod towards a starting point
[16:04:52] Originerd: has joined #RubyOnRails
[16:05:02] Iszak_: has joined #RubyOnRails
[16:06:10] Lightsword: has joined #RubyOnRails
[16:06:10] Originerd: has left #RubyOnRails: ()
[16:06:20] leonardoajim__: has joined #RubyOnRails
[16:06:28] Xiti: has joined #RubyOnRails
[16:06:56] tubbo: DmitryM: you mean testing your own API or testing against an existing one?
[16:08:31] michaeldeol: has joined #RubyOnRails
[16:08:57] livcd: has joined #RubyOnRails
[16:09:30] bricker: has joined #RubyOnRails
[16:09:47] sadaf2605: has joined #RubyOnRails
[16:10:14] beauby: has joined #RubyOnRails
[16:10:17] DEA7TH: has joined #RubyOnRails
[16:11:13] arup_r: Any body show me how to use fields_for while using HABTM between User and Group
[16:11:29] arup_r: I never used it.. so not able to figure it out.. small hints
[16:11:42] voltalio: has joined #RubyOnRails
[16:13:38] arup_r: I have " up 20150914153429 ********** NO FILE **********" in my migration file. Due to this not able to rollback. How to resolve this issue ?
[16:13:44] romdi`: has joined #RubyOnRails
[16:13:47] arup_r: https://gist.github.com/aruprakshit/673c980d6c80d6801603
[16:14:07] otacon-: has joined #RubyOnRails
[16:15:19] tubbo: arup_r: ahh, that depends. i like using the nested_form gem to get past a lot of the stuff i typically want out of nested fields_for's in my form
[16:15:28] tubbo: arup_r: are you looking to allow new groups to be created via this form?
[16:15:48] arup_r: tubbo: yes.
[16:15:48] arup_r: sorry now
[16:15:58] tubbo: that's a bit harder
[16:16:13] sadaf2605: has joined #RubyOnRails
[16:16:37] Lightsword: has joined #RubyOnRails
[16:16:54] arup_r: tubbo: I will create new user and that time I would like to add groups to the use.. and that is why I want at the same time to add entries to the HABTM table
[16:17:10] arup_r: assign to groups***
[16:17:29] tubbo: arup_r: assign groups, and create them if they don't already exist right?
[16:18:52] pawnbox: has joined #RubyOnRails
[16:19:44] leonardoajim__: has joined #RubyOnRails
[16:20:33] rezzack: has joined #RubyOnRails
[16:22:00] sadaf2605: has joined #RubyOnRails
[16:22:32] goliathusCZ: has joined #RubyOnRails
[16:24:21] redondo: has joined #RubyOnRails
[16:24:52] wldcordeiro_: has joined #RubyOnRails
[16:24:52] hnanon: has joined #RubyOnRails
[16:26:29] DmitryM: tubbo: testing my own API
[16:26:39] arup_r: has joined #RubyOnRails
[16:26:46] sam_weerasinghe: has joined #RubyOnRails
[16:27:02] DmitryM: i suppose i'm mostly interested in integration testing
[16:27:30] tubbo: yeah, i mean you could do a "real" integration test and parse the json-formatted responses into ruby hashes, then test on that data
[16:27:30] arup_r: I got disconnected
[16:27:46] arup_r: tubbo: Groups already I have. I just want assign them from a dropdown while creating a User. That's why I am looking for a way how should I add entried to the HABTM table
[16:27:49] Maletor: has joined #RubyOnRails
[16:28:14] tubbo: DmitryM: i guess the first thing is figure out what exactly you want to be testing...and whether you need to spin the whole http server up to test it
[16:28:32] ojdates: has joined #RubyOnRails
[16:28:53] tubbo: mostly i feel like you can get the job done with controller tests, but you might need some feature tests just to verify that the json format is correct. but if you're using active_model_serializers or something you really only need 1 of those, right? because AMS will standardize all of the responses of your API.
[16:29:15] DmitryM: we're not, unfortunately
[16:29:33] tubbo: arup_r: oh, well i think there's a collection_select method on the form builder. did you try that?
[16:29:37] sadaf2605: has joined #RubyOnRails
[16:29:56] arup_r: tubbo: Yes.. I added it with multiple: true
[16:30:25] arup_r: let me show you the form
[16:30:36] tubbo: arup_r: so what's the issue you're having then?
[16:30:49] DmitryM: i want to test the business logic.. the goal is to have a CI server spin up a production instance and test that
[16:30:59] towski_: has joined #RubyOnRails
[16:31:28] arup_r: tubbo: I am looking for if I can add create records using accept_nested_attribute method directly instead of doing manually
[16:31:52] tubbo: arup_r: yeah, i think you can do that...
[16:31:53] greenarrow: has joined #RubyOnRails
[16:32:12] diegoviola: has joined #RubyOnRails
[16:32:23] arup_r: But how ? any small code example if you have
[16:32:27] paulcsmith: has joined #RubyOnRails
[16:32:59] tubbo: arup_r: the same way you'd normally use fields_for, as long as you have accepts_nested_attributes_for in your model i think you can add them just like you were adding a regular has_many
[16:33:22] arup_r: ok.. Let me try
[16:33:37] tubbo: arup_r: oh but if you're using the select tags you might not want to use multiple: true, you might need to have an additional field for each new record
[16:34:01] arup_r: confused I am ..
[16:34:10] hnanon: I need some help modeling my data.
[16:34:25] hnanon: I have users, essays, and reviews.
[16:34:39] hnanon: Users write essays and reviews.
[16:34:56] hnanon: Users also have their essays reviewed.
[16:35:02] rromanch_: has joined #RubyOnRails
[16:35:27] hnanon: I want to show the reviews written by a user, and all reviews for a user's essay on the user show page.
[16:35:37] hnanon: What's the best way of modeling that?
[16:36:23] hnanon: User has many essays, Essay belongs to User, Essay has many reviews, Reviews belong to essay.
[16:36:30] dima__: has joined #RubyOnRails
[16:36:42] dmz: there are some great examples on railscasts for something similar
[16:37:11] dmz: http://railscasts.com/episodes/230-inherited-resources?view=asciicast
[16:37:40] tubbo: arup_r: have you seen the nested forms guide? http://guides.rubyonrails.org/form_helpers.html#nested-forms
[16:37:42] dmz: google is your friend :)
[16:37:47] gerep: I'm trying to ignore relations that are empty like this app.billing_apps.reject {|a| a.blank?} but it returns an empty array [] How can I return nothing if the relation is empty?
[16:37:55] gerep: This is in my view
[16:38:03] tubbo: arup_r: it describes what you should do here, just treat the HABTM resource as a has_many...does that work?
[16:38:12] hnanon: dmz: But they're not necessarily nested.
[16:38:46] arup_r: let me try tubbo . I was looking at http://stackoverflow.com/a/12961298/2767755 ..But he didn't use fields_for
[16:38:58] dmz: why not?
[16:40:00] tubbo: arup_r: you probably shouldn't use HABTM on a new app though, it's much easier to use a has_many :through so you can customize the "join model" instead of just having an arbitrary extra "join table" lying around.
[16:40:14] habitullence: Afternoon all, anyone done anything with plugin/engine testing with RSpec?
[16:40:23] arup_r: tubbo: someone killed it earlier though :/
[16:40:40] tubbo: dmz: inherited_resources is kinda deprecated i think
[16:40:45] tubbo: arup_r: huh?
[16:40:49] tubbo: habitullence: !ask
[16:40:49] helpa: habitullence: How to ask good questions and get great answers: http://www.mikeash.com/getting_answers.html
[16:40:58] tubbo: habitullence: !used sorry wrong thing
[16:40:58] helpa: habitullence: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
[16:41:29] laszlo_1: has joined #RubyOnRails
[16:42:07] habitullence: OK so I created a plugin and I'm using RSpec but when I run specs I get uninitialized constant error
[16:42:27] habitullence: I'm guessing there's a problem with my spec_helper file
[16:42:30] pwnd_nsfw: has joined #RubyOnRails
[16:42:38] habitullence: I'm new to testing :P
[16:42:42] gerep: habitullence, gist your code
[16:42:42] tubbo: habitullence: can you gist the error and your spec_helper?
[16:43:48] Lytol: has joined #RubyOnRails
[16:44:01] The_Phoenix: has joined #RubyOnRails
[16:44:34] nfk: has joined #RubyOnRails
[16:45:00] Mazhug: has left #RubyOnRails: ()
[16:45:00] marr: has joined #RubyOnRails
[16:46:46] habitullence: sure https://gist.github.com/habitullence/657955af69485ddf7ba8
[16:46:49] dionysus69: has joined #RubyOnRails
[16:47:04] habitullence: It's the standard one from rspec --init
[16:47:07] gerep: habitullence, and the error?
[16:47:17] gerep: habitullence, also your test file
[16:47:25] naftilos76: has joined #RubyOnRails
[16:48:39] herbst: has joined #RubyOnRails
[16:48:47] herbst: has joined #RubyOnRails
[16:48:50] arup_r: I have " up 20150914153429 ********** NO FILE **********" in my migration file. Due to this not able to rollback. How to resolve this issue ?https://gist.github.com/aruprakshit/673c980d6c80d6801603
[16:49:15] wldcordeiro: has joined #RubyOnRails
[16:49:19] habitullence: added the error...
[16:49:25] tubbo: habitullence: hmm, did you use the `rails plugin` generator to make this?
[16:49:58] habitullence: I'm trying to use with rspec though
[16:50:15] tubbo: habitullence: do you have a test/ folder? i think there's some stuff in there you need to add to spec_helper to get it to load all your code
[16:50:20] tubbo: as well as the rails app
[16:50:27] gerep: don't you have to include the file you are trying to test? like: include MyLib
[16:50:43] tubbo: gerep: that's not how you include files, that's how you mix in module code
[16:50:59] habitullence: tubbo: nope just a spec folder, I created with -T
[16:51:17] habitullence: The app I put in spec/dummy
[16:51:18] hahuang65: has joined #RubyOnRails
[16:51:31] tubbo: habitullence: ok cool, so yeah you do have spec/dummy. do you also have a rails_helper file in your spec/ folder?
[16:51:52] gerep: tubbo, got it ;)
[16:51:53] habitullence: Nope no rails_helper
[16:52:13] tubbo: habitullence: that's interesting. i wonder if you overrode your spec_helper by doing rspec --init
[16:52:54] habitullence: Maybe I'll recreate from scratch... Is ok to do with -T though?
[16:53:26] tubbo: habitullence: you should at least have require "#{File.dirname(__FILE__)}/dummy/config/environment"
[16:53:32] tubbo: in your spec_helper
[16:53:37] tubbo: that loads rails and stuff from your dummy app
[16:54:23] habitullence: tubbo: In my noobishness I don't get why I need to load any rails stuff on the gem side of things :S
[16:55:11] tubbo: habitullence: well you don't really need to for *everything*, but for your generators you do. sometimes people make two different spec_helper files, one that does base rspec config and loads in your test framework utils, and another that loads the rails dummy app and tests your gem against an actual rails app
[16:55:34] tubbo: habitullence: btw are you using generator_spec? makes testing generators a *lot* easier
[16:55:43] tubbo: as i found out last week when i had to make one
[16:56:29] habitullence: tubbo: I am.. Glad to hear someone else has been through this before. Google is dry when it comes to testing plugins with RSpec
[16:56:47] JoshL: has joined #RubyOnRails
[16:57:41] habitullence: tubbo: Don't suppose that's code that can be shared? ;)
[16:57:54] mrchris: Is a join table sufficient in a has_many through or will I also need to create the model?
[16:58:01] tubbo: habitullence: unfortunately it was something i made for my job, so no.
[16:58:11] tubbo: __chris: you need to create the model
[16:58:14] n1x: has joined #RubyOnRails
[16:58:24] arup_r: __chris: has_many though needs a model also
[16:59:05] habitullence: tubbo: Nm, worth asking... I'm going to blat this dir and recreate from scratch without -T so maybe I can make sense of things
[17:03:14] infoget: has joined #RubyOnRails
[17:03:53] alex88: has joined #RubyOnRails
[17:05:54] habitullence: tubbo: I'm bundling rails and then I'm just going to run bundle rails plugin new .
[17:05:54] maz-dev: has joined #RubyOnRails
[17:06:08] dideler93: has joined #RubyOnRails
[17:06:21] DoubleMalt: has joined #RubyOnRails
[17:06:44] s2013: has joined #RubyOnRails
[17:07:30] habitullence: tubbo: ah yeah test_helper has a whole loaaaaad of stuff in it :)
[17:07:49] s2013: morning yall
[17:08:06] habitullence: tubbo: do you think I should go with default test suite or push on for rspec?
[17:08:41] rocLv: has joined #RubyOnRails
[17:08:58] dopamean_: has joined #RubyOnRails
[17:09:07] tubbo: habitullence: oh shit i totally forgot about https://github.com/tubbo/controller_resources/blob/master/spec/spec_helper.rb
[17:09:17] tubbo: habitullence: that's something i can show you :)
[17:10:11] habitullence: tubbo: neat! That's basically what I'm looking at in test/test_helper.rb :)
[17:10:29] goliathusCZ: has joined #RubyOnRails
[17:10:45] yfeldblum: has joined #RubyOnRails
[17:10:59] habitullence: tubbo: I'm now stalking you on github! Mooohaha
[17:12:29] sadaf2605: has joined #RubyOnRails
[17:13:08] kriskova: has joined #RubyOnRails
[17:13:10] annlewis: has joined #RubyOnRails
[17:13:17] ratmav: has joined #RubyOnRails
[17:14:25] havenwood: has joined #RubyOnRails
[17:15:14] Caius: has joined #RubyOnRails
[17:15:19] ratmav: i've running into an odd situation
[17:15:33] ratmav: this app i'm working on redirects to 443
[17:15:46] ratmav: nginx is stopped, i'm running with rails server -e production using puma
[17:15:59] ratmav: this is pretty mysterious to me: what could be causing the redirects?
[17:16:25] ratmav: i just want to fire it up on port 3000 to make sure it's running
[17:17:35] Lightsword_: has joined #RubyOnRails
[17:17:47] siemprefresco: has joined #RubyOnRails
[17:18:17] dopamean_: has joined #RubyOnRails
[17:18:55] habitullence: tubbo: Do you know what the remove_silencers bit does?
[17:19:05] Lightsword__: has joined #RubyOnRails
[17:19:32] habitullence: I see it's something to do with backtrace...
[17:20:52] s2013: it makes you into a bad ass hitman
[17:22:22] Lightsword: has joined #RubyOnRails
[17:22:51] habitullence: I thought similar.. like John Wick
[17:23:04] prestorium: has joined #RubyOnRails
[17:23:42] jenrzzz: has joined #RubyOnRails
[17:23:45] sarink: has joined #RubyOnRails
[17:24:49] Lightsword_: has joined #RubyOnRails
[17:25:49] Lightsword__: has joined #RubyOnRails
[17:26:19] manfrin: has joined #RubyOnRails
[17:26:24] krisquigley: has joined #RubyOnRails
[17:26:26] quazimodo: has joined #RubyOnRails
[17:26:49] cnk: has joined #RubyOnRails
[17:26:52] cac: has joined #RubyOnRails
[17:27:04] da7id: has joined #RubyOnRails
[17:27:30] Lightsword: has joined #RubyOnRails
[17:28:21] strcmp1: has joined #RubyOnRails
[17:28:26] DmitryM: tubbo: well im at a point where on every commit i have a new vagrant box spun up with a production environment.. so now what? i can basically use anything that talks HTTP.. but there must be some best practices around that
[17:29:19] siemprefresco: has joined #RubyOnRails
[17:29:27] tubbo: DmitryM: oh, i was just talking about using capybara and doing this all locally, you shouldn't need a VM for it. of course it won't be running in "production"
[17:30:11] DmitryM: yeah but with asset prcompilation and all that fun stuff that sometiems fails i wanna go through the process anyway
[17:30:24] DmitryM: and integration tests are much more satisfying in the "real" envrionment
[17:32:08] tubbo: DmitryM: that may be true, but if you're not clearing between tests you can get into some really interesting traps that way
[17:32:13] tubbo: clearing the data*
[17:32:21] tubbo: DmitryM: plus spinning up a VM is slow and annoying
[17:32:38] tubbo: i've definitely left jobs before because the development environment was too shitty :D
[17:32:58] DmitryM: haha, well we have 0 automation right now
[17:32:59] tubbo: DmitryM: have you used controller tests?
[17:33:05] DmitryM: so i'm trying to change that somewhat
[17:33:08] DmitryM: no, there are no tests
[17:33:52] krisquigley: has joined #RubyOnRails
[17:35:08] tubbo: DmitryM: i'd start with controller tests then, they're way faster than spinning up a VM or starting an HTTP server at all. you can at least verify you're getting the right data back when you pass in your params
[17:35:45] Lightsword: has joined #RubyOnRails
[17:35:50] tubbo: DmitryM: next you can move up anything that can't be verified in the controller tests to the integration testing layer, in which you'll actually need an http server to spin up. as i said before i recommend doing this locally and *not* using a VM to keep your tests as isolated as possible
[17:36:36] DmitryM: alright, that's certainly an option.. do you minitest or rspec?
[17:36:50] tubbo: DmitryM: i use rspec
[17:37:47] ramortegui: has joined #RubyOnRails
[17:40:20] havenwood: DmitryM: I use Minitest. Both are nice.
[17:40:29] manfrin: has joined #RubyOnRails
[17:40:34] greengriminal: has joined #RubyOnRails
[17:40:40] smathy: If you're going to use the rspec syntax then use rspec.
[17:41:01] havenwood: DmitryM: Minitest ships with Ruby and is the Rails default. It does have a nice spec style option.
[17:41:23] smathy: That's actually the only thing I'd recommend against.
[17:41:43] smathy: If you're going to use xunit style then use minitest, but if you're going to use rspec style then use Rspec itself.
[17:41:54] tubbo: yeah, i'm definitely a fan of using rspec itself if you want to use spec synta
[17:42:07] tubbo: minitest spec syntax is just different enough to constantly confuse you :)
[17:42:14] craysiii: has joined #RubyOnRails
[17:44:49] mloy: has joined #RubyOnRails
[17:45:00] iamse7en: has joined #RubyOnRails
[17:45:32] lwu_: has joined #RubyOnRails
[17:45:47] DmitryM: havenwood: thanks
[17:46:42] DmitryM: i guess the issue i'm struggling with is that there's quite a bit of the existing codebase. it feels like it's too late to start controller tests and integration testing via REST is the way to go
[17:47:09] rhizome: never too late
[17:48:01] smathy: DmitryM, you mean you already have a lot of tests written as controller tests?
[17:48:50] mices: has joined #RubyOnRails
[17:49:29] mices: does anyone know where the global .gemrc file is supposed to be pathed
[17:49:40] astrodog: has joined #RubyOnRails
[17:49:45] mices: should it be the server root?
[17:50:12] DmitryM: smathy: the opposite, 3 years of code, and nearly 0 tests
[17:51:20] grand: has joined #RubyOnRails
[17:51:23] jenrzzz: has joined #RubyOnRails
[17:52:15] Scriptonaut: I heard that if you render a form with an object with errors on it, it will set an error class to each input with an error. The problem I'm having, is when I render :new, it is returning a 200 OK. I want to somehow signal to my JS that an error occured, but I still want to return the form with the errors
[17:52:36] dopamean1: has joined #RubyOnRails
[17:52:43] arup_r: people asked how to use accepts_nested_attributes_for and HABTM.. and other group of people convinced use has_many through instead. That is why my googling not helping me. :)
[17:52:53] arup_r: for eg http://stackoverflow.com/questions/18575039/how-can-i-use-accepts-nested-attributes-with-the-habtm
[17:53:20] smathy: DmitryM, oh right, so yeah - just start with the most mission critical things, or if there's an area of your code where you've had failures before, or just places where you're making a lot of changes.
[17:54:02] Lytol: has joined #RubyOnRails
[17:54:10] rhizome: Scriptonaut: why not just CSS?
[17:54:25] Scriptonaut: I'm going to use CSS to actually color it
[17:54:37] lord4163: has joined #RubyOnRails
[17:54:48] Scriptonaut: I need a good way to translate the errors from the model's name to the css name
[17:54:55] Scriptonaut: so I know which ones to mark
[17:55:08] rhizome: usually you just mark .field_with_errors or similar
[17:55:08] smathy: Scriptonaut, you signal JS the same as you signal HTML, by checking the presence of the `errors` collection.
[17:55:56] fxn: has joined #RubyOnRails
[17:56:05] smathy: arup_r, the choice between habtm or hmt has no bearing on anaf
[17:56:24] Scriptonaut: rhizome, that part is fine, it's figuring out which field has errors or not
[17:56:28] srinidhi: has joined #RubyOnRails
[17:56:53] rhizome: what do you mean?
[17:57:07] Scriptonaut: what do I return from my controller to my JS
[17:57:10] Scriptonaut: when an errro occurs
[17:57:28] arup_r: smathy: anaf means ? :)
[17:57:32] Scriptonaut: right now I'm using some home rolled: render_errors method, however it's not in a helpful format
[17:58:38] baweaver: has joined #RubyOnRails
[17:59:00] draig: has joined #RubyOnRails
[17:59:24] JoshL: has joined #RubyOnRails
[18:00:29] idd2d: has joined #RubyOnRails
[18:01:32] neruda: has joined #RubyOnRails
[18:02:32] neruda: hi, anyone have experience with client-side validations? Should I stick to jquery or go for gem (judge/comply/etc)?
[18:04:24] devdazed: has joined #RubyOnRails
[18:07:32] yfeldblum: has joined #RubyOnRails
[18:08:30] momomomomo: has joined #RubyOnRails
[18:08:54] smathy: Scriptonaut, my advice is to just use the responders gem, when you respond_with(@foo) for a JSON format and @foo has errors then you will just receive like: {"errors":{"name":["can't be blank"]}}
[18:09:10] Scriptonaut: ah, cool, I'll look into it
[18:09:30] smathy: arup_r, anaf = accepts_nested_attributes_for
[18:09:44] arup_r: o i see ... so smart name
[18:10:02] smathy: arup_r, acronym all the things :)
[18:10:32] smathy: arup_r, so my point was just that regardless of which many:many option you choose, the anaf logic will be the same.
[18:11:19] simkessy: If someone could take a look at this. I'm having issues with ActiveModel Serializer
[18:11:20] simkessy: http://stackoverflow.com/questions/32571215/activemodel-serialization-not-taking-effect
[18:11:53] smathy: arup_r, because both habtm and hmt both expose the same methods for attaching/removing/creating/replacing associated objects, and that's what anaf uses.
[18:12:06] arup_r: Why the dropdown file is not visible in my form https://gist.github.com/aruprakshit/d237cb278b4ddd48f926
[18:12:52] arup_r: smathy: I neved used many to many with anaf .. so struggling.. first time :)
[18:13:01] n00bDev: has joined #RubyOnRails
[18:14:41] arup_r: https://gist.github.com/aruprakshit/d237cb278b4ddd48f926#file-_form-html-haml-L3 is absent in the form
[18:15:00] based_pdev_: has joined #RubyOnRails
[18:15:30] n00bDev: i'm somewhat confused on how to do update a nested attribute through simpleform
[18:15:41] cac: has joined #RubyOnRails
[18:15:51] arup_r: n00bdev: haha .. follow me then.. :D
[18:16:07] n00bDev: do i have to specify accepts_nested_attributes_for in the model that will update the nested attribute?
[18:17:08] lord4163: has joined #RubyOnRails
[18:17:42] riotjones: has joined #RubyOnRails
[18:20:57] dopamean_: has joined #RubyOnRails
[18:22:51] maz-dev: has joined #RubyOnRails
[18:25:03] ledestin: has joined #RubyOnRails
[18:26:25] smathy: arup_r, umm, you don't need anaf or fields_for for what you're doing.
[18:26:44] arup_r: smathy: why ?
[18:27:02] arup_r: I have HABTM between User and Tenant
[18:27:13] DLSteve: has joined #RubyOnRails
[18:28:32] arup_r: smathy: I am using HABTM here to linking existing records,
[18:28:45] smathy: arup_r, you just need: f.collection_select :tenant_ids, Tenant.all, :id, :name, etc.
[18:29:15] arup_r: With that the HABTM records will be created automatically ?
[18:29:20] smathy: arup_r, see the habtm docs, it creates a `collection_singular_ids=` method. You just have to use that.
[18:29:31] smathy: arup_r, oh, no - but you're not allowing that anyway.
[18:29:41] smathy: arup_r, how would someone create a new record with the code you have?
[18:29:43] pragmatism: has joined #RubyOnRails
[18:30:12] arup_r: I am creating a new user and attaching tenants to the user
[18:30:28] smathy: arup_r, right, but you're not creating any new tenants.
[18:30:39] arup_r: that is true
[18:30:49] smathy: Oh, sorry, the "HABTM records" you were talking about were just the join table records?
[18:31:43] smathy: Yes, as per the docs, setting foo.bar_ids = [ 1, 2, 3 ] will ensure that the three join records exist for the associations between that foo and those bars.
[18:31:49] smathy: It'll create/delete as necessary.
[18:32:01] arup_r: smathy: let me try
[18:32:08] arup_r: now it is making a sense to me
[18:32:11] arup_r: let me try
[18:32:16] smathy: arup_r, you'll need to make your drop-down a `multiple`
[18:32:27] baweaver: has joined #RubyOnRails
[18:32:27] arup_r: Yes.. I know.. I am doing that also
[18:32:47] arup_r: I just copied it some other code of mine.. so still didn;t change.. now changing
[18:33:58] idd2d: has joined #RubyOnRails
[18:34:10] arup_r: smathy: What you said I already read.. but it didn't make any sense :( now it did for you atleast ( https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2036-autosave-unclear-for-habtm#ticket-2036-3)
[18:35:18] eosinx: has joined #RubyOnRails
[18:35:54] smathy: arup_r, no idea what you're linking me to there.
[18:36:16] smathy: arup_r, remember to update your strong params.
[18:36:38] craysiii: https://gist.github.com/craysiii/b7e43c62385e97a15b36 I am learning HMT relationships, and I am confused as to how to reference my wiki model through collaborators on User since user already has a wikis attribute. can I name the HMT relationship something other than wikis?
[18:36:39] arup_r: yes. those all are done.. now I will click my form :)
[18:36:59] habitullence: has joined #RubyOnRails
[18:37:20] arup_r: smathy: In the link @Lawrence Pit said what you said to me the ``collection_singular_ids=` that is what I meant
[18:37:45] dopamean_: has joined #RubyOnRails
[18:39:00] craysiii: I guess my question is, in a "has many :symbolA, through: :symbolB, does symbolA have to be an actual model, or can i give it a custom name
[18:39:06] egKCNoNE8dwF93Na: has joined #RubyOnRails
[18:39:16] draig: has joined #RubyOnRails
[18:41:53] smathy: arup_r, ah ok.
[18:42:31] smathy: craysiii, you can give it a custom name as long as you provide the :class_name option so Rails knows what to use to instantiate objects.
[18:42:36] arup_r: smathy: thanks worked
[18:42:43] smathy: arup_r, you're welcome :)
[18:42:53] arup_r: I was with it since 1 hour.
[18:43:04] smathy: anaf is only if you actually want to edit the attributes/values of an associated model.
[18:43:09] craysiii: thanks smathy, could you give an example of that? I don't see it in the rails docs for associations
[18:43:16] smathy: *create/edit
[18:43:32] Ergo: has joined #RubyOnRails
[18:43:42] arup_r: due to multiple: true my dropdown looks like crazy bad. Need to see now bootstrap class if any is there..
[18:43:59] cornerma1: has joined #RubyOnRails
[18:44:01] smathy: craysiii, there are a number of examples in the docs for associations: http://devdocs.io/rails/activerecord/associations/classmethods
[18:44:09] smathy: craysiii, just search the page for class_name
[18:44:22] arup_r: smathy: anaf is for CRUD
[18:45:35] mikecmpbll: has joined #RubyOnRails
[18:46:05] sininen: has joined #RubyOnRails
[18:46:58] patrick99e99: has joined #RubyOnRails
[18:47:14] patrick99e99: I just did rvm gemset empty, and then ran bundle and now I get: "Could not find rails-i18n-debug-1.0.1 in any of the sources"
[18:47:45] smathy: craysiii, umm, sorry, I missed that you were talking about the :through association. It uses the :source of the through association (ie. the values in the through model).
[18:47:54] choke: has joined #RubyOnRails
[18:48:03] havenwood: patrick99e99: Does it work if you prefix `bundle exec` to the command?
[18:48:08] craysiii: it's okay. the more i think about through, the more it confuses me
[18:49:07] hakunin: has joined #RubyOnRails
[18:49:12] idd2d: has joined #RubyOnRails
[18:49:33] havenwood: patrick99e99: My guess would be you nuked the rubygems-bundler gem so you're not automagically in the context of your Bundle. If that's the case you could `gem install rubygems-bundler` or manually add `bundle exec` in front of commands that need the Bundle.
[18:49:51] n00bDev: https://gist.github.com/gwong89/004df21bfb1a98b7ce86
[18:49:56] craysiii: so lets say for my wiki model. it belongs_to user, so I can do wiki.user which will return one. if a wiki has_many :users through :collaborators, does that allow me to do wiki.users, wiki.collaborators, or both?
[18:50:06] smathy: craysiii, what I mean is say you have School (has_many :enrollments and has_many :students, through: :enrollments) and Enrollment (belongs_to :student), then the class used for @school.students will be the class of the belongs_to inside Enrollment.
[18:51:00] n00bDev: i'm not able to update/create a broker_themes with this setup, can someone point out what i'm doing wrong? i think my understanding of updating nested attributes has a gap
[18:51:08] craysiii: let me absorb that for a minute
[18:51:20] smathy: craysiii, if you wanted to have has_many :kids, through: :enrollments then you'd have to have a source: :student options to tell the Rails which association inside Enrollment to use, and Rails would get the class for `.kids` from the class from that `belongs_to`
[18:52:28] craysiii: thanks smathy it's starting to make more sense
[18:52:48] frzn: has joined #RubyOnRails
[18:52:52] smathy: craysiii, and, to answer your question - you can do both.
[18:53:02] patrick99e99: havenwood: if I try bundle exec bundle install i get: "Could not find i18n-0.6.9 in any of the sources Run `bundle install` to install missing gems."
[18:53:27] smathy: craysiii, and the class used for wiki.users will be the class of the belongs_to :user inside your Collaborator model.
[18:53:33] havenwood: patrick99e99: First make sure Bundler is installed with the Ruby you're using: gem install bundler
[18:53:42] havenwood: patrick99e99: Then a plain old: bundle install
[18:53:53] smathy: craysiii, in case you didn't realize, if you have `has_many :users, through: :collaborators` then you MUST also have a `has_many :collaborators`
[18:54:16] smathy: (which is why you can do both wiki.users and wiki.collaborators)
[18:54:19] patrick99e99: havenwood: no difference
[18:54:36] netzfisch: has joined #RubyOnRails
[18:54:39] havenwood: patrick99e99: What's the error from: bundle install
[18:54:46] patrick99e99: Could not find rails-i18n-debug-1.0.1 in any of the sources
[18:54:48] Swappticon: has joined #RubyOnRails
[18:56:53] smathy: patrick99e99, and you get this during your `bundle install?
[18:57:25] smathy: patrick99e99, just rm your Gemfile.lock and `bundle install` again.
[18:57:42] patrick99e99: smathy: i dont want to do that because its going to screw up all my other team members
[18:57:54] havenwood: smathy: Wouldn't it be preferred to?: bundle update rails-i18n-debug
[18:57:56] smathy: patrick99e99, you can re-check it out later, this is just a debugging step.
[18:58:34] idd2d: has joined #RubyOnRails
[18:58:44] mices: when using apache i'll not longer be "starting the rails server" by typing 'rails server' right?
[18:58:52] mices: s/not/no/
[18:58:54] patrick99e99: smathy: same result./..
[18:58:56] smathy: See because rails-i18n-debug has been yanked.
[18:58:58] patrick99e99: smathy: "Could not find gem 'rails-i18n-debug (>= 0) ruby' in any of the gem sources listed in your Gemfile or installed on this machine."
[18:59:06] havenwood: smathy: tsk tsk, yanking gems :O
[18:59:10] Jon30: has joined #RubyOnRails
[18:59:16] smathy: patrick99e99, what (other) gem is bundler trying to install?
[18:59:22] Pumukel: has joined #RubyOnRails
[18:59:23] craysiii: https://gist.github.com/craysiii/852c3b1def82ccec95a2 should i create a custom name for my has many through in this instance?
[18:59:25] mices: rails and passenger are installed but i get 403 forbidden
[18:59:38] FailBit: are you using passenger with apache?
[18:59:44] patrick99e99: smathy: what do you mean?
[18:59:51] FailBit: nginx masterrace
[19:00:00] smathy: patrick99e99, oh, wait, do you have rails-i18n-debug in your Gemfile?
[19:00:16] smathy: patrick99e99, ok, so that won't work anymore. The gem has been yanked.
[19:00:23] smathy: (ie. it's not available in rubygems anymore)
[19:00:41] patrick99e99: smathy: eek.. ok... I am not even sure where our app is using that.. How can I tell?
[19:00:59] totimkop1: has left #RubyOnRails: ()
[19:01:16] totimkopf: has joined #RubyOnRails
[19:01:37] smathy: ...and FWIW, the git repo has been removed too: https://github.com/256dpi/rails-i18n-debug
[19:01:44] smathy: Basically the author just said "Fuck you!"
[19:02:02] smathy: His email is public: https://github.com/256dpi
[19:02:05] habitullence: has joined #RubyOnRails
[19:02:11] toretore: has joined #RubyOnRails
[19:02:20] havenwood: Looks like this is the successor, I'm unfamiliar: https://github.com/fphilipe/i18n-debug#readme
[19:02:53] smathy: patrick99e99, there's another gem called just i18n-debug which says it was inspired by rails-i18n.debug - maybe you can migrate to that.
[19:04:14] patrick99e99: yeah ok.. thanks smathy
[19:04:24] craysiii: smathy sorry to bother you again https://gist.github.com/craysiii/852c3b1def82ccec95a2 would this be a good instance to use the class name in the HMT
[19:06:01] smathy: craysiii, well you'll have to rename one of them.
[19:06:30] smathy: craysiii, the `.wikis` method on your object can only be one or the other.
[19:07:17] Scriptonaut: Is there anything you need to do first to get a form to render with .field_with_errors classes on the fields with errors?
[19:07:18] towski__: has joined #RubyOnRails
[19:07:27] smathy: craysiii, which one you rename really depends on your structure, and often which one you're using the most. Does user.wikis sound more like the owned wikis or the wikis the user is collaborating on?
[19:07:38] smathy: (you could also rename both of them)
[19:07:41] Scriptonaut: I am using the form helper, yet it still isn't adding .field_with_errrors to my inputs that failed validation
[19:07:50] hahuang65: has joined #RubyOnRails
[19:08:24] craysiii: wow. resized the side bar on devdocs.io and now it wont resize again, taking up the whole screen
[19:08:52] allcentury: can I use a factory girl attribute when defining other attributes? ie: factory :user { short_title: "MyTitle" ; long_title: "#{short_title} - some other words" }
[19:09:02] allcentury: I get "trait not found" when I try and do that
[19:09:35] allcentury: I suppose I could use a callback but that seems a bit extreme
[19:10:16] ishahnaz: has joined #RubyOnRails
[19:10:30] greengriminal: has joined #RubyOnRails
[19:10:31] smathy: Scriptonaut, by default Rails *WRAPS* the failed field in a field_with_errors div - could you be expecting the wrong thing?
[19:10:57] Scriptonaut: I'm expecting it to wrap my fields, it's not
[19:11:03] Scriptonaut: that's the problem
[19:11:13] Scriptonaut: rails 4.2.4 btw
[19:12:29] mices: can someone give me the syntax to add passenger to my gemfile
[19:13:55] smathy: Scriptonaut, nothing special, no, it just does it. gist your code
[19:14:37] n008f4g_: has joined #RubyOnRails
[19:14:49] iszak: has joined #RubyOnRails
[19:14:49] iszak: has joined #RubyOnRails
[19:15:35] smathy: Scriptonaut, you are using the form_for helpers right?
[19:15:51] habitullence: hey tubbo: I copied what you did but I'm still getting the uninitialized message, the repo's here https://github.com/playtimestudios/admin_bounds. Thought you might be able to spot the obvious mistake but don't worry if not, I'll pick up again tomorrow.
[19:16:01] rhizome: mices: same as any other
[19:16:13] Scriptonaut: I'll gist my code one sec
[19:16:26] Scriptonaut: smathy: https://gist.github.com/robins35/1161bbfe7df8d01ffe6c
[19:18:16] smathy: Scriptonaut, you're creating new objects in your view.
[19:18:33] smathy: Scriptonaut, how do you think those would be attached to the object set in your controller (the one with the errors in it?)
[19:18:53] andywww: has joined #RubyOnRails
[19:19:06] jobewan: has joined #RubyOnRails
[19:19:09] Scriptonaut: user is the right object, but the people aren't
[19:19:24] momomomomo_: has joined #RubyOnRails
[19:19:26] jsuth: has joined #RubyOnRails
[19:20:10] smathy: Scriptonaut, I can't even be sure about the user, you have `user.decorate` - so it really depends on what `user` and its decorate method return.
[19:20:35] dici: has joined #RubyOnRails
[19:20:35] finnnnnnnnnnn: has joined #RubyOnRails
[19:20:44] smathy: (but definitely the nested objects are all wrong)
[19:22:16] andywww: i need to create and maintain a cache of XML brought back by a handful of API calls. I also need to be able to query that cache with a front end.
[19:22:36] choke: has joined #RubyOnRails
[19:22:49] rhizome: it's good to have needs
[19:23:10] andywww: i could script the xml data into an sql database periodically but i was wondering if there were any tricks i could use or alternative data stores that would make this task a bit easier?
[19:23:36] maz-dev: has joined #RubyOnRails
[19:23:41] rhizome: probably. you want a list of them all? alphabetically ok?
[19:23:43] yaymukund: has joined #RubyOnRails
[19:24:12] gravity_pope: has joined #RubyOnRails
[19:24:21] smathy: mices, why would you want passenger in your Gemfile?
[19:24:26] kidoz: has joined #RubyOnRails
[19:24:34] andywww: i???ve noticed, for such a knowledgeable fella, your answers are geting progressively more sarcastic
[19:24:41] andywww: do you need a holiday or something?
[19:25:12] rhizome: probably, but your question is still quite vague. have you even googled "rails xml" yet?
[19:25:26] rhizome: or binged it. google it on bing.
[19:25:41] smathy: andywww, just cache it like anything else in Rails.
[19:25:52] smathy: http://guides.rubyonrails.org/caching_with_rails.html
[19:25:53] mary5030: has joined #RubyOnRails
[19:25:55] andywww: i???m googling as we speak but i come here for nudges in the right direction
[19:26:53] rhizome: i would recommend doing the simplest thing that comes naturally to you until you find a direction.
[19:27:10] bungoman: has joined #RubyOnRails
[19:28:08] djbkd: has joined #RubyOnRails
[19:28:21] mices: i'm getting authz_core error client denied by server
[19:28:28] devdazed: I am trying to write an rspec test for a rake task that I wrote. the rake file adds a prerequisite task to Rake::Task['db:drop']. The issue I am having is that when I run the spec I am getting " Don't know how to build task 'db:drop'"
[19:28:39] mices: that's in my error log
[19:28:43] devdazed: my assumption here is that it isn't loading the rake tasks from activerecord
[19:29:01] mices: and in my access log it says 403 230
[19:30:02] devdazed: is there a way to tell rspec to load up all tasks includeing activerecord?
[19:30:14] mices: i set my directory path to public even though my app has no files there cause that's what it said to do i assume rails and passenger are rewriting the requests
[19:30:48] mices: there's no index.html.erb file in public
[19:31:19] mices: just a couple of error pages in public
[19:31:49] Lytol: has joined #RubyOnRails
[19:32:46] smathy: mices, my question remains unchanged, why would you want passenger in your Gemfile?
[19:32:59] craysiii: is there any performance hit if I call @model.association in a view rather than assigning it in the controller e.g. @ass = @model.association
[19:33:29] smathy: craysiii, assuming it's called just once (per requet) in both places, no.
[19:34:08] mices: in my setup i can't install gems as user only as root, to install them as user i have to add them to the gemfile and run bundle install
[19:34:40] mices: so i uninstalled the one i installed as root and did it this way to see if it would help
[19:35:00] krisquigley: has joined #RubyOnRails
[19:35:47] smathy: devdazed, you generally use `Rake::Task.define_task` to define the tasks that your tasks depend on in your tests.
[19:36:18] andywww: has left #RubyOnRails: ()
[19:36:22] FailBit: you know how =form_for(@image) will automatically construct the route to image_path(@image)
[19:36:24] FailBit: how does it do that?
[19:37:02] smathy: devdazed, alternatively, you could call `YouApp::Application.load_tasks` if you wanted to just load everything.
[19:38:16] smathy: mices, the passenger gem is not required by your application, it has no place being in your Gemfile.
[19:38:39] mices: ok good thanks i'm gonna take it out
[19:39:02] neruda: hi, anyone have experience with client-side validations? Should I stick to jquery or go for gem (judge/comply/client_side_validations)? Any recommendations for bootstrap based project?
[19:39:15] sergiopantoja: has joined #RubyOnRails
[19:39:35] smathy: mices, "authz_core error client denied by server configuration" is generally caused by incorrect allow/deny rules.
[19:39:49] FailBit: http://apidock.com/rails/v3.2.3/ActionView/Helpers/FormHelper/apply_form_for_options!
[19:39:51] smathy: (nothing to do with passenger)
[19:40:16] smathy: mices, if you want help, gist your full error and your apache conf.
[19:41:00] mices: it's just order allow, deny and then allow all
[19:42:21] mices: allow from all
[19:42:31] mices: no restrictions there
[19:43:08] hnanon: has joined #RubyOnRails
[19:44:09] hnanon: I have: Users have many Essays, Essays belong to User, Essays have many Reviews, Reviews belong to Essay
[19:44:34] hnanon: How can I get the reviews a user has written for an essay.
[19:44:51] tubbo: hnanon: does Review belong_to User?
[19:45:21] hnanon: tubbo: Hmm...
[19:45:38] hnanon: A review is written by a user for an essay of another user.
[19:45:39] tubbo: if not, then you can't, because the Review doesn't know what User wrote it
[19:46:02] sandstrom: has joined #RubyOnRails
[19:46:03] tubbo: wait that's actually not true :D
[19:46:03] maz-dev: has joined #RubyOnRails
[19:46:35] tubbo: you can basically do essays.map(&:reviews).flatten and get all reviews for all essays the user owns
[19:46:51] tubbo: i think there's a way to do that with active record too but i'm just giving you a contrived example
[19:47:06] smathy: hnanon, in User put: has_many :reviews, through: :essays
[19:47:33] kadoppe: has joined #RubyOnRails
[19:47:35] tubbo: oh yeah a HMT would work too
[19:47:40] smathy: hnanon, then it's just user.reviews
[19:47:51] yfeldblum: has joined #RubyOnRails
[19:48:05] hnanon: smathy: No belong_to User through Essay in Review?
[19:48:07] tubbo: hnanon: i feel like the Review should really belong to a User, because it's a *different* User writing the review...
[19:48:16] smathy: ...but as (I think) tubbo was getting at, this is only all reviews on a users own essays.
[19:48:34] smathy: hnanon, what tubbo said ^
[19:48:47] hnanon: Wait...getting confused.
[19:49:02] smathy: I think in Review you need (something like) belongs_to :author, class_name: "User"
[19:49:16] smathy: ...and an author_id
[19:49:25] Pro|: or just write sql
[19:49:55] hnanon: smathy: and a new reference column for author?
[19:50:06] hnanon: author_id
[19:50:26] greengriminal: has joined #RubyOnRails
[19:50:37] tubbo: Pro|: eww ;)
[19:50:46] smathy: hnanon, well, unless you have it already in some way that you're not telling us? Is there anything you store in the reviews table to tell you who wrote the review?
[19:50:52] Pro|: atleast that works ;)
[19:51:01] smathy: Pro|, what SQL would you write here?
[19:51:14] hnanon: the user_id
[19:51:19] tubbo: i don't think writing SQL would solve the problem here, the problem is the data model seems like it has a hole in it
[19:51:34] Lytol: has joined #RubyOnRails
[19:51:34] Pro|: SELECT * FROM Reviews where user_id == .. and review_id == ..
[19:51:39] tubbo: review is written by a user for another user's essay, but it doesn't store who that user is which wrote it
[19:51:40] smathy: hnanon, you didn't mention that there was a user_id in Review - so Reviews already belongs_to :user ?
[19:51:54] tubbo: Pro|: really? there's a review_id in reviews? :P
[19:52:03] Pro|: well just id
[19:52:16] smathy: Pro|, he hasn't said (yet) that there was a user_id in reviews.
[19:52:23] Pro|: actually article id maybe
[19:52:28] baweaver: has joined #RubyOnRails
[19:52:32] tubbo: Pro|: what's an article?
[19:52:42] Pro|: ok ok i'll pack my stuff
[19:52:44] smathy: This whole SQL idea isn't going well :)
[19:52:47] tubbo: Pro|: your SQL interpreter is getting angry at you ;)
[19:52:52] hnanon: smathy: Actually, there isn't.
[19:53:22] smathy: hnanon, ok, so there's no data telling who wrote a review?
[19:53:41] tubbo: Pro|: but you are fundamentally correct. if rails doesn't do something you need, dropping down to SQL in various ways is very simple. that said, for *most* use cases AR and ARel are pretty much all you need.
[19:53:44] hnanon: So I will go ahead and do as you suggested: Review belongs_to :author, class: "User"
[19:54:30] smathy: So then in user you will also have just a has_many :reviews
[19:56:13] Pro|: so what was the problem with adding user_id to review
[19:56:30] Pro|: Review.where(user_id: x, article_id: y)
[19:57:01] hnanon: smathy: I will call it Reviewer instead of Author.
[19:57:33] Pro|: why not just user
[19:57:56] Pro|: then user could write and review articles
[19:58:49] hnanon: Pro|: I think you're right.
[19:58:55] craysiii: https://gist.github.com/craysiii/bb1306c4248e1c9a2223 im getting "undefined method 'relation_delegate_class" on my has many through
[19:59:28] sarink: has joined #RubyOnRails
[20:01:23] craysiii: anyone please let me know if you need more info
[20:01:25] Pro|: where is the user class
[20:01:27] tejasmanohar: has joined #RubyOnRails
[20:01:54] craysiii: i wish gist preserved the order you added the files
[20:02:04] Pro|: wiki has only one user?
[20:02:07] Pro|: you cannot call users?
[20:02:19] craysiii: wiki has user, which is the user that created the wiki
[20:02:34] craysiii: then wiki has users through collaborators, which are created at adifferent time
[20:02:48] Pro|: is that supposed to work
[20:03:10] craysiii: from what i understand, yes, but i guess not since it's not :P
[20:03:15] ktchup: has joined #RubyOnRails
[20:03:19] pastuxso: has joined #RubyOnRails
[20:04:04] da7id: has joined #RubyOnRails
[20:04:36] pastuxso: has left #RubyOnRails: ()
[20:04:45] craysiii: of course he goes afk ;)
[20:06:32] tubbo: craysiii: https://gist.github.com/craysiii/bb1306c4248e1c9a2223#file-collaborator-rb-L2-L3 wrong syntax, should be singular
[20:06:43] tubbo: :user, not :users
[20:06:45] tubbo: same for wiki
[20:07:21] siemprefresco: has joined #RubyOnRails
[20:07:37] craysiii: thats weird, because when i tried to do so in my generation command i.e. rails g model collaborator user:references wiki:references, it gave me an error about the references being singular
[20:07:50] craysiii: actually i guess that makes sense.
[20:08:06] deol: has joined #RubyOnRails
[20:08:45] sandstrom: has joined #RubyOnRails
[20:09:12] chills42_: has joined #RubyOnRails
[20:09:20] hnanon: So, how can I get user reviews for a specific essay?
[20:09:21] mary5030: has joined #RubyOnRails
[20:09:38] hnanon: @user.reviews.essays.where(...)?
[20:10:44] mary5030: has joined #RubyOnRails
[20:11:07] smathy: hnanon, @user.reviews.joins(:essays).where(essays:{id: 123})
[20:11:17] craysiii: tubbo i rolled back my migration, changed the references in the migration to be singular, and it seems to be working now.
[20:11:35] craysiii: (as well as changing singular in the collaborators model)
[20:12:32] smathy: hnanon, fwiw, I think author is still the right name. When you say review.user - it doesn't actually communicate any meaning, whereas review.author is very clear what you're asking for.
[20:13:34] Scriptonaut: I am still not able to get my inputs that fail validation to wrap in ".field_with_errors" divs. I have put a few binding.prys in the form, and the form.object, person_form.object, and builder.object all have errors on them. So why isn't it wrapping them in the divs like it shoudl? https://gist.github.com/robins35/fa771570bc0443d79e1c
[20:13:39] smathy: hnanon, review.reviewer is better than review.user - but really the `reviewer` reviews the essay (not the review), so it would be essay.reviewer (or reviewers) which would basically map to: `reviews.map &:author`
[20:14:21] hnanon: smathy: I'm just trying to keep it as simple as possible. I definitely understand why you said "author" now, though.
[20:14:23] smathy: Scriptonaut, I suspect your decorator is at fault here.
[20:14:56] hnanon: smathy: @e1rr = @user.reviews.joins(:essays).where(essays:{number: 0, stage: 0})
[20:15:05] hnanon: That's now in my user show action.,
[20:15:48] yfeldblum: has joined #RubyOnRails
[20:15:57] hnanon: In my view: <% @e1rr.each do |review| %> <%= review.thesis %> <% end %>
[20:17:18] hnanon: Error: Association named 'essays' was not found on Review; perhaps you misspelled it?
[20:18:05] tubbo: essays have_many reviews, but do reviews have_many essays?
[20:18:08] baweaver: has joined #RubyOnRails
[20:18:16] tubbo: oh wait never mind
[20:18:18] tubbo: forget what i said
[20:18:34] gravity_pope: has joined #RubyOnRails
[20:19:32] Scriptonaut: does anyone know if I can use the form helpers to get the id of an input generated for an object?
[20:19:52] Scriptonaut: that way I could return a list of html ids for inputs that have erros
[20:19:59] arup_r: What Gem I should use for instant search ?
[20:20:11] arup_r: like kind of live search
[20:21:19] arup_r: I am using Postgresql DB
[20:21:32] FailBit: arup_r: elasticsearch
[20:21:52] FailBit: you'll need to set up ES on your server and install the elasticsearch-rails/elasticsearch-model gems
[20:22:39] Scriptonaut: I also used fuzzy-string-match_pure
[20:22:48] Scriptonaut: then I homerolled my own fuzzysearch
[20:23:01] Scriptonaut: depending on the size of what you're storing for livesearch, you might be able to store it all in redis
[20:23:24] craysiii: so i can create a HMT to see the associations created between two models in a join table. Is there an easy way to get the opposite? if wiki has many users through collaborators, how can i get the users which aren't collaborators?
[20:23:24] arup_r: I thought of pg_search
[20:23:44] FailBit: postgres can technically be used for full text search
[20:23:53] FailBit: I still recommend using an actual search engine
[20:24:23] krisquigley: has joined #RubyOnRails
[20:24:52] tubbo: i like postgres for full-text searching
[20:24:58] tubbo: but it kinda depends on what you want to do with it
[20:25:11] arup_r: strcmp1: pong
[20:25:59] tubbo: like if you're looking to combine a bunch of different tokenizers and filters together, and making up your own with your own algorithms, postgres probably won't do what you want
[20:26:24] tubbo: but if it's simple enough, it's kinda nice not having to worry about elasticsearch or solr
[20:27:35] arup_r: tubbo: What I see now is, I will search single table ... search will be happening in 2 columns ... name and created by
[20:27:55] idd2d: has joined #RubyOnRails
[20:28:59] arup_r: but to do live search.. I need to do Ajax. No idea if it is a good idea to pull data while searching using Ajax or not
[20:30:02] herbst: has joined #RubyOnRails
[20:30:14] tubbo: arup_r: yeah, that's what i did on http://beta.brother.ly/
[20:30:16] capin: has joined #RubyOnRails
[20:30:25] tubbo: it uses pg_search and the multisearch feature
[20:30:39] craysiii: that moment when you're looking at a stackoverflow and you notice the answer is from smathy
[20:30:49] tubbo: hmm, doesn't seem like episodes are indexed though :)
[20:31:28] x-light: has joined #RubyOnRails
[20:31:30] mrtomme: has joined #RubyOnRails
[20:31:53] blackmesa: has joined #RubyOnRails
[20:33:22] benlieb: has joined #RubyOnRails
[20:33:32] arup_r: tubbo: :p http://beta.brother.ly/episodes/281110143/performances/1017241925 Bug!
[20:33:52] tubbo: arup_r: it says BETA ;)
[20:34:11] da7id: has joined #RubyOnRails
[20:35:17] arup_r: tubbo: So you are fteching there the search records using Ajax ?
[20:35:25] craysiii: https://gist.github.com/craysiii/120e28fd89fb11e1b265 how can I get the opposite of my has many through? I want to have a scope or something similar that will give me a list of users that aren't collaborators
[20:35:52] finnnnnnnnnnn: has joined #RubyOnRails
[20:36:08] VeryBewitching: has joined #RubyOnRails
[20:36:16] tubbo: arup_r: yeah, it's a remote rails form that hits a special controller (SearchesController) with the query, and the show action of that controller runs the search and displays its results in HTML. with my JS all i'm doing is outputting the HTML received via ajax into the dropdown.
[20:37:05] arup_r: Well. Thanks tubbo
[20:37:19] FailBit: how many concerns do you have
[20:37:44] tubbo: FailBit: i am very concerned.
[20:37:56] DLSteve_: has joined #RubyOnRails
[20:37:57] FailBit: our lack of concerns is concerning
[20:38:39] tubbo: i only make concerns if i'm gonna share a bunch of code between models
[20:39:33] baweaver: I tend to just make objects honestly. Never saw the need for concerns, always used lib objects.
[20:39:47] baweaver: then again haven't looked into them much either. What's the point of them?
[20:40:15] FailBit: if you have a bunch of different ducks that quack the same but redefine how to quack
[20:40:53] baweaver: I guess I just don't see the difference between that and module inclusion. I'll look more into it later either way.
[20:41:01] momomomomo_: has joined #RubyOnRails
[20:41:07] uris: has joined #RubyOnRails
[20:41:22] tubbo: baweaver: well the actual AS::Concern thing is useful for also adding class methods and "macros" to the object it's included into
[20:41:30] FailBit: if you need to have the module define class methods or do things in class scope, then concerns make that easy
[20:41:38] tubbo: but "concerns" are, to me, the role that module plays within the app
[20:41:49] FailBit: included do; has_many :shits; end
[20:41:52] mices: has joined #RubyOnRails
[20:42:13] tubbo: include Shittable
[20:42:14] bootstrappm: has joined #RubyOnRails
[20:42:19] baweaver: Hm, I'll read into it more later. Just noticed that was a new folder in Rails 4 and rarely bothered with it
[20:42:55] MartinElvar: has joined #RubyOnRails
[20:43:15] gurnoorinder: has joined #RubyOnRails
[20:43:24] Coldblackice: has joined #RubyOnRails
[20:43:25] devdazed: smathy: thanks, i tried the `YouApp::Application.load_tasks` method and still had the same issue. I'll take a look at define_task
[20:43:27] mices: https://gist.github.com/anonymous/eb543ebfd2a4dcec15df https://gist.github.com/anonymous/bc2dc800a1cf05c31a1e
[20:43:33] mices: smathy: ^
[20:43:35] gurnoorinder: hello. I have a small problem. can anyone help?
[20:43:42] bootstrappm: I'm using logger.debug in a controller action no rails 4.2.4. When I hit that action with a controller test nothing logs to log/development.log, any idea why?
[20:43:45] craysiii: just ask the question, dont ask to ask
[20:43:48] arup_r: gurnoorinder: yes
[20:44:01] most___: has joined #RubyOnRails
[20:44:21] beauby: has joined #RubyOnRails
[20:44:59] gurnoorinder: I installed ruby and rails couple of months ago. i do not remember if i used rbenv or rvm or homebrew to install it
[20:44:59] gurnoorinder: is there any chance that having these 3 can mess up my workin ROR env
[20:44:59] gurnoorinder: has left #RubyOnRails: ()
[20:45:00] most_l: has joined #RubyOnRails
[20:45:32] gurnoorinder: has joined #RubyOnRails
[20:45:55] craysiii: https://gist.github.com/craysiii/120e28fd89fb11e1b265 how can I get a list of users that aren't in my has_many through
[20:45:55] mices: keyword there is environment
[20:45:58] n00bDev: has joined #RubyOnRails
[20:46:36] gurnoorinder: I am happy to remove everything and make a fresh and clean install. As rbenv has messed up my RoR and i had to install it again
[20:46:41] most____: has joined #RubyOnRails
[20:47:17] most_: has joined #RubyOnRails
[20:47:34] bauerbob: has joined #RubyOnRails
[20:48:00] arup_r: craysiii: what did you ask
[20:48:08] rocLv: has joined #RubyOnRails
[20:48:12] arup_r: I am still trying to understand
[20:48:56] craysiii: https://gist.github.com/craysiii/120e28fd89fb11e1b265 has_many :users, through: :collaborators. im trying to create a method or relation that has users which are NOT collaborators
[20:48:57] bootstrappm: w = Wiki.find(some_id); collaborator_users = w.collaborators.collect {|collaborator| collaborator.users}.compact; users_not_in_through = User.all - collaborator_users
[20:48:59] bootstrappm: probably sometihng like that?
[20:49:51] craysiii: hm seems innefficient, thanks though. i guess ill have to work on this one mroe
[20:49:53] bootstrappm: make sure your Collaborator class has a has_many :users relation also
[20:50:04] arup_r: bootstrappm: ok. User.where.not(id: w.users.ids)
[20:50:11] bauerbob: hi. after doing a ???bundle update??? i had to change ???mysql2??? to ???mysql??? since the gem has been renamed (i think). but now i get ???incompatible character encodings: UTF-8 and ASCII-8BIT??? errors. what else do i have to do?
[20:50:23] cnk: has joined #RubyOnRails
[20:50:24] arBmind: has joined #RubyOnRails
[20:50:41] arup_r: craysiii: Try what I said
[20:50:41] n1lo: has joined #RubyOnRails
[20:50:42] craysiii: arup_r can you past a list like that?
[20:51:01] arup_r: Yes. I am doing `NOT IN`
[20:51:41] arup_r: gurnoorinder: Hi
[20:51:46] elaptics: bauerbob: that seems odd. mysql and mysql2 are two different gems, one is not the other renamed. Why did you change from mysql2 to mysql after a bundle update?
[20:51:53] arup_r: why did you ping me ? :D
[20:52:28] bauerbob: elaptics: ???cause there was an error like ???mysql2 gem could not be loaded???
[20:52:59] arup_r: bootstrappm: Try `puts` and see if it prints .. logger.debug should work.
[20:53:04] bauerbob: elaptics: i googled it and the SO thread i found gave me that solution
[20:53:08] elaptics: bauerbob: what version of rails, etc?
[20:53:59] elaptics: bauerbob: why were you running bundle update in the first place?
[20:54:12] bootstrappm: arup_r: figured it out, test environment not dev, looking at the wrong log file
[20:55:02] hnanon: has joined #RubyOnRails
[20:55:18] bauerbob: elaptics: cause i try to keep everything up to date
[20:55:37] craysiii: arup_r that works
[20:55:39] elaptics: bauerbob: from what version?
[20:55:43] baweaver: ping: sendto: No route to host
[20:55:44] craysiii: User.where.not(id: self.users).where.not(id: self.user)
[20:56:02] simkessy: has joined #RubyOnRails
[20:56:15] hnanon: I keep getting the following error:
[20:56:17] hnanon: Association named 'essays' was not found on Review; perhaps you misspelled it?
[20:56:41] hnanon: This is what I have in my show action for users:
[20:56:43] hnanon: @e1rr = @user.reviews.joins(:essays).where(essays: { number: 0, stage: 0 })
[20:56:54] arup_r: craysiii: :)
[20:56:57] elaptics: bauerbob: just try resetting to before you tried updating all the things and just "bundle update rails" only
[20:56:58] hnanon: User has_many reviews through essays
[20:57:08] hnanon: Review belongs_to User
[20:57:14] elaptics: bauerbob: and just do a more controlled update
[20:57:14] tfitts: has joined #RubyOnRails
[20:57:45] nya: has joined #RubyOnRails
[20:59:16] siemprefresco: has joined #RubyOnRails
[20:59:17] manfrin_: has joined #RubyOnRails
[20:59:20] gurnoorinder: has joined #RubyOnRails
[21:00:08] hnanon: My view: <% @e1rr.each do |review| %> <%= review.thesis %> <% end %>
[21:00:16] smathy: hnanon, sorry, I gave you that query thinking a review had many essays.
[21:00:32] smathy: hnanon, should be just: @user.reviews.where( number: 0, stage: 0 )
[21:00:52] michaeldeol: has joined #RubyOnRails
[21:00:59] Pupeno: has joined #RubyOnRails
[21:01:04] hnanon: smathy: And that will retrieve essays with those conditions?
[21:02:15] hnanon: SQLite3::SQLException: no such column: reviews.number: SELECT "reviews".* FROM "reviews" INNER JOIN "essays" ON "reviews"."essay_id" = "essays"."id" WHERE "essays"."user_id" = ? AND "reviews"."number" = 0 AND "reviews"."stage" = 0
[21:02:25] jenrzzz_: has joined #RubyOnRails
[21:02:34] mices: smathy: did you look at my http.conf and the error
[21:03:31] meoblast001: has joined #RubyOnRails
[21:03:38] tubbo: hnanon: what kind of object are you looking to retrieve, essays or reviews?
[21:04:28] tubbo: i misread your question then :)
[21:04:49] hnanon: Reviews written by a user for a specific essay.
[21:05:13] tubbo: hnanon: i think you want @user.reviews.joins(:essays).where(essay: { number: 0, stage: 0 })
[21:05:19] tubbo: not even usre if you need the joins() there
[21:05:22] arup_r: Guys, was my comment wrong? http://stackoverflow.com/questions/32573664/non-unique-ids-when-creating-form-elements-for-the-same-name-in-rails?noredirect=1#comment53002733_32573664
[21:05:27] Lightsword: has joined #RubyOnRails
[21:05:31] smathy: hnanon, reviews with those conditions.
[21:05:35] tubbo: i think rails figures out it needs to do a JOIN by the fact that you're passing a hash into essay:
[21:05:38] arup_r: Can we have a input text filed as an array of texts
[21:06:09] hnanon: smathy: I need reviews for essays that have number = 0 and stage = 0.
[21:06:37] smathy: tubbo, that'll look for the essays association on Review.
[21:07:02] tubbo: yeah, doesn't a review belong_to an essay?
[21:07:32] tubbo: it doesn't have_many essays, it belongs_to an essay, so the association is singular
[21:07:35] tubbo: you just spelled it wrong
[21:08:07] hnanon: @user.reviews.where( number: 0, stage: 0 ) won't work since it'll look for a nonexistent number and stage columns for reviews. Those columns exist for essays.
[21:08:16] smathy: tubbo, I think we both did :)
[21:08:35] smathy: hnanon, actually you changed the misspelling from the joins (where it should be singular) to the where (where it should be plural) :)
[21:08:53] smathy: hnanon, @user.reviews.joins(:essay).where( essays: { number: 0, stage: 0 })
[21:09:18] mices: what <Directory> options do i need in order for a rails app to work
[21:09:36] bruno-: has joined #RubyOnRails
[21:09:55] mices: o wait it doesn't make a difference because the native host returns 403 too and that's not a rails app
[21:10:47] smathy: arup_r, seems to me that the OP is wanting to input two different chunks of text - so having dropdowns isn't really going to work for them.
[21:10:52] havenwood: I know it's probably a long shot, but if anyone is interested in a salary, in-person Rails dev job in LA please ping me.
[21:11:13] mices: will passenger ignore non-rails hosts in my httpd.conf?
[21:11:16] arup_r: smathy: We can have text fields also as an array
[21:11:16] smathy: arup_r, and, you can have multiple fields named the same thing, and if they're suffixed with [] as the OP wrote, then Rails will turn them into an array in `params`
[21:11:40] arup_r: well cool. I was not aware of.. thanks smathy
[21:11:41] hnanon: smathy: You're right. Not sure how I changed that.
[21:11:48] hnanon: It's working now. Thank you
[21:11:57] momomomomo_: has joined #RubyOnRails
[21:11:57] tfitts: when using Puma in development mode does it recompile assets every time you make a change?
[21:12:02] smathy: hnanon, sorry, actually I meant to direct that comment to tubbo :)
[21:12:16] smathy: hnanon, you just copied what I originally wrote, which was wrong :(
[21:12:17] rhizome: mices: do you know about PassengerEnabled?
[21:12:26] smathy: arup_r, np.
[21:12:31] tfitts: Sometimes it seems like I can make a change and it will still load almost instantly and other times it seems like it takes 30+ seconds
[21:12:33] hnanon: What's the "try" syntax to use instead of a ternary, in case a value doesn't exist.
[21:12:37] mices: rhizome: not
[21:12:54] ekem: ive switched to uwsgi, thats also an option perhaps instead of passenger, its pretty simple
[21:12:59] bricker: hnanon: thing.try(:method)
[21:13:22] bauerbob: elaptics: thank you, i found the cause of the problem now: mysql2 0.4.0 isn???t compatible with rails 4.2.4, i had to go back to mysql2 0.3.20
[21:13:46] ekem: bauerbob, that just seems to be a problem on ubuntu
[21:13:48] rhizome: wow, passenger's doc UX is for the garbage can
[21:13:50] bricker: ekem: you're using wsgi with rails?
[21:13:59] bauerbob: ekem: no, i???m on os x
[21:14:13] ekem: yeah wierd i saw that same problem on ubuntu
[21:14:16] ekem: but debian 8 no problem
[21:14:31] ekem: bricker, yeah i am running uwsgi with the emperor flag atm
[21:14:42] ekem: and systemd or upstart to daemonize it
[21:14:47] hnanon: bricker: Thanks.
[21:15:27] ekem: bauerbob, good to know its not just on that one system, i was going to try and add to the stack overflow post that exists about it
[21:15:45] ekem: i was so confused when it worked on debian with 0.4.0 and not ubuntu
[21:15:46] moeabdol: has joined #RubyOnRails
[21:16:56] bauerbob: that one? http://stackoverflow.com/questions/22932282/gemloaderror-specified-mysql2-for-database-adapter-but-the-gem-is-not-loade
[21:17:02] GsUTndmmPGd8SbnL: has joined #RubyOnRails
[21:17:22] gurnoorinder: I installed ruby on rails last year. I am pretty sure i did not use Rbenv. But recently I was taking a tutorial and i installed Rbenv as well as the tutorial asked me to do. I have RVM and RBENV and Homebrew all installed. what my concern is that having both RVM and RBENV a good idea or not? And can they both in some way mess up the environment.? if i want to remove one which one should i remove? will the removal also affect Ruby and Rails installat
[21:17:30] elaptics: bauerbob: interesting - but perfect example of why it's better not to run a bare bundle update and do it selectively instead
[21:17:53] fryguy: gurnoorinder: having both involved will almost certainly cause problems. I think the majority of people here prefer rbenv nowadays
[21:17:56] rhizome: gurnoorinder: i would pick one or the other
[21:18:23] smathy: gurnoorinder, as to removing - probably best to remove them both, and start again with one or the other.
[21:18:41] gurnoorinder: and if i just remove RVM and rbenv will it also remove ruby and rails?
[21:18:57] elaptics: gurnoorinder: your original system ruby will still be intact
[21:19:06] havenwood: fryguy: chruby! :D
[21:19:07] hnanon: smathy, tubbo: Thanks again. Gotta run for now.
[21:19:07] infoget: has joined #RubyOnRails
[21:19:16] smathy: hnanon, you're welcome.
[21:19:18] elaptics: gurnoorinder: rails is just a gem and so it depends on how you installed it
[21:19:35] elaptics: gurnoorinder: once you have sorted out your ruby then just reinstall the rails gem
[21:19:50] havenwood: gurnoorinder: You could use the brew Ruby alongside RVM or rbenv but don't have both RVM and rbenv.
[21:19:50] elaptics: +1 to chruby :)
[21:19:52] gurnoorinder: can you guide me to removing everything? rbenv, rvm, homebrew, ruby and rails
[21:19:57] smathy: gurnoorinder, ...but it doesn't matter because your new ruby from rvm or rbenv will use all new gems.
[21:20:11] cnk: I don't think you want ot remove homebrew
[21:20:15] BlackCoyote: has joined #RubyOnRails
[21:20:16] smathy: gurnoorinder, no need to remove anything other than rbenv and rvm.
[21:20:16] smathy: Google is your friend.
[21:20:21] havenwood: gurnoorinder: brew uninstall ruby
[21:20:26] havenwood: gurnoorinder: rvm implode
[21:20:39] gurnoorinder: thank you guys
[21:20:40] centrx: has joined #RubyOnRails
[21:20:49] havenwood: gurnoorinder: brew uninstall rbenv
[21:20:51] havenwood: gurnoorinder: rm -rf ~/.rbenv
[21:21:05] gurnoorinder: thanks Havenwood
[21:21:05] havenwood: gurnoorinder: rm -rf ~/.rvm
[21:21:17] havenwood: gurnoorinder: brew install chruby ruby-install
[21:22:01] gurnoorinder: i did rvm implode
[21:22:30] gurnoorinder: it still shows rvm 1.26.11 ???..
[21:22:45] havenwood: gurnoorinder: You've already sourced the rvm function. Turn it off and back on again.
[21:22:51] havenwood: gurnoorinder: Restart your shell.
[21:23:27] havenwood: gurnoorinder: Then you'll probably want to search your dotfiles and remove any rbenv cruft.
[21:23:29] gurnoorinder: now should i also remove rbenv and reinstall it again?
[21:24:46] rubyonrails637: has joined #RubyOnRails
[21:25:07] simkessy: Do anyone know of a good tutorial on jquery-file-upload? I need to manage images (paperclip/s3) for a resource
[21:25:15] tfitts: anyone use puma for development mode? I'm trying to figure out how to speed up reloads after making changes. It is painful waiting 30 seconds+ after making a change.
[21:25:29] elaptics: tfitts: using it right now
[21:25:30] FailBit: tfitts: sounds like you have a big gemfile
[21:25:41] simkessy: I use puma with zeus, incredibly fast
[21:25:53] tfitts: FailBit: do you use spring or zeus?
[21:25:57] rakm: has joined #RubyOnRails
[21:26:25] FailBit: neither because I have a small gemfile
[21:26:25] most_: has joined #RubyOnRails
[21:26:27] tubbo: i use spring and guard to help with that
[21:26:29] FailBit: only 72 deps total
[21:26:45] havenwood: gurnoorinder: I'd recommend ruby-install with chruby. You'd just `brew install chruby ruby-install`, add the chruby source lines to your dotfile and: ruby-install ruby 2.2.3 --sha256 c745cb98b29127d7f19f1bf9e0a63c384736f4d303b83c4f4bda3c2ee3c5e41f
[21:26:46] gravity_pope: has joined #RubyOnRails
[21:26:56] tfitts: simkessy: is your gemfile very big?
[21:27:04] havenwood: gurnoorinder: Personally I'd fall back on RVM before rbenv.
[21:27:17] elaptics: FailBit: it's sad that 72 dependencies is considered small
[21:27:26] FailBit: I know right
[21:27:28] simkessy: tfitts: I don't know what is considered big but I have around 30 gems
[21:27:29] tfitts: How do you get the total # of dependencies?
[21:27:35] tubbo: bundler tells you
[21:27:43] gurnoorinder: @havenwood y?
[21:27:49] havenwood: gurnoorinder: I don't like how ruby-build (the default installer for rbenv) ships its own openssl package instead of using the package manager's.
[21:28:00] simkessy: tfitts: Bundle complete! 64 Gemfile dependencies, 192 gems now installed.
[21:28:08] simkessy: is that big
[21:28:10] elaptics: undle complete! 43 Gemfile dependencies, 110 gems now installed.
[21:28:12] havenwood: gurnoorinder: Also I'm a maintainer of chruby, ruby-install and RVM but don't touch rbenv.
[21:28:27] redondo: has joined #RubyOnRails
[21:28:38] havenwood: gurnoorinder: I don't want to maintain a garden of shis.
[21:28:48] gurnoorinder: @havenwood i will give it a try
[21:29:00] manfrin: has joined #RubyOnRails
[21:29:01] most_: has joined #RubyOnRails
[21:29:12] tfitts: mine just says Your bundle is complete! doesn't give the number.
[21:29:21] gurnoorinder: @havenwood: what happens to ruby and rails versions that i installed using RVM or Rbenv once i remove both?
[21:29:32] FailBit: tfitts: type 'bundle' at the cmdline?
[21:29:40] most_: am i subject to xss if i use html_safe to display user output?
[21:29:40] simkessy: either way, using Zeus Puma boots up really fast in dev
[21:30:02] FailBit: most_: yes
[21:30:08] djbkd: has joined #RubyOnRails
[21:30:09] tfitts: I did: Your bundle is complete!
[21:30:09] tfitts: Use `bundle show [gemname]` to see where a bundled gem is installed.
[21:30:18] FailBit: what version of ruby do you have
[21:30:20] elaptics: tfitts: what version of bundler?
[21:30:24] FailBit: and what version of bundler
[21:30:34] tfitts: 2.1.7 on ruby
[21:30:52] momomomomo: has joined #RubyOnRails
[21:30:54] elaptics: you could try updating bundler
[21:31:04] elaptics: I'm on 1.10.6
[21:31:08] FailBit: bundler is at 1.10.6
[21:31:12] FailBit: ninja'd again
[21:31:25] elaptics: ACTION karate-chops FailBit 
[21:31:40] most_: @FailBit what is the proper way to allow users to use html tags? I have a form that uses a js wysiwyg editor and I want to display the output
[21:31:51] FailBit: most_: markdown is nice
[21:32:48] tubbo: most_: there's a `sanitize` method in rails that you can use if you really want to use html tags, but markdown is pretty easy to grasp too
[21:32:51] tubbo: kinda depends on your target audience
[21:32:52] elaptics: most_: I assume that you only want them to have limited abilities?
[21:33:10] most_: markdown dosn't compare to what im using, http://quilljs.com/
[21:33:39] smathy: ...it does on the security front.
[21:34:45] havenwood: has joined #RubyOnRails
[21:34:49] elaptics: most_: what do you need to allow your users to actually do?
[21:35:21] most_: @elaptics submit an article with their own personal formatting like making text bold and separating paragraphs
[21:35:25] elaptics: there are wswiwgy editors for markdown or other formats that are safer than allowing raw html tags
[21:35:33] cnk: most_: your WYSIWYG editor probably has allowed tag filtering
[21:35:50] FailBit: yeah but that won't stop people from messing with it
[21:35:56] cnk: then I usually make my sanitize options match what I allow thorugh my TinyMCE editor
[21:35:57] FailBit: you absolutely have to do serverside filtering
[21:36:02] most_: @cnk i believe it does but i feel like a proper hacker could still insert malicious code someway if i use html_Safe
[21:36:16] cnk: right - so don't use sanitize
[21:36:21] cnk: belt and braces
[21:36:22] most_: so i need to sanitize each allowable tag
[21:36:25] most_: or whitelist right?
[21:36:39] cnk: right - both in rails sanitize and in the JS
[21:37:54] lele: has joined #RubyOnRails
[21:38:27] jenrzzz: has joined #RubyOnRails
[21:39:21] gurnoorinder: hello everyone. I just removed RVM from my Mac, will it any way affect ruby or rails versions?
[21:39:36] gurnoorinder: i had both rbenv and rvm
[21:39:39] havenwood: gurnoorinder: If you were using RVM for Ruby and Rails, yes.
[21:39:53] havenwood: gurnoorinder: If you weren't using an RVM Ruby, no.
[21:39:55] gurnoorinder: i was initally
[21:40:00] most_: thanks for the help guys
[21:40:38] gurnoorinder: yes. It is giving me an error now
[21:41:00] GsUTndmmPGd8SbnL: rails 5 is still 'not soon', right?
[21:41:08] SteenJobs: has joined #RubyOnRails
[21:41:30] most_: has left #RubyOnRails: ()
[21:41:30] momomomomo_: has joined #RubyOnRails
[21:41:35] elaptics: GsUTndmmPGd8SbnL: it should be soon-ish
[21:42:21] GsUTndmmPGd8SbnL: elaptics: but like alpha soon rather than release soon?
[21:42:36] tubbo: GsUTndmmPGd8SbnL: i would reserve judgment until betas start coming out
[21:43:20] elaptics: well betas are anticipated in the not too distant future. Last I heard they were targeting August/September for beta
[21:43:29] sarink: has joined #RubyOnRails
[21:43:40] elaptics: though basically, it'll be ready when it's ready
[21:44:22] sonofdirt: has joined #RubyOnRails
[21:44:26] tubbo: yeah i just don't typically consider a rails release "soon" until i start seeing betas and RCs get released
[21:44:26] GsUTndmmPGd8SbnL: sure, but if we were in beta stage i'd be happy starting a new app on 5 whereas probably not right now :) thanks
[21:44:49] elaptics: depends how long you anticipate your dev cycle to be
[21:45:17] GsUTndmmPGd8SbnL: and i'm never sure whether there are weird leftovers from the pre-semver days of `edge`
[21:45:50] sonofdirt: has joined #RubyOnRails
[21:46:37] Mattx: has joined #RubyOnRails
[21:46:59] Mattx: There's something wrong with my rails. After the last bundle install all images assets are gone
[21:47:09] Mattx: image_tag "foo" now returns "images/foo"
[21:47:15] Mattx: instead of "assets/foo.png" or something
[21:47:24] Mattx: what could be the problem?
[21:48:24] Mattx: btw, I'm on develop environment (rails s)
[21:49:33] Lytol: has joined #RubyOnRails
[21:50:01] shinnya: has joined #RubyOnRails
[21:50:12] gurnoorinder: how do i check how many versions of ruby do i have installed? same for rails?
[21:50:12] davidheward: has joined #RubyOnRails
[21:50:45] smathy: Mattx, stop spring (run `spring stop` in your shell)
[21:51:02] smathy: Mattx, (then restart your `rails s` server)
[21:51:19] smathy: Mattx, if that doesn't work, check your `public` folder, do you have anything in there that could be interfering with these assets?
[21:53:15] mices: if my site's home page is not in a directory called public then i shouldn't take the path to public literally in the stuff that i'm reading? cause all i get is 403 forbidden because there's no index file in the directory i thought passenger was gonna rewrite it
[21:53:19] mices: which is it?
[21:53:21] lwu__: has joined #RubyOnRails
[21:53:27] cameronmalek_: has joined #RubyOnRails
[21:53:49] GsUTndmmPGd8SbnL: tangentially related to rails5; what version of active_model_serializers are people using in general just now? 0.8 is old, 0.9 seems to be abandoned, 0.10 isn't quite stable yet???
[21:54:10] mices: does passenger rewrite the public directory to the place of the real html files
[21:54:46] x-light: GsUTndmmPGd8SbnL: active_model_serializers-0.9.3
[21:54:57] FailBit: mices: you need to have a root_to in your routes
[21:55:23] x-light: GsUTndmmPGd8SbnL: and have had no problems, but I'm not exactly requiring taxing things of it.
[21:55:34] rromanch_: has joined #RubyOnRails
[21:56:50] mrchris: has joined #RubyOnRails
[21:57:29] mices: FailBit: how did it get omitted?
[21:57:51] Mattx: smathy, what is spring? I did what you said and image_tag still returns "images/foo". why is it not using "assets/foo"?
[21:59:06] smathy: mices, the passenger docs have become a lot more opaque recently, which is a shame. But IIRC, passenger expects your rails app to be one level above the doc root of the vhsot.
[21:59:11] banister: has joined #RubyOnRails
[21:59:18] smathy: mices, doesn't matter what its name is.
[21:59:28] arashb: has joined #RubyOnRails
[21:59:56] smathy: mices, passenger won't rewrite anything, but if your Rails app doesn't have a `root` setting in `config/routes.rb` then a directory index will be expected in your doc root.
[22:00:14] jobewan: has joined #RubyOnRails
[22:00:31] smathy: [15:51:18] smathy: Mattx, if that doesn't work, check your `public` folder, do you have anything in there that could be interfering with these assets?
[22:01:08] gravity_pope: has joined #RubyOnRails
[22:01:09] Mattx: I forgot to mention. the public dir is almost empty, just a few default error htmls and icons
[22:02:52] smathy: Mattx, not sure, sorry.
[22:03:48] platosha: has joined #RubyOnRails
[22:03:54] Fire1o6: has joined #RubyOnRails
[22:03:54] code1o6: has joined #RubyOnRails
[22:04:59] nettoweb: has joined #RubyOnRails
[22:06:41] baweaver: has joined #RubyOnRails
[22:08:37] mices: smathy: root is set to the controllers#index
[22:08:53] FailBit: do you have a ControllersController
[22:08:58] mices: i put the s because controllers end with a s
[22:09:50] mices: in this case the actual line is "root press_releases#index"
[22:10:02] mices: there's nothing in public directory that's worth a sh*t
[22:10:06] drale2k: has joined #RubyOnRails
[22:10:14] rhizome: where are we at in this ongoing nightmare?
[22:10:18] smathy: mices, actually copy and paste the actual line from your actual config/routes.rb because the above is also wrong.
[22:10:48] mices: root 'press_releases#index'
[22:10:55] sonofdirt: has joined #RubyOnRails
[22:10:56] smathy: mices, ok, and that works in dev?
[22:11:07] mices: with webrick, not apache
[22:11:08] Mattx: any idea why image_tag is returning "image/..." instead "assets/..." in develop environment?
[22:11:16] smathy: mices, yep.
[22:11:22] smathy: mices, ok, so gist your vhost conf.
[22:11:33] rhizome: Mattx: did you precompile, is there a public/assets directory?
[22:11:38] emeka: has joined #RubyOnRails
[22:11:48] Mattx: no, there is no public/assets. and I didn't precompile
[22:12:22] Mattx: do I have to set anything in config/environments/development? or config/initializers/asets?
[22:12:28] Mattx: I may be missing something
[22:12:43] manzo: has left #RubyOnRails: ()
[22:12:50] mices: smathy: there is no vhosts conf file
[22:13:38] mices: i put the VirtualHost in httpd.conf
[22:14:17] otacon-: has joined #RubyOnRails
[22:14:36] smathy: I asked for "vhost conf", as in "your virtual host configuration" - wherever the fuck it is.
[22:15:06] baweaver: has joined #RubyOnRails
[22:15:48] uris: has joined #RubyOnRails
[22:16:37] pulgalipe: has joined #RubyOnRails
[22:17:51] mices: smathy: https://gist.github.com/anonymous/0a1fb11876b9f81a12e9
[22:18:41] s2013: has joined #RubyOnRails
[22:21:00] dideler: has joined #RubyOnRails
[22:21:08] JoshuaPaling: has joined #RubyOnRails
[22:21:08] Pupeno: has joined #RubyOnRails
[22:21:34] gurnoorinder: has left #RubyOnRails: ()
[22:22:44] smathy: mices, and show me the rest of the passenger configuration.
[22:22:54] benlieb: has joined #RubyOnRails
[22:26:04] mices: why is it index and not show
[22:27:07] s2013: has joined #RubyOnRails
[22:28:24] smathy: mices, you're asking us why you set the root of your site to one thing and not another?
[22:28:29] workmad3: has joined #RubyOnRails
[22:28:58] mices: i thought they were the same
[22:29:05] mices: show is only 1 row?
[22:29:35] mices: smathy: https://gist.github.com/anonymous/13c247f2cc4ea4f07b8e
[22:30:07] mikecmpbll: has joined #RubyOnRails
[22:31:31] herbst: has joined #RubyOnRails
[22:31:58] davidheward: has joined #RubyOnRails
[22:33:08] smathy: mices, and if you run apachectl -M (or maybe apache2ctl -M) you see the passenger module loaded?
[22:33:36] smathy: (use sudo if you need to)
[22:34:30] Lightsword: has joined #RubyOnRails
[22:36:37] mices: does passenger-apache2 module support apache 2.4 ?
[22:37:00] Jasaka: has joined #RubyOnRails
[22:40:53] Radar: GOOD MORNING
[22:41:06] Radar: I'm going to be on a plane for pretty much the next 24 hours
[22:41:16] Radar: pleased to see there's been no more trolls overnight
[22:41:18] Radar: mices: !try
[22:41:18] helpa: mices: Why don't you try it and find out for yourself?
[22:42:58] jobewan: has joined #RubyOnRails
[22:43:48] mary5030_: has joined #RubyOnRails
[22:45:38] neanderslob: hi all, when I generate a model with the command line, is here a convenient way to set a default value for its columns? something like rails g model MyModel my_column:integer default =>0
[22:46:04] neanderslob: I know I can set this by manually editing the corresponding migration file, I'm just wondering if there's a command shortcut
[22:46:25] rhizome: neanderslob: no
[22:46:33] unholycrab: has joined #RubyOnRails
[22:47:28] neanderslob: rhizome: hah darn, alright thanks anyway
[22:47:45] smathy: mices, you're impossible to help. Best of luck.
[22:48:01] manfrin: has joined #RubyOnRails
[22:48:14] iamse7en: has joined #RubyOnRails
[22:52:00] jezeniel: has joined #RubyOnRails
[22:52:30] jezeniel: Will rails release the lock within with_lock block if i raised an exception?
[22:53:05] rakm: has joined #RubyOnRails
[22:54:09] ledestin: has joined #RubyOnRails
[22:54:16] mwlang: has joined #RubyOnRails
[22:54:55] mwlang: Just starting a fresh RoR4 project and so I noticed something I probably wouldn???t normally???is it normal to see this many queries on the current user_sessions table? https://gist.github.com/mwlang/683b7a20e4129701dd62
[22:55:03] mwlang: This is just a snapshot of one request.
[22:55:13] givanse: has joined #RubyOnRails
[22:56:19] mices: smathy; yes, sorry i was reinstalling passenger and the apache module, it shows in the list like this
[22:56:21] mices: passenger_module (shared)
[22:56:27] sarink: has joined #RubyOnRails
[22:58:54] mwlang: nevermind, it???s coming off the Order model???s association with user_sessions table???not Rails??? sessions management feature. *doh!* Maybe time to retire for the evening...
[23:01:21] pwnd_nsfw: has joined #RubyOnRails
[23:02:01] mary5030: has joined #RubyOnRails
[23:02:42] johnflux: has joined #RubyOnRails
[23:03:26] charliesome: has joined #RubyOnRails
[23:04:07] mices: does nginx do the same thing throw the whole server out if a virtual host if misconfigured?
[23:04:20] benlieb: has joined #RubyOnRails
[23:04:21] n1lo: has joined #RubyOnRails
[23:05:03] mices: smathy: are you still with me on this?
[23:06:06] SuMo_D: has joined #RubyOnRails
[23:08:32] havenwood: mices: Both Nginx and Apache require the configuration file be correct. The new Passenger docs seem quite good. The #passenger channel is helpful but it takes a while for a response.
[23:09:31] havenwood: mices: If you aren't familiar with Nginx or Apache confs they are a pain.
[23:11:54] robbyoconnor: has joined #RubyOnRails
[23:12:12] wethu: has joined #RubyOnRails
[23:12:13] Lightsword: has joined #RubyOnRails
[23:12:37] arBmind1: has joined #RubyOnRails
[23:13:07] havenwood: mices: There's an #httpd channel as well.
[23:13:25] mices: he same is true for mod_rails and mod_rack, which give Apache the ability to run Ruby on Rails
[23:14:38] mices: that might be the problem
[23:14:54] mices: they're not shown in the output of apachectl -M
[23:16:53] dopamean_: has joined #RubyOnRails
[23:18:24] havenwood: mices: Just to be clear, Passenger (a.k.a. mod_rails) has an Apache module option (along with an Nginx module or standalone options). Did you run `passenger-install-apache2-module` from the docs then follow instructions carefully?
[23:18:58] iamse7en: has joined #RubyOnRails
[23:21:30] havenwood: mices: If you're having Apache configuration issues the #httpd channel is better and for Passenger specifics you'll probably get the best help in #passenger or through paid support.
[23:21:32] mices: but i think i just found the problem
[23:21:41] mices: i haven't tried it yet but i'm sure this is it
[23:21:47] havenwood: mices: Good luck!
[23:21:49] mices: mod_rewrite is commented out
[23:21:54] mices: that has to be loaded
[23:22:04] havenwood: *Carefully* follow the docs. ;)
[23:25:34] rickmasta: has joined #RubyOnRails
[23:28:41] iamse7en: has joined #RubyOnRails
[23:29:28] mices: havenwood: yea, many times i ran passenger-install-apache2-module
[23:30:01] wethu: has joined #RubyOnRails
[23:30:28] one_zero: has joined #RubyOnRails
[23:33:54] mices: i might wanna try installing rails and passenger from ports
[23:34:59] luckyruby: has joined #RubyOnRails
[23:35:40] darrencauthon: has joined #RubyOnRails
[23:35:50] dnewkerk: has joined #RubyOnRails
[23:36:27] rromanch_: has joined #RubyOnRails
[23:36:41] davidheward: has joined #RubyOnRails
[23:39:43] JimmyNeutron: has joined #RubyOnRails
[23:40:11] navo: has joined #RubyOnRails
[23:40:47] brunoalano: has joined #RubyOnRails
[23:41:24] quazimodo: has joined #RubyOnRails
[23:41:35] brunoalano: Hey, it's a good tip on a multitenancy application keep the "tenant_id" or "company_id" fields?
[23:42:10] rocLv: has joined #RubyOnRails
[23:42:38] Ropeney: has joined #RubyOnRails
[23:43:32] rromanch_: has joined #RubyOnRails
[23:44:40] darwingr: has joined #RubyOnRails
[23:46:16] K3VA: has joined #RubyOnRails
[23:48:40] rromanch_: has joined #RubyOnRails
[23:48:55] andywww: has joined #RubyOnRails
[23:49:24] jgt1: has joined #RubyOnRails
[23:49:45] benlieb: has joined #RubyOnRails
[23:50:02] simkessy: Hey, if anyone could take a look at this: https://gist.github.com/simkessy/7786eab21710fcbd2e76
[23:50:24] simkessy: I'm trying to figure out how to style the last image differently from the rest on a .each loop
[23:50:55] simkessy: to say something like "8 more images"
[23:54:01] bootstrappm: has joined #RubyOnRails
[23:54:29] darwingr: has joined #RubyOnRails
[23:55:11] K3VA: has left #RubyOnRails: ()
[23:56:19] pulgalipe: has joined #RubyOnRails
[23:57:17] baweaver: has joined #RubyOnRails
[23:58:01] baweaver: More of a matter of theory than anything, but what are peoples views on permissions systems? Do you find yourselves outgrowing them quickly or hacking them to suit, or is that a non-issue?
[23:58:12] ereslibre: has joined #RubyOnRails
[23:58:12] ereslibre: has joined #RubyOnRails
[23:58:28] baweaver: I've heard CanCanCan has some issues in that realm.
[23:58:47] baweaver: Starting to do research around those lines, would prefer not to roll my own unless absolutely necessary.
[23:59:39] FailBit: I'm using CanCanCan
[23:59:45] FailBit: it's pretty dead simple