« Back to channel list

#RubyOnRails - 15 March 2016

« Back 1 day Forward 1 day »
[00:00:33] ur5us: has joined #RubyOnRails
[00:01:25] s2013: has joined #RubyOnRails
[00:01:55] mdw: has joined #RubyOnRails
[00:02:57] uglybandersnatch: has joined #RubyOnRails
[00:04:59] Ropeney: has joined #RubyOnRails
[00:07:43] Kamuela: has joined #RubyOnRails
[00:08:11] ziyadb: has joined #RubyOnRails
[00:08:13] Kamuela: filenames and directories should be - or _ for spaces?
[00:08:22] Radar: Kamuela: !flamewar
[00:08:28] Radar: Hm I forgot the tip.
[00:08:41] Radar: Kamuela: In what context/
[00:08:50] Kamuela: no I didn't realize it was contentious, I thought there was a convention that broke other things possibly
[00:09:38] Kamuela: the context of the rails project itself and its contained directories
[00:10:07] flappynerd: Kamuela, I've never seen - in file names honestly
[00:10:11] Radar: Kamuela: typically underscores.
[00:10:13] flappynerd: css selectors sure
[00:10:24] Kamuela: flappynerd, Radar thank you
[00:10:48] flappynerd: Kamuela, - is too likely to have other semantic meanings IMO, like "minus" etc, wheras _ is typically considered as having no more or less meaning than A-Z
[00:11:36] aloneintheworld: it’s being really hard for me to learn React as there’re very few examples of it mixed with Coffeescript, that i understand is what RoR offers by default. Making a switch to JSX makes sense in a RoR environment ?
[00:12:00] sevenseacat: lolcoffeescript
[00:12:04] juanca_: has joined #RubyOnRails
[00:12:34] aloneintheworld: i don’t get why everybody laugh at Coffeescript, yet it’s what RoR offers by default
[00:12:46] RoRSupervisor: ACTION likes coffescript
[00:12:50] sevenseacat: because its pointless and crap. imo.
[00:13:02] Radar: Yeah the trend is definitely moving away from there
[00:13:07] aloneintheworld: the thing is.. all of the beauty from RoR.. is getting pretty ugly with what i’ve done with React
[00:13:13] aloneintheworld: with react+coffeescript
[00:13:39] sevenseacat: as horrible a language as js is, i prefer it in its native form
[00:13:57] SteenJobs: es6 is looking like it’s got some cool stuff
[00:14:04] flappynerd: js is awesome
[00:14:07] flappynerd: es6 is even better
[00:14:12] flappynerd: aloneintheworld, /join ##javascript
[00:14:14] flappynerd: don't listen to the FUD
[00:14:27] flappynerd: aloneintheworld, also, don't use coffeescript, especially with react, use ES6 with react
[00:14:31] SteenJobs: i just feel like the fact that transpiler’s exist is odd
[00:14:39] Radar: es2018 is where its at now
[00:14:47] flashpoint9: has joined #RubyOnRails
[00:14:52] flappynerd: yes, feelings are so objective
[00:15:00] flappynerd: SteenJobs, that's not the fault of JS, that's the fault of browsers
[00:15:09] flappynerd: and it's not odd, it's great
[00:15:40] SteenJobs: just the concept of different iterations of the same language in the way JS is is interesting to me
[00:16:08] aloneintheworld: so migrating my, small yet ugly code, from coffeescript to ES6 makes sense
[00:16:17] SteenJobs: although i have little patience for JS, using a statically typed version makes it much more bearable
[00:16:30] SteenJobs: like typescript
[00:16:51] SteenJobs: flappynerd: the debugging nightmare is def mitigated when statically typed
[00:17:48] flappynerd: what debugging nightmare?
[00:17:52] flappynerd: I don't have an issue with debugging JS
[00:17:56] flappynerd: chrome dev tools is great
[00:18:04] flappynerd: I think you're Doing It Wrong (TM)
[00:18:06] SteenJobs: i mean specifically with type errors
[00:18:24] SteenJobs: not saying it happens all the time
[00:18:31] SteenJobs: just when i run into a type error, it can be a pain to fix
[00:19:02] zave: has joined #RubyOnRails
[00:19:11] weaksauce: javascript is a sloppy language.
[00:19:34] SteenJobs: the lack of higher level iterating is also a bit annoying
[00:19:43] SteenJobs: but they have a for..of loop in es6 which is an improvement
[00:20:11] kies: has joined #RubyOnRails
[00:21:42] mary5030: has joined #RubyOnRails
[00:21:54] Arcaire: Quick, everyone
[00:21:59] Arcaire: it's time for our daily anti-javascript circlejerk
[00:22:03] Arcaire: today's session is led by weaksauce
[00:22:14] Arcaire: ACTION hands the microphone to weaksauce
[00:22:25] Arcaire: Show us in the repo where the JavaScript hurt you.
[00:22:28] weaksauce: closures as a common idiom and bad programmers coding in it creating circular references and memory leaks is unfortunate.
[00:22:44] weaksauce: hurts me all the time when using the web
[00:23:15] weaksauce: not a knock on front end devs but they in general aren't that good at things like that
[00:23:23] SteenJobs: totes not a knock
[00:23:31] weaksauce: maybe it's a knock but idgaf
[00:23:47] SteenJobs: the person sitting next to me is giving me a weird stare as i almost spit out my coffee laughing
[00:24:02] SteenJobs: when does the daily anti-JS circlejerk usually take place?
[00:24:20] Arcaire: 5:30pm pacific time.
[00:24:23] Arcaire: We're a tad early today.
[00:25:57] SteenJobs: aright, thanks for clarifying. setting a daily reminder in my calendar.
[00:27:07] pawnbox: has joined #RubyOnRails
[00:29:33] GreatDanton: it's the best thing I read today
[00:31:51] weaksauce: i'll be back tomorrow for my next grievance
[00:31:55] petor: has joined #RubyOnRails
[00:32:10] weaksauce: the world according to weaksauce
[00:32:23] weaksauce: spoiler alert. it's erb
[00:36:20] dalbuschat: has joined #RubyOnRails
[00:38:00] Guest34101: has joined #RubyOnRails
[00:40:24] stannard: has joined #RubyOnRails
[00:41:19] i8igmac: rvm --implode, has told me to remove entry's that may exist in .bashrc .profile .bash_profile
[00:41:35] Radar: i8igmac: Do it.
[00:41:51] i8igmac: it seems there maybe another file some where that exist rvm
[00:42:00] i8igmac: i have already removed those 3 entrys
[00:42:01] Radar: i8igmac: Why do you say that?
[00:42:22] Radar: i8igmac: Ok, if you've removed them then you should be able to start up a new terminal window and then type "rvm" and it should say "command not found"
[00:42:35] Radar: "ruby" and "gem" should say the same thing
[00:42:42] i8igmac: oh, foudn it... i didnt think it existed .zshrc
[00:43:29] Radar: Ok, then you're now good to start that installation process.
[00:45:54] axilaris: has joined #RubyOnRails
[00:46:31] SteenJobs: has joined #RubyOnRails
[00:48:26] ruid: has joined #RubyOnRails
[00:48:38] ruid: has joined #RubyOnRails
[00:48:56] trogdor_jr: has joined #RubyOnRails
[00:49:17] ruind: has joined #RubyOnRails
[00:50:05] axilaris: hi, still struggling with my sample namespace&devise testapp https://github.com/axilaris/admin_user_devise_articles.git
[00:51:22] axilaris: im trying to get http://localhost:3000/admins/sign_in but this happen http://imgur.com/L6U1oIf
[00:51:49] axilaris: any issue with my routes https://github.com/axilaris/admin_user_devise_articles/blob/master/config/routes.rb
[00:52:09] Radar: axilaris: https://github.com/axilaris/admin_user_devise_articles/blob/master/app/controllers/application_controller.rb#L7-L12
[00:52:14] Radar: axilaris: You're not returning anything if they're an admin.
[00:52:15] helpa: Next question, please!
[00:53:26] ruid: So I need to migrate from decimal to float for a certain column. All the numbers will be of the form x.yy Do I need to specify anything with :float or can I just do 'change_column :table, :col_name, :float'
[00:53:37] ruid: The database is already populated
[00:55:02] DmitryBochkarev: has joined #RubyOnRails
[00:55:12] axilaris: thanks Radar
[00:55:52] renegadeandy: has joined #RubyOnRails
[00:56:08] renegadeandy: Hi All, Can a nginx person help me out with this question : http://stackoverflow.com/questions/36000804/wordpress-run-as-a-subdirectory-of-a-rails-app-using-nginx
[00:57:15] pawnbox: has joined #RubyOnRails
[00:57:40] flappynerd: SteenJobs, the lack of actual understanding that you have of javascript is a bit annoying
[00:58:16] lemur: has joined #RubyOnRails
[00:58:44] SteenJobs: has joined #RubyOnRails
[01:00:32] trosborn: has joined #RubyOnRails
[01:00:39] quazimodo: has joined #RubyOnRails
[01:01:14] flappynerd: also a bit embarrassing honestly, for your own sake I hope you don't ever express your gross misunderstandings of JS in job interviews for example
[01:03:05] smathy: has joined #RubyOnRails
[01:04:08] Pazician: has joined #RubyOnRails
[01:04:35] htmldrum: has joined #RubyOnRails
[01:05:05] capin: renegadeandy: why not put your wordpress app in the public dir of your rails app, and then have PHP process it?
[01:05:51] chouhoulis: has joined #RubyOnRails
[01:06:47] baweaver: has joined #RubyOnRails
[01:06:51] chouhoulis: has joined #RubyOnRails
[01:07:40] bronson: has joined #RubyOnRails
[01:07:50] renegadeandy: capin: well, its not really something i want to include in my source control ( I know i could ignore it ) but its just not that nice a way of doing it, and I also don’t know how to configure that option either
[01:09:46] capin: renegadeandy: im under the impression that things in the public folder aren't processed by ruby / rails so put it in there, and then put in a subdir like wp and add that to your .gitignore if you must
[01:10:41] axilaris: Radar: next question :) updated the code in repo. https://github.com/axilaris/admin_user_devise_articles/blob/master/app/controllers/application_controller.rb. My next question now is localhost/admins/sign_in now keeps on redirecting to localhost/admin/articles. how can i make sure i get to sign_in(if not logged in)/sign_up first
[01:10:44] renegadeandy: and then how do i get php to do something with it ? I doubt i’ll do this regardless, when what I have is very close to working but not quite
[01:12:22] capin: renegadeandy: if you already have PHP setup, on your server it should process your php files, i have a DO box which serves up RoR apps and a PHP app.
[01:14:13] axilaris: i think it actually works, because i'ved signed in
[01:14:28] capin: renegadeandy: just put a a simple phpinfo.php file in your public dir of your rails app and see if PHP on the box processes it ;)
[01:15:14] renegadeandy: capin: but i wanna know why my way isnt working!
[01:16:08] htmldrum: has joined #RubyOnRails
[01:17:12] capin: ACTION sighs
[01:18:27] exchgr`: has left #RubyOnRails: ()
[01:18:37] EXCHGR: has joined #RubyOnRails
[01:19:52] jenrzzz: has joined #RubyOnRails
[01:22:51] arBmind: has joined #RubyOnRails
[01:27:07] pawnbox: has joined #RubyOnRails
[01:28:24] juanca_: has joined #RubyOnRails
[01:29:50] juanca_: has joined #RubyOnRails
[01:33:30] clorisu: has joined #RubyOnRails
[01:35:13] clorisu: when i created a new rails project, it created the /config/database.yml with sqlite3 instead of mysql2 which I want to use. How can I change that?
[01:35:28] superlou: has joined #RubyOnRails
[01:35:59] i8igmac: Radar: its truck'n
[01:37:40] Didac: has joined #RubyOnRails
[01:38:19] Arcaire: clorisu: `rails new -d mysql`
[01:39:20] flappynerd: clorisu, you can change that by not using mysql ;)
[01:39:22] flappynerd: use postgres
[01:39:46] capin: flappynerd: amen brother :)
[01:40:17] jstransky: has joined #RubyOnRails
[01:40:39] Arcaire: flappynerd: That wasn't the question.
[01:40:48] capin: was gonna say that, but didn't want to be the only one.
[01:41:16] cnk: clorisu: do rails new -d mysql somethingelse and then copy the database.yml into your existing project
[01:41:20] capin: Arcaire: yeah but if whom is starting out, why not start with Postgres over MySQL
[01:41:31] clorisu: flappynerd: i'm just using mysql because it's in the tutorial for rails im following. im trying to smooth the learning process
[01:41:34] ur5us: has joined #RubyOnRails
[01:41:52] clorisu: thanks Arcaire cnk will do. it wont override any files ive already generated with the first rails new will it?
[01:41:59] Arcaire: clorisu: It will, yes.
[01:42:14] flappynerd: clorisu, hmm, fair enough, you should avoid MySQL like the plague after you finish your tutorial
[01:42:24] Arcaire: flappynerd: Please stop spewing garbage.
[01:42:43] flappynerd: it's not garbage, MySQL has a bunch of problems, easily factually demonstrated
[01:42:45] capin: ACTION agrees with flappynerd 
[01:42:48] flappynerd: it's hyperbole, but not garbage
[01:42:49] clorisu: Arcaire: can I flag it to output it somewhere else?
[01:42:52] clorisu: and copy the database.yml
[01:43:12] Arcaire: You demonstrably have little to no idea what you're talking about, to be honest. I can absolutely guarantee you have never first-hand seen any of these issues you're waving your hands about.
[01:43:24] Arcaire: clorisu: You can reconfigure that database.yml to use MySQL, if you like.
[01:43:30] flappynerd: Arcaire, lol, demonstrably, ok I guess if you say it that makes it true
[01:43:36] clorisu: I think I did it already, was just getting a second opinion here
[01:43:47] clorisu: I changed the gem sqlite3 to gem mysql2 in the Gemfile
[01:43:49] Arcaire: flappynerd: You're demonstrating it.
[01:43:58] Arcaire: clorisu: You'll have to modify your database.yml too.
[01:44:00] clorisu: and then changed what was in the database.yml to this https://gist.github.com/erichurst/961978
[01:44:05] clorisu: should that work?
[01:44:09] flappynerd: all you've done is say "are not!", that's hardly an argument
[01:44:23] Arcaire: Yes, clorisu. That'll work.
[01:44:30] Arcaire: I just checked against a new rails project using MySQL. They match.
[01:44:31] capin: clorisu: if you end up using any substantail gems in the future your gonna find yourself SOL with MySQL
[01:44:42] Arcaire: Should be good! Just make sure you're using sockets on the database listener side.
[01:45:01] clorisu: what are sockets?
[01:45:09] clorisu: user and pass?
[01:45:20] Arcaire: socket: /tmp/mysql.sock
[01:45:24] flappynerd: clorisu, well, sockets may refer to TCP/IP sockets or unix domain sockets
[01:45:32] Arcaire: Fucking christ I can't take this channel anymore.
[01:45:57] Arcaire: I bet flappynerd uses Arch Linux.
[01:46:00] Arcaire: He just gives off that vibe.
[01:46:04] clorisu: okay well I just checked my rails app directory and theres no mysql.sock in /tmp
[01:46:06] Arcaire: Either that or he definitely uses Gentoo.
[01:46:13] flappynerd: hmm, attempted ad hominems
[01:46:16] Arcaire: clorisu: Do you have a MySQL install?
[01:46:18] capin: what's wrong with Arch?
[01:46:22] Arcaire: capin: Everything.
[01:46:23] flappynerd: typical for someone who has no actual argument
[01:46:26] Arcaire: Use a proper operating system.
[01:46:32] clorisu: Arcaire: do you mean did i create the rails project with that flag?
[01:46:44] capin: Arcaire: such as?
[01:46:44] Arcaire: clorisu: No, I mean do you have MySQL installed on the system you're going to be running that Rails app on.
[01:47:02] flappynerd: capin, Arch isn't exactly bad, but I can't personally recommend it in basically any case other than "I wanna mess around"
[01:47:02] Arcaire: You do? Okay. Is it running?
[01:47:05] clorisu: adam@mintpc ~ $ mysql --version
[01:47:05] clorisu: mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3
[01:47:08] flappynerd: 100% rolling releases are such a bad idea
[01:47:10] clorisu: im logged in
[01:47:16] Arcaire: As what user? Root?
[01:47:22] capin: flappynerd: capin was running arch ;)
[01:47:26] clorisu: not anymore, i created a new user and im in that
[01:47:30] clorisu: i can change back to root if needed
[01:47:34] Arcaire: Nah no need.
[01:47:44] Arcaire: You're on some Linux derivative, right?
[01:47:47] Arcaire: Ubuntu, Debian, whatever.
[01:47:49] clorisu: just mint yeah
[01:47:55] Arcaire: Run ls /tmp/mysql.sock
[01:47:58] Arcaire: Does it return anything?
[01:48:09] atrius: has joined #RubyOnRails
[01:48:09] capin: Arcaire: let me guess you don't like systemd do you?
[01:48:16] Arcaire: capin: I have no opinion either way.
[01:48:26] clorisu: ls: cannot access /tmp/mysql.sock: No such file or directory
[01:48:36] Arcaire: Okay, so you'll need to modify that database.yml file
[01:48:58] renegadeandy: Radar: can you take a look at my question here : http://stackoverflow.com/questions/36000804/wordpress-run-as-a-subdirectory-of-a-rails-app-using-nginx - capin has taking a look, and offered a suggestion, but ideally i want to workout why this isnt working
[01:49:05] clorisu: to a different sock file Arcaire ?
[01:49:09] Arcaire: clorisu: https://gist.github.com/Arcaire/558b47eabdd47613f182
[01:49:22] Arcaire: See how it's using a host: directive instead of a socket: directive?
[01:49:36] Arcaire: You will also need to specify the user/password in this case.
[01:50:14] capin: will a `rake db:create` not work?
[01:50:24] clorisu: database: meme_development
[01:50:48] capin: no need for passwords in dev ;)
[01:50:52] clorisu: kk lets see how the tutorial goes with this
[01:51:35] clorisu: is there any way i can default the rails db to mysql2 in the future without flagging it?
[01:51:45] clorisu: when creating a new one
[01:52:20] clorisu: without that?
[01:52:25] capin: or for your case your probably gonna want to use the mysql2 adapter
[01:52:26] Arcaire: echo "-d mysql" >> ~/.railsrc
[01:52:33] clorisu: if i uninstall sqlite3 will it fall back?
[01:53:00] capin: fall back?
[01:53:08] clorisu: in priority
[01:53:20] clorisu: it seems to be prioritising a sqlite3 database creation now
[01:53:37] clorisu: even though i have both gems installed
[01:53:50] capin: ummm it depends on how you have your database.yml file setup
[01:53:52] Arcaire: It will always unless you do what I mentioned above.
[01:54:13] clorisu: but the database.yml file is created by the new project no?
[01:54:17] RegulationD: has joined #RubyOnRails
[01:54:27] Arcaire: echo "-d mysql" >> ~/.railsrc
[01:54:35] clorisu: theres no .railsrc file
[01:54:40] Arcaire: This creates it.
[01:54:47] Arcaire: https://www.natashatherobot.com/how-to-configure-your-rails-defaults/
[01:55:01] s2013: has joined #RubyOnRails
[01:55:08] capin: if you want to use MySQL (quivers) then setup your database.yml accordingly ;)
[01:55:16] clorisu: so does rails new parse the .railsrc file Arcaire ?
[01:55:29] capin: then comment out sqlite in your `Gemfile`
[01:55:39] clorisu: so is sqlite the default for rails?
[01:55:50] ascarter: has joined #RubyOnRails
[01:56:01] clorisu: unfortunate this tutorial is using mysql then
[01:56:16] Arcaire: clorisu: It literally doesn't matter one bit for you.
[01:56:34] Arcaire: There's three people in this channel, total, who actually need to care about the differences between the two database systems.
[01:56:47] Arcaire: I think one of them is using MongoDB anyway, not even PostgreSQL or MySQL.
[01:57:00] clorisu: I just meant in terms of ease
[01:57:07] Arcaire: MySQL is pretty easy.
[01:57:10] clorisu: but i'm guessing its sorted now that Ive added the railsrc file
[01:57:21] clorisu: oh I meant without having to come here and check :P
[01:57:21] Arcaire: You won't need to do anything else with regards to switching over in the future.
[01:57:59] ruind: has joined #RubyOnRails
[01:58:01] capin: ACTION suggests using Postgres
[01:58:12] renegadeandy: Andy agrees :)
[01:58:17] Arcaire: Fucking hell.
[01:58:46] Arcaire: Lord give me +o once more to smite the garbage shitting up the channel with pointless personal anecdotes about medium blog posts they read about a database system they barely know the syntax of.
[01:59:06] ensyde_: has joined #RubyOnRails
[01:59:18] Arcaire: Welp, looks like he's AFK. Oh well.
[01:59:42] capin: Arcaire: can you use a gem like Solidus with MySQL?
[01:59:50] capin: or spree for that matter?
[01:59:52] tenebrae29A: has joined #RubyOnRails
[02:00:16] Arcaire: Yes, you absolutely can.
[02:00:19] capin: not to mention the liscensing that goes along with using MySQL
[02:00:23] Arcaire: And they are a bit more than just a library. They're a full application.
[02:00:30] Arcaire: That's like complaining you can't use Wordpress with MongoDB without modifying it.
[02:00:37] Arcaire: Except you can use Solidus with MySQL without modifying it as much.
[02:00:52] Arcaire: Your comparisons are garbage and you need to stop giving new people so much to worry about.
[02:01:09] capin: so you have to modify the Solidus gem in order for it work with MySQL?
[02:01:17] Arcaire: I'm genuinely pleasantly surprised, you didn't start vigorously masturbating over the fact that they were using Mint and not Linux From Scratch.
[02:01:26] Radar: Arcaire: easy mate
[02:01:38] Arcaire: capin: You also have to modify Wordpress to work with MongoDB.
[02:01:53] Arcaire: This is a more apt comparison, given they are both complete self-contained applications.
[02:02:20] capin: Arcaire: can you use the helios gem with MySQL?
[02:02:20] Arcaire: Comparing a brand new, self-developed rails application to something like Wordpress or Spree with regards to configurability is pointless.
[02:02:52] Arcaire: At a quick glance, yes.
[02:03:16] Arcaire: Tip your fedora as hard as you like. Your "advice" was a pointless waste of new-user effort while they work out that what you're pushing them to do is utterly irrelevant to them.
[02:03:28] capin: Arcaire: the point im trying to raise is that the majority of the rails community has / is using Postgres for DB solutions NOT MySQL
[02:03:40] lyoshajapan: has joined #RubyOnRails
[02:03:49] bronson: has joined #RubyOnRails
[02:03:54] Arcaire: I would venture that a significant proportion of them are using MySQL, to be honest.
[02:04:26] capin: I would venture to say how complex the app is, and what are they using it for?
[02:04:57] Radar: GitHub uses MySQL
[02:05:00] Radar: bikeexchange.com.au uses MySQl
[02:05:12] Arcaire: Nah Radar they're not COMPLEX enough.
[02:05:16] Arcaire: They need to be more COMPLEX.
[02:05:22] flappynerd: google wrote angular
[02:05:25] Radar: [12:44:31] <capin> clorisu: if you end up using any substantail gems in the future your gonna find yourself SOL with MySQL
[02:05:27] Radar: Just bad advice imo
[02:05:36] flappynerd: so, that's pretty much proof that just because you're a big company doesn't mean you can't write total crap :P
[02:05:45] capin: Stackoverflow uses Postgres
[02:05:56] Radar: capin: it's not a Rails app
[02:06:05] capin: doesn't matter
[02:06:14] Arcaire: StackOverflow doesn't use Postgres.
[02:06:17] Arcaire: It uses Microsoft SQL server.
[02:06:20] Arcaire: They're an all-Microsoft stack.
[02:06:22] Radar: "the point im trying to raise is that the majority of the rails community" then you talk about a not Rails app?
[02:06:27] Arcaire: http://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/
[02:06:32] Arcaire: See ya. Stop talkin'.
[02:06:34] flappynerd: what does MySQl actually do better than Postgres? how bout we get factual here?
[02:06:43] Radar: flappynerd: not much tbh ;)
[02:06:59] flappynerd: anything at all?
[02:07:03] Radar: capin: back to your original point: any gem that works with AR and doesn't have PSQL specific SQL syntax in it will work with MySQL.
[02:07:09] pawnbox: has joined #RubyOnRails
[02:07:14] Radar: flappynerd: It'll accept dates in invalid formats by default.
[02:07:14] flappynerd: cuz I can name plenty of stuff that Postgres does that MySQL simply does not
[02:07:26] Radar: flappynerd: It won't complain when you try to stuff text that's too long into a field (by default)
[02:07:27] flappynerd: not even "better", literally just functionality that doesn't exist in MySQL that does exist in Postgres
[02:07:28] clorisu: ah, just went back in the tutorial. seems i missed the -d mysql flag when creating my rails project. you were right :-)
[02:07:36] Arcaire: clorisu: :D
[02:07:39] clorisu: i'll remove the railsrc and just follow it instead
[02:07:41] flappynerd: Radar, but is that really better?
[02:07:42] Arcaire: Now you don't have to worry about it thanks to .railsrc.
[02:07:54] flappynerd: most people I know (and myself) would consider that exactly one of the bad things about MySQL
[02:07:56] statelesscode: has joined #RubyOnRails
[02:08:06] Radar: flappynerd: no I am being facetious. Those two things are not OK imo. The database should kick and scream if given an invalid date.
[02:08:11] flappynerd: besides, good validation in the rails layer for example should be present to prevent that kind of thing in the first place
[02:08:18] Arcaire: Most people you know includes the six other "software engineers" at your university bachelor of IT course, right?
[02:08:29] flappynerd: Arcaire, more attempted ad hominems
[02:08:35] Arcaire: The reason I'm assuming you're a first-year university student is due to the fact you insist that one needs to be "beter".
[02:08:39] Arcaire: s/ete/ette/
[02:08:42] Arcaire: how2keyboard today
[02:08:43] flappynerd: Arcaire, come back when you have an actual fact based argument
[02:09:03] Arcaire: Are you a postgresql developer?
[02:09:10] Radar: ACTION is not a fan of ad hominem.
[02:09:25] Arcaire: Radar: i'd like to speak to your supervisor please
[02:09:28] braincra-: has joined #RubyOnRails
[02:09:32] ChanServ: +q *!*@gateway/web/irccloud.com/x-fuzrvfzakugklaph
[02:09:42] Radar: Get back to work, slacker.
[02:11:16] capin: ohhh heroku uses Postgresql :P
[02:11:23] Radar: capin: Yes, that's another big one.
[02:11:24] gbgdev: has joined #RubyOnRails
[02:11:34] flappynerd: yeah heroku's postgres is mega expensive tho :/
[02:12:12] capin: this is a pretty funny answer, http://serverfault.com/a/2131/188970
[02:12:41] Radar: capin: thanks :)
[02:14:29] trosborn: has joined #RubyOnRails
[02:15:53] sevenseacat: has joined #RubyOnRails
[02:16:31] greengriminal: has joined #RubyOnRails
[02:19:27] Radar: I'd rather we didn't scare people off DB choices -- as long as they're one of SQLite, MySQL or PostgreSQL.
[02:19:33] Radar: MongoDB can get fucked.
[02:19:46] sevenseacat: and sqlite not in production, plz.
[02:19:54] Radar: That debate that just went on would've been pretty intimidating as a newbie.
[02:20:16] Radar: clorisu: Am I right about that?
[02:21:31] SteenJobs: although he makes a point, that they have nuanced differences which comme into play given the needs of a certain context, it’s not about which is ‘better’
[02:23:01] flappynerd: meh, sure, like I said, clorisu don't worry too much about using MySQL for your tutorial
[02:23:33] flappynerd: clorisu, I just wanted to bring to your attention that Postgres has numerous benefits over MySQL and there are also several intrinsic problematic issues with MySQL
[02:23:40] flappynerd: plenty of places use MySQL in prod, it's not like you can't
[02:24:12] capin: ohhh reddit uses Postgres ;)
[02:25:01] Radar: I think it's worth noticing that you won't run into those MySQL problems right away.
[02:25:10] Radar: It's something that'll kinda chew on the edges of your soul without you realising it.
[02:25:13] flappynerd: SteenJobs, but it is kind of about which is better... I mean it should be mostly about "does this meet my requirements", but given information presented about the problematic things in MySQL I don't see why anyone would choose MySQL knowing those problems
[02:25:18] Radar: MySQL configured _properly_ can be as good as PSQL
[02:25:43] flappynerd: eh, I mean has MySQL actually fixed the internationalization problems yet?
[02:25:56] Radar: capin: Reddit uses a DB unlike most people would use a DB ;)
[02:26:03] cryo28: has joined #RubyOnRails
[02:26:05] Radar: capin: I believe it's all one table with a type and a blob.
[02:26:16] flappynerd: the mere existence of WINDOW queries and ltree is enough for me to choose Postgres of MySQL any day
[02:26:57] capin: ^ yeah what he said
[02:26:58] flappynerd: I heard recent version of mysql have introduced JSON columns, which I guess is cool, I've still got no compelling reasons to choose MySQL and plenty of reasons to avoid it
[02:27:58] capin: Radar: https://github.com/reddit/reddit/wiki/Architecture-Overview#postgresql
[02:28:24] Radar: capin: that's it
[02:28:37] Radar: bbl again. Dr's appointment.
[02:28:48] capin: have fun :)
[02:29:37] Uber|Dragon: has joined #RubyOnRails
[02:30:04] jenrzzz: has joined #RubyOnRails
[02:31:28] clorisu: flappynerd: i'll switch it the future if it's convenient for me to. but right now i'm following a long tutorial which uses mysql so it's not practical for me to deviate
[02:31:29] gbgdev_: has joined #RubyOnRails
[02:32:04] SteenJobs: flappynerd: maybe. but still, those differences often don’t manifest themselves when writing code on the not as complex side
[02:33:04] petor: has joined #RubyOnRails
[02:34:25] smathy: MySQL has more flexible collation configuration, eg. per-column <-- flappynerd
[02:35:39] clorisu2: has joined #RubyOnRails
[02:35:41] DLSteve: has joined #RubyOnRails
[02:35:47] kdough: has joined #RubyOnRails
[02:36:14] chagel: has joined #RubyOnRails
[02:36:19] rrrepsaj: has joined #RubyOnRails
[02:36:37] flappynerd: SteenJobs, assuming an application will always "be simple" or will never grow beyond initial specs is a mistake
[02:36:49] flappynerd: smathy, when would that be useful?
[02:38:23] flappynerd: clorisu, sure, like I said, no worries, use it for your tutorial, just be aware that DB choice is meaningful and MySQL has some problems
[02:39:02] smathy: flappynerd, I've used it to great success when dealing with non-English users, eg. a lot of Spanish/Mexican people don't know how to make ñ on their keyboards, so they expect to search for "espanol" and see "español" results appear.
[02:39:09] SteenJobs: flappynerd: for a beginner, i’m not so sure i agree. i don’t mean a seasoned dev who is building a simple app, i mean someone starting off who’s building for the sake of familiarizing themselves
[02:39:20] smathy: flappynerd, likewise with their accented characters.
[02:40:00] flappynerd: smathy, that's still easy to solve with postgres
[02:40:31] flappynerd: SteenJobs, postgres is no more difficult to setup or learn than MySQL, it's all more or less a matter of familiarity
[02:40:43] flappynerd: why familiarize oneself with a generally inferior option
[02:40:44] smathy: flappynerd, I wasn't suggesting it wasn't, I was stating something MySQL does that Pg doesn't. I mean most features of Pg are still solvable using other RDBMSs.
[02:41:28] smathy: flappynerd, Pg might do it more elegantly, but in this case MySQL solves these sorts of problems more elegantly with column-specific and/or custom collations.
[02:41:54] flappynerd: smathy, it might be a fair point that technically this is something that mysql "does" that postgres "does not" but it's not something I think can be used as a rationale for using MySQL over Postgres given the other problems with MySQL
[02:42:12] uglybandersnatch: has joined #RubyOnRails
[02:42:16] smathy: flappynerd, you didn't ask for that, you asked if there was anything MySQL did that Pg didn't.
[02:42:17] flappynerd: and if you're talking about elegance Postgres still has a large amount of more elegant solutions than MySQL
[02:42:28] flappynerd: yes but there was a purpose reason I asked it
[02:42:36] flappynerd: I should have added "that has a meaningful impact"
[02:42:42] flappynerd: that, to me, is not a meaningful impact
[02:42:55] flappynerd: s/meaningful/significant/ or s/meaningful/non-negligible/
[02:43:03] smathy: flappynerd, it has a very meaningful impact when your problem space requires custom collations.
[02:43:22] smathy: flappynerd, much easier than functional indexes, or however you'd solve this with Pg.
[02:43:42] SteenJobs: which is why i originally said, it’s not as simple as which is ‘better’, because the answer to that can very much be context dependent
[02:43:53] ariedler: has joined #RubyOnRails
[02:44:03] flappynerd: even if that's the case, I still prefer not to use a DB that doesn't care about my data
[02:44:31] SteenJobs: totally fair
[02:44:36] SteenJobs: but the debate wasn’t about your preferences
[02:44:43] SteenJobs: it was about claiming that one is simply better than the other
[02:45:12] flappynerd: so, lets take it out of the realm of my preferences
[02:45:20] flappynerd: everyone should avoid using a database that doesn't care about their data
[02:45:36] blackmesa: has joined #RubyOnRails
[02:45:56] gamov: has joined #RubyOnRails
[02:46:41] Ropeney: flappynerd, do you have something backing up that claim?
[02:47:16] pawnbox: has joined #RubyOnRails
[02:48:25] flappynerd: this conversation has covered several of the problems with mysql and several of the benefits and features of Postgres
[02:48:37] flappynerd: and plenty more can be found on google
[02:48:50] Ropeney: flappynerd, specifically "mysql doesn't care about data"
[02:48:52] Chagel_: has joined #RubyOnRails
[02:49:09] flappynerd: yes, this conversation has covered that already, and it can be found in abundance on google
[02:49:56] flappynerd: SteenJobs, btw I wanted to mention, now that you're back, that all of your assertions regarding javascript so far are patently false and misinformed
[02:50:12] smathy: :eyeroll:
[02:50:12] livingcode: has joined #RubyOnRails
[02:50:13] Ropeney: flappynerd, maybe my googling skills isn't as good as yours, would you mind relinking?
[02:50:14] SteenJobs: then please educate me!
[02:50:41] SteenJobs: never a more important time to be taught something than when i’m misinformed or misunderstand something. it’s worse than not knowing at all.
[02:50:59] livingcode: has left #RubyOnRails: ()
[02:51:05] flappynerd: well I guess it was weaksauce as well
[02:51:10] duncannz: has joined #RubyOnRails
[02:51:19] flappynerd: js has iterators and js is not a "sloppy language"
[02:51:33] flappynerd: the spec is well defined, browsers are to blame for most of the issues in the ecosystem, not the JS language
[02:52:27] flappynerd: "<SteenJobs> the lack of higher level iterating is also a bit annoying", what do you view JS as lacking in this regard?
[02:52:44] smathy: Ropeney, he never linked in the first place, he's just deflecting any effort to pin down any specifics.
[02:53:01] livingcode: has joined #RubyOnRails
[02:53:11] livingcode: has left #RubyOnRails: ()
[02:53:16] smathy: Ropeney, usually people in that camp are making the mistake of judging MySQL by MyISAM.
[02:53:28] flappynerd: I'm aware that InnoDB has FK constraints
[02:53:31] flappynerd: that's not what I'm talking about
[02:53:46] flappynerd: but yes, that's something that can bite noobs for sure, not realizing the difference between the two
[02:54:23] smathy: Hasn't really mattered since 2010 when InnoDB became the default, but anyway...
[02:54:56] flappynerd: hmm, well I haven't use mysql since well before 2010 so I'm sure some things have changed
[02:55:20] flappynerd: actually, no I used MySQl around 2013 and we ended up with major issues with internationalization
[02:55:54] SteenJobs: flappynerd: c’mon man, you can’t tell me you don’t see a difference between the way ruby and JS handle iterating?
[02:55:55] flappynerd: I dunno, maybe that's fixed too, but I'm not sure why I would go back when Postgres hasn't had a problem with this stuff
[02:56:01] ascarter: has joined #RubyOnRails
[02:56:08] flappynerd: SteenJobs, what's your specific issue/contention ?
[02:56:14] flappynerd: ruby handles a lot of things differently
[02:56:24] SteenJobs: just responding to your quoting me...
[02:56:45] flappynerd: you didn't say "they're different", your assertion was rather pointed and different in character
[02:57:58] Ropeney: smathy, i did feel that was the case; but wanted to make sure
[02:58:26] smathy: Ropeney, good luck getting a straight answer :)
[02:58:27] ur5us: has joined #RubyOnRails
[02:58:45] flappynerd: Radar even already gave a specific example here
[02:58:52] flappynerd: and there are several other examples
[02:58:59] baweaver: has joined #RubyOnRails
[02:58:59] flappynerd: I dunno, like I said, I'm sure they're improving things all the time
[02:59:15] flappynerd: but I don't know why I would choose something that's fixing old problems instead of making modern improvements
[03:01:12] hahuang61: has joined #RubyOnRails
[03:02:59] smoitra: has joined #RubyOnRails
[03:05:36] Pazician: has joined #RubyOnRails
[03:05:49] bronson: has joined #RubyOnRails
[03:06:17] SteenJobs: flappynerd: it was a pretty straightforward assertion…ruby has things like an enumerator class and various nuanced ways of performing iterations, which JS does not. i personally find that a bit annoying.
[03:06:41] flappynerd: SteenJobs, what's something you are used to being able to do in ruby in a nuanced way that you can't do in JS with the same nuance?
[03:06:43] chipotle: has joined #RubyOnRails
[03:06:51] clorisu: http://pastie.org/10760088 anyone know whats going on here?
[03:07:21] flappynerd: clorisu, I'm pretty sure debugger is deprecated, you probably want to use pry and or byebug
[03:07:40] baweaver: that, and sudo is a bad idea
[03:07:43] flappynerd: clorisu, however, you may be able to fix that, are you using rvm?
[03:07:47] SteenJobs: on a very basic level, how about writing for loops like (i < 0; i < object.length; i++). not the end of the world to do, but it’s a basic example of what i don’t need to do in ruby
[03:07:55] clorisu: i ran the command from an old terminal window that didnt update with my new rails
[03:07:56] SteenJobs: and for..in loops don’t do the trick because of the way they work
[03:08:00] sevenseacat: flappynerd: did you even look at the pastie? that answers the question about rvm
[03:08:01] flappynerd: SteenJobs, you don't need to do that in JS either
[03:08:06] baweaver: SteenJobs: _.each
[03:08:13] flappynerd: sevenseacat, yeah I suppose since he's using sudo that does answer the question
[03:08:25] flappynerd: and yes I looked at the pastie, hence how I saw he's trying to install debugger
[03:08:26] sevenseacat: its one of about 1000 indicators to answer the question
[03:09:10] SteenJobs: baweaver: what about for a dict
[03:09:11] flappynerd: sure, presence of /usr etc
[03:09:17] SteenJobs: you can use for..in but there are things you need to be wary of
[03:09:25] flappynerd: SteenJobs, .forEach
[03:09:32] baweaver: Same there too, LoDash takes care of those.
[03:09:35] SteenJobs: i think it’s only for arrays, i could totally be wrong
[03:09:35] flappynerd: or _.each if you're using underscore or lodash
[03:10:03] flappynerd: but really you should be using an ES5 polyfill and an ES6 polyfill and babel, in which case it's a non-issue
[03:10:24] SteenJobs: totally, and i agree
[03:10:25] flappynerd: SteenJobs, _.each works for pojos too
[03:10:43] flappynerd: i.e. _.each will work for the ruby equivalent of a hash
[03:10:54] SteenJobs: my point is simply that you need to use a transpiler at all, and yes i understand that’s because of browsers, but it’s the case none theless
[03:11:13] flappynerd: well that wasn't actually your original point
[03:11:18] SteenJobs: i didn’t say it’s not capable, i merely said it’s annoying
[03:11:19] flappynerd: and transpilers are great, I see no issue
[03:12:24] SteenJobs: it’s just extra config, and extra things to deal with. every time my apartment buzzer goes off i can go down to the building entrance and open the door to achieve the same thing as using the buzzer, it’s just more annoying.
[03:12:39] flappynerd: invalid analogy
[03:13:02] SteenJobs: flag on the play
[03:13:04] SteenJobs: invalid analogy
[03:13:07] SteenJobs: 15 yards back
[03:16:20] Devalo: has joined #RubyOnRails
[03:17:07] pawnbox: has joined #RubyOnRails
[03:18:29] DoctorMonocular: has joined #RubyOnRails
[03:21:30] SeanLazer: has joined #RubyOnRails
[03:21:49] uglybandersnatch: has joined #RubyOnRails
[03:22:21] moeabdol1: has joined #RubyOnRails
[03:24:55] chagel: has joined #RubyOnRails
[03:26:11] DmitryBochkarev: has joined #RubyOnRails
[03:26:55] stardiviner: has joined #RubyOnRails
[03:27:35] ascarter: has joined #RubyOnRails
[03:30:11] SteenJobs: has joined #RubyOnRails
[03:31:16] chouhoul_: has joined #RubyOnRails
[03:36:04] ascarter_: has joined #RubyOnRails
[03:37:37] bePolite: has joined #RubyOnRails
[03:39:23] _bogus_: has joined #RubyOnRails
[03:39:24] _bogus_: has joined #RubyOnRails
[03:39:49] johnflux: has joined #RubyOnRails
[03:39:51] _bogus_: hi there.. i cant attach a image file to my devise confirmation email, what am i doing wrong? https://gist.github.com/andreycwb/7e95f4993099aaf11460
[03:40:01] qejk: has joined #RubyOnRails
[03:40:44] SteenJobs: has joined #RubyOnRails
[03:45:52] ascarter: has joined #RubyOnRails
[03:47:47] chagel: has joined #RubyOnRails
[03:50:06] pulgalipe: has joined #RubyOnRails
[03:50:35] tenzan: has joined #RubyOnRails
[03:52:43] tenzan: has joined #RubyOnRails
[03:52:49] chagel: has joined #RubyOnRails
[03:52:56] trosborn: has joined #RubyOnRails
[03:54:39] SteenJobs: has joined #RubyOnRails
[03:56:31] ascarter: has joined #RubyOnRails
[04:04:25] chagel: has joined #RubyOnRails
[04:10:18] pawnbox: has joined #RubyOnRails
[04:10:30] ascarter: has joined #RubyOnRails
[04:11:19] Cohedrin: has joined #RubyOnRails
[04:13:07] krz: has joined #RubyOnRails
[04:13:31] arup_r: has joined #RubyOnRails
[04:13:49] braincrash: has joined #RubyOnRails
[04:16:23] ascarter: has joined #RubyOnRails
[04:17:01] rogue_koder: has joined #RubyOnRails
[04:17:11] pawnbox: has joined #RubyOnRails
[04:21:48] ascarter: has joined #RubyOnRails
[04:22:01] pawnbox: has joined #RubyOnRails
[04:24:43] _bogus_: hi there.. i cant attach a image file to my devise confirmation email, what am i doing wrong? https://gist.github.com/andreycwb/7e95f4993099aaf11460
[04:25:22] johnflux: has joined #RubyOnRails
[04:27:51] lyoshajapan: has joined #RubyOnRails
[04:28:42] i8igmac: im trying to make a basic example, ActionController::Live plus EventSource
[04:30:01] arup_r: _bogus_: That attachment call has to be made inside the mail action
[04:30:01] i8igmac: i have a messaging controller send a single string to the client, follow by "stream_done"
[04:30:18] _bogus_: arup_r, i tried this too without success :/
[04:31:14] treaki_: has joined #RubyOnRails
[04:31:27] rubyonrailed: has joined #RubyOnRails
[04:31:54] arup_r: _bogus_: are you sure your email template is getting rendered, just asking. :)
[04:32:17] _bogus_: arup_r, yes, commenting that line with image_tag , everything works just fine
[04:32:38] arup_r: ok, without comment, are you seeing error?
[04:33:54] _bogus_: yes, undefined .url for nil:NilClass
[04:34:14] arup_r: _bogus_: why did you add this? https://gist.github.com/andreycwb/7e95f4993099aaf11460#file-custom_mailer-rb-L4
[04:34:17] petor: has joined #RubyOnRails
[04:35:02] _bogus_: oh I saw this on one of the pages searching for a solution. didnt help anyway
[04:35:19] arup_r: yeah, remove it and try..
[04:35:38] arup_r: attachment method is free inside the mailer for you, no need to include that
[04:37:47] _bogus_: same error tho :/
[04:38:02] bronson: has joined #RubyOnRails
[04:39:29] ascarter: has joined #RubyOnRails
[04:40:50] arup_r: _bogus_: Add a pry here https://gist.github.com/andreycwb/7e95f4993099aaf11460#file-custom_mailer-rb-L15 .. and see what you get from `attachments["logo.png"]` call
[04:42:05] _bogus_: sorry, pry ? just the word pry ?
[04:42:26] Radar: Does anyone have an opinion about databases?
[04:42:50] arup_r: what tool you use to debug? byebug or pry?
[04:43:48] SteenJobs_: has joined #RubyOnRails
[04:43:50] _bogus_: byebug is included in my gemfile
[04:45:32] Didac: has joined #RubyOnRails
[04:45:43] arup_r: the call bybug and see what I said, I meant to debug it.. I am not seeing any issue in the code
[04:47:27] i8igmac: im trying to use ActionController::Live and display on a clients browser live f <div id="progress"></div>
[04:47:56] i8igmac: i can get the live stream on the clients browser but its a never ending loop
[04:48:28] pawnbox: has joined #RubyOnRails
[04:48:49] gingray: has joined #RubyOnRails
[04:48:49] i8igmac: 10.times do |x| response.stream.write("data: #{x}\n\n"); end
[04:49:02] wethu: has joined #RubyOnRails
[04:49:16] pawnbox: has joined #RubyOnRails
[04:49:23] i8igmac: the client will loop threw and then start over
[04:49:37] ChanServ: -q *!*@gateway/web/irccloud.com/x-fuzrvfzakugklaph
[04:49:51] ascarter: has joined #RubyOnRails
[04:50:41] Radar: wb Arcaire
[04:51:07] flappynerd: has left #RubyOnRails: ("Leaving")
[04:51:25] trosborn: has joined #RubyOnRails
[04:55:28] _bogus_: arup_r, i tried to put byebug but nothing happened.. so i tried to set @a = 'aaaa' and use it on the view, strangely it doesnt prints anything in the view, Im thinking the method is not overriding or being called... despite Im using instance var @usuario inside my views and getting all the data w/out problem
[04:55:55] pawnbox: has joined #RubyOnRails
[04:56:33] arup_r: yeah, something is wrong ofcourse there, but not visible to me also. :) wait for some more experienced eyes..
[04:56:38] uglybandersnatch: has joined #RubyOnRails
[05:01:07] pulgalipe: has joined #RubyOnRails
[05:03:39] arup_r: _bogus_: one reason may be is your mailer action is not getting called..
[05:04:06] arup_r: rails is still using Devise defined mailer action, and rendering your overriden view
[05:04:14] _bogus_: arup_r, yess, i just found out
[05:04:20] arup_r: _bogus_: share your devise.rb
[05:04:23] _bogus_: needed to set it on config/initialisers/devise.rb
[05:04:27] arup_r: oh.. good then :)
[05:04:32] arup_r: yes, you got it
[05:04:33] _bogus_: its working now !
[05:04:59] arup_r: I had same in my mind, and that is why I asked just to show that..
[05:05:13] arup_r: _bogus_: did you feel how good those debugging tools are? :D
[05:05:45] _bogus_: arup_r, i cant believe i spend all my time without knowing about this haha
[05:05:46] sp1rs: has joined #RubyOnRails
[05:05:51] _bogus_: saves a lot of time
[05:06:22] eyeamaye: has joined #RubyOnRails
[05:06:30] ascarter: has joined #RubyOnRails
[05:07:45] arup_r: yeah.. _bogus_ use this power all the time, when your eyes are not helping..
[05:08:46] _bogus_: arup_r, sure, thanks for the tip
[05:10:28] moeabdol1: has joined #RubyOnRails
[05:10:51] htmldrum: has joined #RubyOnRails
[05:15:23] papysmrf: has joined #RubyOnRails
[05:16:42] tvw: has joined #RubyOnRails
[05:17:12] lyoshajapan: has joined #RubyOnRails
[05:17:41] Devalo: has joined #RubyOnRails
[05:18:09] pawnbox: has joined #RubyOnRails
[05:23:27] clorisu: what does `do |t|` mean?
[05:24:53] DoctorMonocular: has joined #RubyOnRails
[05:25:31] chagel: has joined #RubyOnRails
[05:26:08] Radar: clorisu: That's a Ruby block.
[05:26:38] Radar: create_table takes a block and then to that block it yields an object, called t
[05:27:13] ascarter: has joined #RubyOnRails
[05:28:31] neanderslob_: has joined #RubyOnRails
[05:28:37] clorisu: is it similar to a html id Radar
[05:28:40] railsnoob1234: has joined #RubyOnRails
[05:29:00] ascarter: has joined #RubyOnRails
[05:29:04] Radar: no, not quite
[05:29:16] Radar: clorisu: Have you gone through any Ruby tutorials yet?
[05:29:36] Radar: If not, I would try https://www.codeschool.com/learn/ruby
[05:30:35] arup_r: has joined #RubyOnRails
[05:31:29] neanderslob_: has joined #RubyOnRails
[05:32:40] meoblast001: has joined #RubyOnRails
[05:33:17] clorisu: im following one now Radar
[05:33:25] lyoshajapan: has joined #RubyOnRails
[05:33:56] clorisu: would `drop_table(tablename)` be the same as `drop_table :tablename`?
[05:36:15] arup_r: clorisu: `drop_table(:tablename)` is the same as `drop_table :tablename
[05:37:45] Chagel_: has joined #RubyOnRails
[05:39:44] alfie_max15: has joined #RubyOnRails
[05:41:53] uglybandersnatch: has joined #RubyOnRails
[05:43:20] chagel: has joined #RubyOnRails
[05:44:23] ascarter: has joined #RubyOnRails
[05:47:13] chouhoulis: has joined #RubyOnRails
[05:47:26] moeabdol1: has joined #RubyOnRails
[05:49:18] djbkd: has joined #RubyOnRails
[05:49:21] Uber|Dragon: has joined #RubyOnRails
[05:50:32] Rahul_Roy: has joined #RubyOnRails
[05:53:23] rogue_koder: has joined #RubyOnRails
[05:53:37] mary5030: has joined #RubyOnRails
[05:54:59] chagel: has joined #RubyOnRails
[05:58:08] darutoko: has joined #RubyOnRails
[05:59:27] hahuang65: has joined #RubyOnRails
[06:00:12] ascarter: has joined #RubyOnRails
[06:00:34] alfie_max15: has joined #RubyOnRails
[06:01:54] Devalo: has joined #RubyOnRails
[06:02:15] tjbiddle: has joined #RubyOnRails
[06:02:56] tjbiddle: Does anyone know if a database connection is held open during a before_destroy action? I got a few `could not obtain a database connection within 5.000 seconds ` errors when bulk-deleting some records that have a before_destroy on them.
[06:02:59] crdpink2: has joined #RubyOnRails
[06:04:36] emachnic: has joined #RubyOnRails
[06:04:48] shibly: has joined #RubyOnRails
[06:04:52] rubyonrailed: has joined #RubyOnRails
[06:05:09] ascarter: has joined #RubyOnRails
[06:05:28] shibly: has left #RubyOnRails: ()
[06:07:36] chagel: has joined #RubyOnRails
[06:09:21] bronson: has joined #RubyOnRails
[06:10:28] bklane: has joined #RubyOnRails
[06:12:57] ascarter: has joined #RubyOnRails
[06:13:33] smathy: tjbiddle, all the callbacks are called within a DB transaction, so yes.
[06:13:56] smathy: (well, except after_commit ;)
[06:14:47] tjbiddle: smathy: Hm, just after_commit? Or would after_destroy be in there as well (Also - is there an area to see this? - I've seen a list of the callback order before, but not in relation to what's included within the transaction period)
[06:16:55] smathy: Nope, after_destroy is called before the txn is committed.
[06:17:14] smathy: There is one other though, after_rollback is also not within the transaction ;)
[06:19:14] chagel: has joined #RubyOnRails
[06:20:37] arup_r: has joined #RubyOnRails
[06:21:10] arup_r: tjbiddle: what is your pool size?
[06:21:17] tjbiddle: arup_r: Default. So 5?
[06:22:06] tjbiddle: The issue is I'm deleting my database object, and in an after_destroy I'm deleting an AWS S3 object; which apparently is taking a second or so. Normally not an issue - but I was deleting a ton and it crapped out.
[06:22:11] arup_r: You hosted the app? and what is your rdbms?
[06:22:15] tjbiddle: So I'm assuming it's holding the connection open while it deleted that.
[06:22:22] tjbiddle: AWS RDS Mysql
[06:22:32] tjbiddle: App is hosted on c3.4xlarge instances
[06:22:41] tjbiddle: (16 cores 32gb memory)
[06:23:30] crdpink: has joined #RubyOnRails
[06:27:03] syndikate: This is more of a design question, I have a 3 page form with lots of information to be filled out - to be made. So basically this is a web with lot of questionnaire for a user for onboarding. I was wondering how do I design it under a single controller?
[06:31:22] _djbkd: has joined #RubyOnRails
[06:32:02] jenrzzz: has joined #RubyOnRails
[06:32:11] ascarter: has joined #RubyOnRails
[06:32:32] pawnbox: has joined #RubyOnRails
[06:32:45] arup_r: tjbiddle: I read one heroku article week back, where they mentioned that a reason of this error, when there is no available pool. that's why I ask these many questions :) That heroku guide explained very well how DB pools are used in rails.
[06:33:57] chagel: has joined #RubyOnRails
[06:35:33] petor: has joined #RubyOnRails
[06:37:24] tjbiddle: arup_r: I think I read the same article; but doesn't help if my code is shit :)
[06:38:23] intrigueD: has joined #RubyOnRails
[06:38:46] davee_: has joined #RubyOnRails
[06:40:07] DoubleMalt: has joined #RubyOnRails
[06:41:21] arup_r: how many pool connection Mysql offers? In Heroku I saw 20 pools Potgres offers though.. But it is a problem need some tinkering with the configuration, so that such running out of available pool doesn't happen
[06:41:41] arup_r: tjbiddle: can't you put that many deletion in background jobs?
[06:41:48] alfie_max15: has left #RubyOnRails: ()
[06:42:45] tjbiddle: arup_r: I can. That was the solution I was thinking of. I just wasn't sure if the issue was that the connection was open, or something else
[06:43:10] arup_r: yes, push the job to background then..
[06:43:50] arup_r: but no idea if it is related to the error or not..
[06:46:57] ascarter: has joined #RubyOnRails
[06:48:10] rvanlieshout: has joined #RubyOnRails
[06:48:14] moeabdol1: has joined #RubyOnRails
[06:48:51] solars: has joined #RubyOnRails
[06:51:22] chagel: has joined #RubyOnRails
[06:52:14] mbreedlove: has joined #RubyOnRails
[06:54:51] chipotle: has joined #RubyOnRails
[06:58:37] pawnbox: has joined #RubyOnRails
[06:58:49] yogeshrt: has joined #RubyOnRails
[06:59:47] ur5us: has joined #RubyOnRails
[07:00:06] ur5us: has joined #RubyOnRails
[07:03:52] uglybandersnatch: has joined #RubyOnRails
[07:04:44] tjbiddle: has joined #RubyOnRails
[07:05:01] jas02: has joined #RubyOnRails
[07:05:32] aganov: has joined #RubyOnRails
[07:06:28] sevenseacat: has joined #RubyOnRails
[07:06:57] Pazician: has joined #RubyOnRails
[07:08:27] Palsson: has joined #RubyOnRails
[07:09:13] srinidhi: has joined #RubyOnRails
[07:09:21] mhoungbo: has joined #RubyOnRails
[07:10:06] yogeshrt: has joined #RubyOnRails
[07:13:46] ascarter: has joined #RubyOnRails
[07:14:07] lyoshajapan: has joined #RubyOnRails
[07:17:23] Pazician: has joined #RubyOnRails
[07:18:48] uglybandersnatch: has joined #RubyOnRails
[07:20:36] scepticulous: has joined #RubyOnRails
[07:20:39] eyeamaye: has joined #RubyOnRails
[07:20:40] pwnd_nsfw: has joined #RubyOnRails
[07:21:44] raunicolae: has joined #RubyOnRails
[07:22:04] raunicolae: has left #RubyOnRails: ()
[07:24:39] emilkarl: has joined #RubyOnRails
[07:28:13] rubyonrails049: has joined #RubyOnRails
[07:28:49] emilkarl: has joined #RubyOnRails
[07:30:39] Pulp: has joined #RubyOnRails
[07:31:41] emilkarl: has joined #RubyOnRails
[07:33:08] djbkd: has joined #RubyOnRails
[07:33:27] liquid-silence: has joined #RubyOnRails
[07:33:38] liquid-silence: has joined #RubyOnRails
[07:35:37] rrrepsaj: has joined #RubyOnRails
[07:36:55] gingray: has joined #RubyOnRails
[07:37:38] rubyonrails049: lmao the default username
[07:40:03] roshanavand: has joined #RubyOnRails
[07:40:04] siaW: has joined #RubyOnRails
[07:40:28] bronson: has joined #RubyOnRails
[07:40:33] gamov: Hi the pros. I’ve started migrating from SQLite to PG. I have a lot of scopes that I use for ordering (eg: scope :default_order, ->{order(:name)} ) that I merge to order my records in controllers. With PG, when I do this: User.joins(:shipments, :person).merge(Person.default_order).distinct, it complains that: "ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list"
[07:40:33] gamov: All my scopes are well encapsulated but now, it seems I need to manually write the select clause with the DISTINCT and dig into the model to pick the proper ordering column... That doesn't sound right to me. I've tried to 'add' to the select in the ordering scope (to keep it encapsulated, something like: .select(arel_table[:weight])) but it doesn't work. I've migrated all my manual select("DISTINCT ...") statement to ActiveRecord.uniq, but it looks like I
[07:40:34] gamov: need to do it all over again in the other direction.... unless somebody has a good suggestion...
[07:41:59] lxsameer: has joined #RubyOnRails
[07:43:39] ascarter: has joined #RubyOnRails
[07:43:59] arup_r: hi jeanre , :p
[07:44:29] arup_r: how many alias? hehehe
[07:50:15] roshanavand: has joined #RubyOnRails
[07:52:44] chagel: has joined #RubyOnRails
[07:53:00] emachnic: has joined #RubyOnRails
[07:54:18] pawnbox: has joined #RubyOnRails
[07:56:15] RegulationD: has joined #RubyOnRails
[07:57:16] sevenseacat: has joined #RubyOnRails
[07:58:42] sp1rs: has joined #RubyOnRails
[07:59:16] yardenbar: has joined #RubyOnRails
[07:59:31] andywww: has joined #RubyOnRails
[08:03:08] Pazician: has joined #RubyOnRails
[08:05:42] jto: has joined #RubyOnRails
[08:05:54] rubyonrailed: has joined #RubyOnRails
[08:06:25] Pazician: has joined #RubyOnRails
[08:06:56] riotjones: has joined #RubyOnRails
[08:07:40] Pazician: has joined #RubyOnRails
[08:11:25] yxejamir: has joined #RubyOnRails
[08:11:41] mary5030: has joined #RubyOnRails
[08:11:43] ILLYRIUM: has joined #RubyOnRails
[08:16:39] leksster: has joined #RubyOnRails
[08:16:44] avelldiroll: has joined #RubyOnRails
[08:17:20] ILLYRIUM: how can i migrate a specific migration file in redmine plugins ?
[08:18:16] nerium: has joined #RubyOnRails
[08:20:12] pawnbox: has joined #RubyOnRails
[08:20:18] lyoshajapan: has joined #RubyOnRails
[08:20:38] Megamos: has joined #RubyOnRails
[08:20:41] agit0: has joined #RubyOnRails
[08:20:47] ascarter: has joined #RubyOnRails
[08:21:51] njero: has joined #RubyOnRails
[08:22:13] riotjones: ILLYRIUM: #redmine
[08:22:34] ILLYRIUM: they sent me here :P
[08:23:16] petor: has joined #RubyOnRails
[08:23:30] riotjones: do you want to run only 1 specified migration?
[08:23:46] ILLYRIUM: yes riotjones
[08:23:46] riotjones: or what is your plan of action?
[08:24:11] riotjones: then delete all other files from migration folder and run rake db:migrtae
[08:24:15] riotjones: *db:migrate
[08:24:38] ILLYRIUM: I created a migration file to modfiy a table (adding a column) and then when i migrate up or down, it migrates all files
[08:24:43] ILLYRIUM: i want just specific one
[08:24:47] riotjones: i think you can run rake db:migrate with a specified file but i don't know the command
[08:25:12] ILLYRIUM: riotjones: in rails apps it works fine, i can do that, but redmine plugins it doesn work
[08:25:21] mark2: has joined #RubyOnRails
[08:25:23] ILLYRIUM: they have some different sintax for migration
[08:25:35] riotjones: method 1: delete all other files or lookup the api of db:migrate and run a single file
[08:26:04] riotjones: ok, but then they have to help you. i don't know the plugin api of redmine
[08:26:41] ILLYRIUM: since they sent me here they have no idea, maybe it isnt possible to migrate a specific migration file in redmine plugins
[08:26:45] ILLYRIUM: anyway thanku
[08:26:51] ayoros: has joined #RubyOnRails
[08:27:03] riotjones: but why don't you put the migration file in the app folderß
[08:27:41] riotjones: or do you need some vars from redmine project
[08:27:42] ILLYRIUM: riotjones: it isnt practic, becuase when i give to somebody else the plugin i cant say to costumer " hey u have to add a migration file in redmine app"
[08:28:00] ILLYRIUM: i have to put all migration files in redmine/plugins/db/migrate
[08:28:01] patrick_star: has joined #RubyOnRails
[08:28:49] SkepBrain: has joined #RubyOnRails
[08:34:14] Spami: has joined #RubyOnRails
[08:36:21] moeabdol1: has joined #RubyOnRails
[08:37:22] petor: has joined #RubyOnRails
[08:38:21] ILLYRIUM: has left #RubyOnRails: ()
[08:41:50] arup_r: has joined #RubyOnRails
[08:42:06] nerium: has joined #RubyOnRails
[08:42:08] jenrzzz: has joined #RubyOnRails
[08:42:59] ascarter: has joined #RubyOnRails
[08:44:11] chipotle: has joined #RubyOnRails
[08:46:50] lele: has joined #RubyOnRails
[08:49:22] srinidhi: has joined #RubyOnRails
[08:49:30] renegadeandy: has joined #RubyOnRails
[08:50:14] arup_r: has joined #RubyOnRails
[08:50:15] merida: has joined #RubyOnRails
[08:51:31] sp1rs: has joined #RubyOnRails
[08:52:05] DoubleMalt: has joined #RubyOnRails
[08:52:15] mikecmpbll: has joined #RubyOnRails
[08:53:17] apotry: has joined #RubyOnRails
[08:54:01] JamieD: has joined #RubyOnRails
[08:57:23] RegulationD: has joined #RubyOnRails
[08:57:27] nerium: has joined #RubyOnRails
[08:57:57] qhp: has joined #RubyOnRails
[08:58:11] ayoros: has joined #RubyOnRails
[08:58:43] ziyadb: has joined #RubyOnRails
[09:06:42] rubyonrailed: has joined #RubyOnRails
[09:08:12] emilkarl: Is it not possible to do describe blocks in controller tests with minitest-rails? Getting an error saying it cant find the contoller for X... http://pastie.org/10760331
[09:08:39] emachnic: has joined #RubyOnRails
[09:09:35] roshanavand: has joined #RubyOnRails
[09:10:20] chipotle: has joined #RubyOnRails
[09:10:21] adre: has joined #RubyOnRails
[09:11:17] ayoros: has joined #RubyOnRails
[09:12:43] pawnbox: has joined #RubyOnRails
[09:13:03] bronson: has joined #RubyOnRails
[09:13:19] Pazician_: has joined #RubyOnRails
[09:15:45] siaW: has joined #RubyOnRails
[09:16:28] roshanavand: has joined #RubyOnRails
[09:17:21] Pazician: has joined #RubyOnRails
[09:17:22] trosborn: has joined #RubyOnRails
[09:17:26] baweaver: has joined #RubyOnRails
[09:18:46] jsrn: has joined #RubyOnRails
[09:20:27] ascarter: has joined #RubyOnRails
[09:23:18] sp1rs: has joined #RubyOnRails
[09:23:53] Pazician: has joined #RubyOnRails
[09:25:01] pawnbox: has joined #RubyOnRails
[09:25:24] arBmind: has joined #RubyOnRails
[09:26:46] bollullera: has joined #RubyOnRails
[09:31:43] chipotle: has joined #RubyOnRails
[09:32:37] lxsameer: has joined #RubyOnRails
[09:33:55] rogue_koder: has joined #RubyOnRails
[09:34:26] Mia: has joined #RubyOnRails
[09:34:26] Mia: has joined #RubyOnRails
[09:35:53] trosborn: has joined #RubyOnRails
[09:44:30] watersoul: has joined #RubyOnRails
[09:45:20] n008f4g_: has joined #RubyOnRails
[09:47:21] jas02: has joined #RubyOnRails
[09:48:56] srinidhi: has joined #RubyOnRails
[09:50:00] ascarter: has joined #RubyOnRails
[09:50:21] workmad3: has joined #RubyOnRails
[09:52:48] denym_: has joined #RubyOnRails
[09:53:50] chagel: has joined #RubyOnRails
[09:55:00] denym_: /msg nickserv help
[09:55:19] nfk|laptop: has joined #RubyOnRails
[09:56:35] roshanavand: has joined #RubyOnRails
[09:57:30] uglybandersnatch: has joined #RubyOnRails
[09:58:11] nettoweb: has joined #RubyOnRails
[10:00:56] petor: has joined #RubyOnRails
[10:04:05] mdw: has joined #RubyOnRails
[10:04:34] jas02: has joined #RubyOnRails
[10:05:42] ascarter: has joined #RubyOnRails
[10:05:57] siaW: has left #RubyOnRails: ()
[10:06:18] jas02: has joined #RubyOnRails
[10:08:17] renegadeandy: Can anybody help me with this : http://stackoverflow.com/questions/36000804/wordpress-run-as-a-subdirectory-of-a-rails-app-using-nginx?noredirect=1#comment59659812_36000804
[10:08:19] trosborn: has joined #RubyOnRails
[10:08:53] roshanavand: has joined #RubyOnRails
[10:09:07] rvanlieshout: renegadeandy: switch to a subdomain
[10:09:11] mdw: has joined #RubyOnRails
[10:09:21] renegadeandy: rvanlieshout: not an option form me, we don’t want it on a subdomain
[10:09:40] rvanlieshout: then reverse proxy that suburl
[10:09:45] Pazician: has joined #RubyOnRails
[10:09:50] rvanlieshout: and be prepared for endless issues with it :)
[10:11:13] Trynemjoel: has joined #RubyOnRails
[10:12:15] ql6wlld: has joined #RubyOnRails
[10:15:36] chagel: has joined #RubyOnRails
[10:17:33] gbgdev: has joined #RubyOnRails
[10:18:31] merida_: has joined #RubyOnRails
[10:19:27] roshanavand: has joined #RubyOnRails
[10:21:04] ascarter: has joined #RubyOnRails
[10:23:45] Pazician: has joined #RubyOnRails
[10:24:36] moeabdol1: has joined #RubyOnRails
[10:24:37] FooMunki: has joined #RubyOnRails
[10:27:05] Pazician: has joined #RubyOnRails
[10:27:19] Meow-J: has joined #RubyOnRails
[10:28:02] merida: has joined #RubyOnRails
[10:33:03] Pazician: has joined #RubyOnRails
[10:35:28] Pazician: has joined #RubyOnRails
[10:35:35] Palsson: has joined #RubyOnRails
[10:36:10] snowy: has joined #RubyOnRails
[10:36:16] jas02: has joined #RubyOnRails
[10:38:00] emachnic: has joined #RubyOnRails
[10:38:51] roshanavand: has joined #RubyOnRails
[10:42:22] stannard: has joined #RubyOnRails
[10:43:56] bronson: has joined #RubyOnRails
[10:44:13] Megamos: has joined #RubyOnRails
[10:46:21] ayoros: has joined #RubyOnRails
[10:48:46] rodfersou: has joined #RubyOnRails
[10:48:51] quazimodo: has joined #RubyOnRails
[10:49:40] humbledaisy: has joined #RubyOnRails
[10:49:42] moeabdol1: has joined #RubyOnRails
[10:50:47] nerium: has joined #RubyOnRails
[10:56:42] sysodaff: has joined #RubyOnRails
[10:59:41] c355E3B: has joined #RubyOnRails
[11:00:00] merida: has joined #RubyOnRails
[11:02:02] rubyonrails257: has joined #RubyOnRails
[11:02:23] chipotle: has joined #RubyOnRails
[11:02:49] AntiSpamMeta: has joined #RubyOnRails
[11:02:55] trinaldi: has joined #RubyOnRails
[11:05:06] srinidhi: has joined #RubyOnRails
[11:05:48] AimlessRAven: has joined #RubyOnRails
[11:05:53] bachmann: has joined #RubyOnRails
[11:08:12] Cork: has joined #RubyOnRails
[11:08:22] pyemkey: has joined #RubyOnRails
[11:08:43] rubyonrailed: has joined #RubyOnRails
[11:09:13] pawnbox: has joined #RubyOnRails
[11:09:56] marr: has joined #RubyOnRails
[11:11:21] ferr: has joined #RubyOnRails
[11:12:17] Pazician: has joined #RubyOnRails
[11:12:32] htmldrum: has joined #RubyOnRails
[11:12:37] renegadeandy: Hi crew. Can some one with nginx experience please help me with this : http://stackoverflow.com/questions/36009470/nginx-file-not-found-for-php-files
[11:13:07] rrrepsaj: has joined #RubyOnRails
[11:13:21] sp1rs: has joined #RubyOnRails
[11:13:51] trosborn: has joined #RubyOnRails
[11:14:01] ferr: Does any of you have experience with wicked_pdf gem? I cannot get icons to be loaded: https://gist.github.com/Fercell/79ba3eb9db78c5f9ee08 Neither checkboxes are loaded nor fa icons
[11:14:14] ferr: But all css files are included, I have double checked
[11:14:29] ferr: If I use the same template to render html, it works fine
[11:14:42] Pazician: has joined #RubyOnRails
[11:15:35] Tempesta: has joined #RubyOnRails
[11:17:07] akshat: has joined #RubyOnRails
[11:17:16] Pazician: has joined #RubyOnRails
[11:18:45] baweaver: has joined #RubyOnRails
[11:19:42] tbuehlmann: renegadeandy, I think that's what was meant with "110949 <rvanlieshout> and be prepared for endless issues with it :)" :(
[11:19:59] renegadeandy: tbuehlmann: :’(
[11:20:02] _Tariq: has joined #RubyOnRails
[11:20:16] renegadeandy: and this is my first issue, i need a hand if you can help. Just because something is hard doesnt mean we shouldnt try!
[11:21:03] adlerdias: has joined #RubyOnRails
[11:22:10] pawnbox: has joined #RubyOnRails
[11:23:23] Detch: has joined #RubyOnRails
[11:23:37] mikeiniowa: has joined #RubyOnRails
[11:25:02] arup_r: has joined #RubyOnRails
[11:25:03] Pazician: has joined #RubyOnRails
[11:26:16] nerium: has joined #RubyOnRails
[11:26:56] roshanavand: has joined #RubyOnRails
[11:28:27] uglybandersnatch: has joined #RubyOnRails
[11:28:42] DoubleMalt: has joined #RubyOnRails
[11:29:15] ldnunes: has joined #RubyOnRails
[11:31:22] delgiudices: has joined #RubyOnRails
[11:34:24] Dbugger: has joined #RubyOnRails
[11:34:33] tvw: has joined #RubyOnRails
[11:34:35] quazimodo: has joined #RubyOnRails
[11:34:50] Pazician: has joined #RubyOnRails
[11:35:55] pawnbox: has joined #RubyOnRails
[11:36:31] sevenseacat: one day you'll be inclusive, dbugger... one day
[11:36:44] Dbugger: Hello everyone
[11:37:17] helpa: We're not all guys here - while you probably don't meant to be exclusive, not everybody feels that way. Maybe consider using "folks", "y'all" or "everyone" instead?
[11:37:36] Dbugger: I didnt say "guys" :P
[11:37:41] Hates_: I know :(
[11:37:57] Dbugger: In my mind, fellas is as inclusive as "everyone"
[11:38:07] Dbugger: fellas = fellow people
[11:38:10] ariedler: has joined #RubyOnRails
[11:38:19] Dbugger: or "fellow friends"
[11:38:35] Dbugger: In any case, sorry if anyone felt excluded :P
[11:38:55] workmad3_: has joined #RubyOnRails
[11:39:16] djbkd: has joined #RubyOnRails
[11:39:24] jas02: has joined #RubyOnRails
[11:40:06] sysodaff: has joined #RubyOnRails
[11:42:13] Dbugger: I have a Product table and several scopes to fetch the products depending on the type. For instance "Product.rims", "Product.tires", and so on. Now I have a Sales table, with a 1:1 relationship to products. I wanted to make scopes, to separate the sale based on the type of product they sell. I made this: "scope :rims, -> { where(stock_product_id: Product.rims.pluck( :id)) }". I was wondering if there was a more Rail-sy way to do
[11:43:48] _Tariq: has joined #RubyOnRails
[11:43:50] arup_r: dbugger: use .joins(..)
[11:44:09] lxsameer: has joined #RubyOnRails
[11:44:33] mikecmpbll: what's the easiest way to develop two gems in parallel that depend on eachother?
[11:44:35] Dbugger: arup_r, I heard using "joins" in scopes in dangerous, I think... is that true?
[11:44:42] mikecmpbll: i want to be able to test them without actually releasing either gem
[11:45:07] ferr: Does any of you have experience with wicked_pdf gem? I cannot get icons to be loaded: https://gist.github.com/Fercell/79ba3eb9db78c5f9ee08 Neither checkboxes are loaded nor fa icons
[11:46:05] pawnbox: has joined #RubyOnRails
[11:47:08] emachnic: has joined #RubyOnRails
[11:47:57] AimlessRAven: hey in my sidebar i have 2 button with active class, who go active when params[:controller] = "admin/cards" for example
[11:48:28] AimlessRAven: how to set action params, i dont want to set aactive in theese 2 button when i click one of them
[11:48:53] sadaf2606: has joined #RubyOnRails
[11:48:58] Pazician: has joined #RubyOnRails
[11:49:39] mikecmpbll: AimlessRaven : check params[:action] also?
[11:50:29] AimlessRAven: mikecmpbll: yea but what arguments i need to add params[:action] == "admin/cards/index"?
[11:50:42] Hates_: mikecmpbll: you could probably use Bundler.local to set the gem paths
[11:50:49] mikecmpbll: AimlessRaven : just == "index"
[11:51:06] AimlessRAven: mikecmpbll: oks ill try now
[11:51:48] Hates_: mikecmpbll: if that doesn't work, then I think you'd have to set the gem path in your Gemfile before you release it, but you'll have to take it out when you do
[11:52:12] Dbugger: arup_r, the problem there is that if the scope on the Product changes, on the Sale it wont, It is redundant...
[11:53:32] jottr: has joined #RubyOnRails
[11:53:35] dionysus69: has joined #RubyOnRails
[11:54:19] Ergo: has joined #RubyOnRails
[11:54:37] mikecmpbll: Hates_ : ah, thanks, checking out those options now :)
[12:00:28] moeabdol2: has joined #RubyOnRails
[12:01:36] mhoungbo_: has joined #RubyOnRails
[12:01:45] pawnbox: has joined #RubyOnRails
[12:02:17] ascarter: has joined #RubyOnRails
[12:06:16] nfk|laptop: has joined #RubyOnRails
[12:10:42] rickmasta: has joined #RubyOnRails
[12:12:08] arup_r: dbugger: I dunno know it is dangerous..
[12:12:25] arup_r: but, your Inner query is also not bad
[12:12:47] arup_r: what do you mean by "if the scope on the Product changes, on the Sale it wont" ?
[12:13:05] Dbugger: I meant, if the definition for the scopes in Product change
[12:13:37] Dbugger: But I found a pretty clean way: "Sales.joins(:products).merge(Products.rims)"
[12:13:40] pvertenten: has joined #RubyOnRails
[12:13:47] arup_r: dbugger: it is a SQL, so whenever you will call, it should fetch the correct records from db
[12:14:08] nrif12: has joined #RubyOnRails
[12:14:14] Dbugger: so the scope should just be ".joins(:products).merge(Product.rims)"
[12:14:18] arup_r: dbugger: yes with joins. and merge is PERFECT fit for this
[12:14:43] Dbugger: thanks for the help, buddy
[12:14:53] lxsameer: how can i get the current `default_scope` of a model ?
[12:15:24] arup_r: lxsameer: it is sticked FREE :)
[12:15:40] arup_r: if you don't want, then .unscopes
[12:15:47] arup_r: srry .unscoped
[12:15:54] bronson: has joined #RubyOnRails
[12:15:57] arup_r: lxsameer: did I answer you ?
[12:15:57] lxsameer: arup_r, sorry i didn't understand your first sentence
[12:16:15] sp1rs: has joined #RubyOnRails
[12:16:36] arup_r: lxsameer: when you have a default scope, it will be added to any query to that model *by default*
[12:16:47] lxsameer: arup_r, but generally that was what I'm looking for, thanks
[12:17:11] arup_r: oh.. does my first sentence make sense to you? lxsameer :)
[12:17:33] lxsameer: arup_r, no :P
[12:17:37] tknz: has joined #RubyOnRails
[12:17:39] tkiel: has joined #RubyOnRails
[12:17:57] blackmesa: has joined #RubyOnRails
[12:21:06] merida_: has joined #RubyOnRails
[12:21:35] rrrepsaj: has joined #RubyOnRails
[12:22:38] enkristoffer: Can you set default headers somewhere for minitest's post method? It gets a bit bothersome adding them to every single test.
[12:24:10] uglybandersnatch: has joined #RubyOnRails
[12:25:46] merida: has joined #RubyOnRails
[12:25:54] smoitra: has joined #RubyOnRails
[12:28:18] sg19: has joined #RubyOnRails
[12:30:20] siaw_: has joined #RubyOnRails
[12:30:28] blackmesa: has joined #RubyOnRails
[12:32:16] sg19: I am getting this error in ruby: undefined method '<<' for Hash. Is it not available? my code is here: https://gist.github.com/
[12:32:17] arrowcircle: has joined #RubyOnRails
[12:32:32] adaedra: wrong link.
[12:33:02] adaedra: and no, Hash has no << method.
[12:33:05] sg19: has joined #RubyOnRails
[12:33:43] arrowcircle: hi! I'm trying to make a view for admin interface with structure like https://gist.github.com/cortc/38bc6b6c5be8a23cb9c8 . I need to count number of t.cell method calls. How can I organize list_table method? I dont want from where to start
[12:33:54] sg19: https://gist.github.com/ Getting error: undefined method '<<' for Hash. (Sorry if gets reposted - I got disconnected. So not sure if it got posted).
[12:34:20] universa1: sg19: wrong link ;) and Hash has no << method, as adaedra pointed out while you were gone ;)
[12:34:43] adaedra: hah, didn't noticed the disconnect.
[12:35:02] srinidhi: has joined #RubyOnRails
[12:35:58] bePolite: has joined #RubyOnRails
[12:37:24] sysodaff_: has joined #RubyOnRails
[12:39:46] ferr: Does any of you have experience with wicked_pdf gem? I cannot get icons to be loaded: https://gist.github.com/Fercell/79ba3eb9db78c5f9ee08 Neither checkboxes are loaded nor fa icons. When I use debug mode of wicked_pdf which renders html, everything is rendered fine. Any ideas?
[12:42:08] sysodaff_: has joined #RubyOnRails
[12:43:11] merida_: has joined #RubyOnRails
[12:45:27] Pazician: has joined #RubyOnRails
[12:49:34] arrowcircle: hi! I'm trying to make a view for admin interface with structure like https://gist.github.com/cortc/38bc6b6c5be8a23cb9c8 . I need to count number of t.cell method calls. How can I organize list_table method? I dont want from where to start
[12:50:01] gingray: has joined #RubyOnRails
[12:50:57] universa1: arrowcircle: where is your problem?
[12:51:25] universa1: where is the code for list_table?
[12:51:35] arrowcircle: universa1, how to count number of t.cell method calls
[12:51:44] arrowcircle: universa1, thats what i need to write
[12:51:49] universa1: arrowcircle: so start.
[12:52:17] ferr: universa1: do you have any ideas about my issue with wicked_pdf?
[12:52:19] ferr: Does any of you have experience with wicked_pdf gem? I cannot get icons to be loaded: https://gist.github.com/Fercell/79ba3eb9db78c5f9ee08 Neither checkboxes are loaded nor fa icons. When I use debug mode of wicked_pdf which renders html, everything is rendered fine. Any ideas?
[12:52:33] universa1: ferr: no. never used wicked_pdf
[12:52:36] arrowcircle: universa1, from what? what is |t|? what class it should be?
[12:52:43] universa1: arrowcircle: o0
[12:52:51] sevenseacat: arrowcircle: we don't know, it's your code
[12:53:01] sevenseacat: you tell us what it means
[12:53:11] universa1: arrowcircle: you know how passing a block to a ruby method works?
[12:53:16] arrowcircle: sevenseacat, its not a code, its what i want.
[12:53:22] ferr: arrowcircle: http://guides.rubyonrails.org/form_helpers.html
[12:53:25] arrowcircle: universa1, yes
[12:53:53] universa1: arrowcircle: so write that part. what t is, is probably obvious for you then, because i've literally no clue.
[12:54:17] sevenseacat: without seeing a definition of list_table, i've no idea either
[12:54:35] arrowcircle: sevenseacat, I need to write list_table method and cell method.
[12:54:54] mrgreenfur: has joined #RubyOnRails
[12:54:58] sevenseacat: okay, so you obviously know what theyre supposed to do. what part are you stuck on?
[12:54:58] universa1: arrowcircle: so start with writing a list_table method...
[12:55:08] sevenseacat: we don't know what they're supposed to do. only you do.
[12:55:15] universa1: which obviously has a block as a parameter...
[12:55:23] universa1: we are NOT going to do that for you.
[12:55:43] ramortegui: has joined #RubyOnRails
[12:55:45] arrowcircle: yes, block as parameter, but how to count cell method calls inside this block? where to store it?
[12:55:57] universa1: arrowcircle: ignore the counting part for now
[12:55:59] universa1: write the rest
[12:56:03] sevenseacat: i dont even know what that means
[12:56:06] universa1: counting is most likely simple then...
[12:56:25] universa1: if not, come back with what you've written so far then.
[12:56:45] sevenseacat: 'i want to write code that counts things' thats good to know.
[12:57:36] SeanLazer: has joined #RubyOnRails
[12:58:02] ferr: arrowcircle: this is how my tables look: https://gist.github.com/Fercell/1d80ca09db51a22d7099
[12:58:55] aegis3121: has joined #RubyOnRails
[12:59:06] ferr: sevenseacat: how about you, have you ever used wicked_pdf?
[12:59:30] IFrank00: has joined #RubyOnRails
[12:59:32] ferr: Does any of you have experience with wicked_pdf gem? I cannot get icons to be loaded: https://gist.github.com/Fercell/79ba3eb9db78c5f9ee08 Neither checkboxes are loaded nor fa icons. When I use debug mode of wicked_pdf which renders html, everything is rendered fine. Any ideas?
[12:59:40] sevenseacat: i saw the question the first three times you posted it.
[13:00:17] ferr: What could be the issue? CSS fonts declaration?
[13:00:30] bePolite_: has joined #RubyOnRails
[13:00:33] sevenseacat: without seeing it, there's no way of knowing.
[13:01:50] ferr: sevenseacat: U want me to make screenshots or show some more code?
[13:01:59] sevenseacat: ferr: i dont want you to do anything
[13:02:04] sevenseacat: other than stop pinging me
[13:02:22] IFrank00: Im getting this error https://gist.github.com/Frank004/e0160f3c14bd128f5b84 I think is something to do with the connection to the AWS for the imgs on my local
[13:02:58] universa1: IFrank00: https://gist.github.com/Frank004/e0160f3c14bd128f5b84#file-terminal-L2-L3 -- is it?
[13:03:04] sevenseacat: IFrank00: thats not a standard postgres port
[13:03:05] TvL2386: has joined #RubyOnRails
[13:03:17] sevenseacat: so yes, read the error message and verify
[13:03:29] sevenseacat: it's got nothing to do with images
[13:04:26] axilaris: has joined #RubyOnRails
[13:04:44] pcpanic: has joined #RubyOnRails
[13:04:53] axilaris: hi, can someone help me with this error http://imgur.com/FMUStDk. Im trying to create new article in a namespace.
[13:05:02] axilaris: i'ved made the code all in github
[13:05:08] axilaris: https://github.com/axilaris/admin_user_devise_articles/blob/master/app/controllers/admin/articles_controller.rb
[13:05:20] axilaris: https://github.com/axilaris/admin_user_devise_articles/blob/master/config/routes.rb
[13:05:22] universa1: axilaris: form_for [:admin, @article]+
[13:05:23] BradenBraden: has joined #RubyOnRails
[13:05:37] pcpanic: Hello Ruby Masters! Trying to login a form with Mechanize, and no luck on setting the email field and submitting - https://gist.github.com/ysinc88/0b98f6babe6abb742480 Any idea anyone?
[13:05:42] sevenseacat: code is always preferred over screenshots of code.
[13:05:53] Palsson: has joined #RubyOnRails
[13:05:55] axilaris: thanks universa1, let me try that
[13:06:00] axilaris: ok sevenseacat
[13:06:29] sevenseacat: pcpanic: reassigning the emailField variable isnt going to fill out a form field
[13:06:42] universa1: pcpanic: emailField.value = ... maybe
[13:06:43] sevenseacat: setting the value of the field might
[13:06:43] IFrank00: sevenseacat I say ing as Im only using was for that not that imgs are the problem. The other part is the problem of the port is in my part of the setup ?? on my machine and where can I look or find where to confing that. thank you
[13:06:55] sevenseacat: IFrank00: what?
[13:08:18] rrrepsaj: has joined #RubyOnRails
[13:08:20] pcpanic: universa1: Thank you! that worked!
[13:08:26] nerium: has joined #RubyOnRails
[13:08:51] gbgdev: has joined #RubyOnRails
[13:09:17] axilaris: universa1: i cant get that working, here's the error now https://gist.github.com/anonymous/47509909ae3d01ebd58d
[13:09:28] rubyonrailed: has joined #RubyOnRails
[13:09:39] sevenseacat: axilaris: thats not what universa1 said to do
[13:09:58] axilaris: im not sure then
[13:10:19] axilaris: can explain abit ?
[13:10:47] bePolite: has joined #RubyOnRails
[13:11:03] sp1rs: has joined #RubyOnRails
[13:11:55] ruind: has joined #RubyOnRails
[13:12:11] sevenseacat: i'm not sure what you want me to say. compare the two lines of code and find the difference.
[13:12:21] axilaris: form_for ([:admin, @article])
[13:13:34] queuetue: has joined #RubyOnRails
[13:14:11] Pazician: has joined #RubyOnRails
[13:14:20] IFrank00: sevenseacat, sorry. Where can I find the configuration on the postgress port ? or where to look. I haven modify any file.
[13:14:32] sevenseacat: in your database.yml.
[13:15:24] sevenseacat: searching your codebase for '5442' would also be sufficient
[13:16:51] IFrank00: sevenseacat, thank you I let you know
[13:17:21] Pazician_: has joined #RubyOnRails
[13:17:26] yellow5: has joined #RubyOnRails
[13:17:52] walidvb: has joined #RubyOnRails
[13:18:05] petor: has joined #RubyOnRails
[13:18:30] walidvb: i have a RoR app. It has functionalities a, b and c. I need to deploy the almost same app, except it doesn't have functionality c, but it has d
[13:18:36] pwnd_nsfw`: has joined #RubyOnRails
[13:19:00] walidvb: i want both apps to share the codebase in some way, so that they both benefit from new functionalities. not sure what the best way to do this is
[13:20:13] pulgalipe: has joined #RubyOnRails
[13:20:43] walidvb: basically, the following: thepigeonhole.com has a list of curated books. we want to create thepigeonholeacademy.com, where users can submit their own books(likely, on another server.). That would have a different home page, and particularly the admin would change(at least in terms of permissions)
[13:21:11] walidvb: i'm not exactly sure what this implies. I do need my users to be logged in to both sites. so i presume i need a shared database
[13:21:35] walidvb: But i feel it makes sense to have 2 apps running, still
[13:21:49] theblang: has joined #RubyOnRails
[13:22:01] sergey_makagon: has joined #RubyOnRails
[13:23:51] queuetue: HI. On production, I have actionmailer setup to use smtp to mailgun (port 2525) with a mailer that automatically fires (deliver_later) when a user model is created. It works fine from my production box in rails ( user.create(username:"test") ) - the mails arrive as expected. Inside the production server, on the other hand, I see the mail enqueued, and I see the deliveryjob, but the mail never arrives. I hav
[13:23:51] queuetue: e config.action_mailer.raise_delivery_errors = true and no error shows. Can anyone give me a hint what might be going on?
[13:24:02] sp1rs: has joined #RubyOnRails
[13:24:29] queuetue: I meant "in rails console")
[13:24:37] walidvb: But i feel it makes sense to have 2 apps running, still
[13:25:35] queuetue: walidvb, have you considered building gems with your functionality in them so you can share them between servers without repeating code?
[13:25:37] mhoungbo_: has joined #RubyOnRails
[13:25:47] fryguy: queuetue: are you using resque_mailer or anything to buffer mail sends
[13:25:59] queuetue: fryguy: No.
[13:26:23] walidvb: queuetue: not really, no. could be an option, but it would be a huuge refactor, as all funcs are packed within the app as normal components
[13:26:28] queuetue: I realize I should but that wouldn't cause this, would it?
[13:26:32] walidvb: and we have a huge amount of funcs
[13:26:44] walidvb: plus, they need to vary slightly between both apps/envs
[13:27:09] queuetue: walidvb: The work you put in now will pay off in the future. Maintaining two codebases with identical code is near-impossible.
[13:27:32] walidvb: queuetue: this, i defo agree. however, very limited resource so that won't be an option unfortunately
[13:27:59] walidvb: i'm almost thinking of sharing code, monkey patching everything, and activating the monkey patching based on an env variable
[13:28:26] queuetue: It's your resources, so feel free to allocate them as you wish, but it will take more of them to support two codebases. Almost exactly twice as much.
[13:28:30] walidvb: if not monkey patch, at least have chldren classes
[13:28:46] walidvb: queuetue: i get that, and am not considering it as an option :)
[13:29:01] walidvb: and they're not my resources ;) i'm the resource hehe
[13:29:19] walidvb: but i don't say how much time i get to spend where.
[13:29:53] queuetue: fryguy: Would you expect resque_mailer to address my issue at all, or were you just asking?
[13:30:19] chrissonar: has joined #RubyOnRails
[13:31:53] fryguy: queuetue: resque_mailer could cause your issue which is why I askd
[13:32:31] sp1rs: has joined #RubyOnRails
[13:33:37] arup_r: hi walidvb
[13:33:43] walidvb: arup_r: hi?
[13:34:26] nfk|laptop: alright, i got cckblocked by IT dept. on using rails, what's my best PHP alternative to rails?
[13:34:40] nfk|laptop: the php world just looks so alien to me
[13:34:42] fryguy: nfk|laptop: laravel
[13:35:09] nfk|laptop: also does it have anything like bundler?
[13:35:17] fryguy: there is composer
[13:35:23] fryguy: i feel like you are asking these questions in the wrong channel
[13:36:17] chagel: has joined #RubyOnRails
[13:36:28] nfk|laptop: i guess, i'm just scared they'll tear me a new on at php
[13:40:30] solars: has joined #RubyOnRails
[13:40:33] anagha_: has joined #RubyOnRails
[13:41:14] djbkd: has joined #RubyOnRails
[13:42:16] pawnbox: has joined #RubyOnRails
[13:42:34] anagha_: tables are already created in database pg.But when listed not able to see.
[13:43:36] Pazician: has joined #RubyOnRails
[13:43:42] bricker: has joined #RubyOnRails
[13:44:16] pawnbox: has joined #RubyOnRails
[13:44:23] brg: has joined #RubyOnRails
[13:44:33] liquid-silence: has joined #RubyOnRails
[13:44:33] liquid-silence: has joined #RubyOnRails
[13:45:22] chrissonar: How to work around immediate SQL statements when assigning has_many ids, like: https://gist.github.com/christianrolle/e65e7563735253b463da
[13:45:57] htmldrum: has joined #RubyOnRails
[13:46:19] Pazician: has joined #RubyOnRails
[13:47:13] yogeshrt: has joined #RubyOnRails
[13:49:01] bronson: has joined #RubyOnRails
[13:49:20] tjbiddle: has joined #RubyOnRails
[13:49:29] sp1rs: has joined #RubyOnRails
[13:50:22] arup_r: chrissonar: assign_attributes
[13:50:32] arup_r: check that method API
[13:50:43] EdwardIII: hrm i've got these parameters coming in like: "extras"=>["HOND"] - works great as long as i'm outputting as radio buttons. if i need to pass it on, and do <%= stay_request_builder.input field, as: :hidden %>, it comes out as <input class="hidden form-control" type="hidden" value="HOND" name="stay_detail[extras]" id="stay_detail_extras" />
[13:50:55] chrissonar: arup_r, attributes= is just an alias for assign_attributes
[13:51:43] chrissonar: arup_r, and therefore it does not work.
[13:52:07] arup_r: reading the gist again and trying to understand your question :)
[13:52:29] chrissonar: arup_r, nice :)
[13:52:37] EdwardIII: how do i say like "hidden input, but respect the arrayishness of the value?
[13:52:47] Abhijit: has joined #RubyOnRails
[13:53:01] EdwardIII: ah, i think i should have rtfm
[13:53:11] tbuehlmann: chrissonar, updating `"name" => ""` is simply wrong then, right?
[13:54:03] chrissonar: tbuehlmann, this is caught by the validation, which prevents it from saving. but the issue is the task_ids, which then at hits point are already removed.
[13:54:10] mfaeh: has joined #RubyOnRails
[13:54:17] chrissonar: at this point
[13:54:29] Abhijit: my user model has_many users_skills, has_many skills through users_skills and my job model has_many jobs_skills, has_many skills, through jobs_skills, in tthis case how can i do similar thing to <%=current_user.skills%> to print all skills of current user without going in loop? and how can i match current user skills to given job wiithout going in loop?
[13:54:41] tbuehlmann: yeah, using task_ids= is wrong then
[13:54:52] chrissonar: tbuehlmann, is the only option to got the persistence-object-route?
[13:54:57] arup_r: you need #<<
[13:55:17] Pazician: has joined #RubyOnRails
[13:55:47] chrissonar: arup_r, all attributes are in just one hash. it think it is pretty nasty to slice the hash before assignment, isn't it?
[13:55:57] Abhijit: guess not.
[13:55:58] arup_r: I understand the issue.. now. chrissonar why not using accepted_nested_attributes_for ?
[13:56:03] arup_r: not you Abhijit
[13:56:21] arup_r: yeah it is nasty..
[13:56:54] arup_r: but I remember in case of update, I did it like that many times, as I don't know other better way..
[13:57:06] chrissonar: arup_r, because accepts_nested_attributes is for creating/ updating entire associated objects in the scope of (say Person). I only want to assign/remove ids.
[13:57:32] chrissonar: arup_r, what about a persistnce object then? is it overkill?
[13:58:35] ryanab: has joined #RubyOnRails
[14:00:42] IFrank00: sevenseacat, got it working again it was AWS that move the database and got me new link. I was using hardcoded link I change it for a variable so heroku update the aws database link automatic. Thank you.
[14:01:00] arup_r: chrissonar: no idea, as I said I used that `#<<` way.. I will be looking for also, if any other better way exist..
[14:01:26] ruind: has joined #RubyOnRails
[14:01:47] Pazician: has joined #RubyOnRails
[14:02:04] pwnd_nsfw`: has joined #RubyOnRails
[14:02:19] tbuehlmann: what's actually happening there when you remove ids from task_ids? are they removed from the corresponding job?
[14:02:36] griffindy: has joined #RubyOnRails
[14:03:03] Pazician: has joined #RubyOnRails
[14:04:26] arup_r: tbuehlmann: he is telling, if he does like project.name = ""; project.task_ids = [..]; project.save.. now before saving the project, its task_ids are getting replaced with the new ones, while sometime person the parent is not saving because of validation error
[14:08:30] nerium: has joined #RubyOnRails
[14:08:36] tbuehlmann: I know that. what happens when task ids are removed?
[14:09:10] arup_r: chrissonar: ^^
[14:12:58] sp1rs: has joined #RubyOnRails
[14:14:02] ariedler: has joined #RubyOnRails
[14:14:09] i0909: has joined #RubyOnRails
[14:14:45] theblang: has joined #RubyOnRails
[14:18:30] proboszc1: has left #RubyOnRails: ()
[14:18:59] beauby: has joined #RubyOnRails
[14:19:09] tomatoes: has joined #RubyOnRails
[14:19:29] proboszcz: has joined #RubyOnRails
[14:19:34] Abhijit: arup_r, any idea about nested attribute matching?
[14:19:38] merida: has joined #RubyOnRails
[14:22:18] Megamos: has joined #RubyOnRails
[14:24:08] moeabdol: has joined #RubyOnRails
[14:24:53] gingray: has joined #RubyOnRails
[14:24:56] petor: has joined #RubyOnRails
[14:25:27] Abhijit: nvm. got some ugly solution!
[14:25:28] universa1: Abhijit: matches = job.skills & user.skills; missing = job_skills - matches
[14:25:43] akshat: has joined #RubyOnRails
[14:25:50] Abhijit: ok. let me try.
[14:27:27] Abhijit: universa1, that works. thanks. when i do <%= job.skills %> or <%=current_user.skills%> it prints the relation. how can i print the skills without loop? can i or not?
[14:28:14] universa1: Abhijit: you want to render each skill somehow, so you need a loop. if you see it or not doesn't matter, there's still somewhere a "loop" of some kind
[14:28:26] universa1: Abhijit: render partial: "skill", collection: current_user.skills
[14:28:42] Abhijit: ok will try partial.
[14:28:45] Abhijit: thanks again universa1
[14:29:49] emachnic: has joined #RubyOnRails
[14:31:41] mfoo: has joined #RubyOnRails
[14:32:24] mfoo: Is anybody using rolling restarts with unicorn? What criteria do you use to determine if the master is ready before sending QUIT to the old master? Checking that the new rails instances are listening on a port doesn't tell me if any of the old ones are still handling requests
[14:33:06] Pazician: has joined #RubyOnRails
[14:33:19] Ergo^: has joined #RubyOnRails
[14:35:04] tubbo: mfoo: unicorn comes built in with some provisions for that. instead of sending QUIT to the old master, unicorn prefers the HUP signal to tell the worker processes to finish serving requests and then restart themselves.
[14:35:39] baweaver: has joined #RubyOnRails
[14:36:36] mfoo: tubbo: bleh, I was reading about USR2 + QUIT. This is much simpler, thanks
[14:36:52] mfoo: since I'm not upgrading unicorn
[14:37:29] tubbo: yeah, you only need to do that if you want to actually upgrade unicorn's code.
[14:37:29] emachnic: has joined #RubyOnRails
[14:37:45] tubbo: but generally, you should be using HUP to reload code in your app server.
[14:38:01] clayreed: has joined #RubyOnRails
[14:38:49] bricker: has joined #RubyOnRails
[14:39:12] AntiSpamMeta: has joined #RubyOnRails
[14:39:15] clayreed: Hey, has anybody gotten informant-rails to work with the Rails 5 beta?
[14:42:30] jscheel: has joined #RubyOnRails
[14:43:20] pixelhandler: has joined #RubyOnRails
[14:44:11] Abhijit: universa1, its not "matching". it just check if job skill pressent && user skill present. not matching.
[14:44:29] mhoungbo_: has joined #RubyOnRails
[14:44:44] universa1: Abhijit: whaaaaat?
[14:44:51] universa1: Abhijit: code + result => gist
[14:46:05] silverdust: has joined #RubyOnRails
[14:46:13] gingray: has joined #RubyOnRails
[14:46:54] petor: has joined #RubyOnRails
[14:48:02] Abhijit: universa1, https://gist.github.com/abhijitnavale/33496c854efa09912b0e as you can see, the solution suggested by you for if job.skilss && user.skills only check if skills are present. it do not check if it matches or not
[14:48:17] universa1: Abhijit: i dit not suggest &&!
[14:48:53] universa1: Abhijit: there is a difference between && and & !
[14:49:21] andrew-l: has joined #RubyOnRails
[14:49:24] Abhijit: universa1, changed it to singe &. same resurt. listing haskell and painter. which do not match.
[14:50:19] andrew-l: hi - rspec keeps asking me to install a gem but the gem has been installed. how do i fix this issue?
[14:51:20] tubbo: andrew-l: try running within bundle exec
[14:51:26] pvertenten: has joined #RubyOnRails
[14:51:31] dgncn: has joined #RubyOnRails
[14:51:44] universa1: Abhijit: your if condition is wrong.
[14:51:48] sp1rs: has joined #RubyOnRails
[14:51:49] andrew-l: tubbo: thanks!
[14:51:50] lxsameer: has joined #RubyOnRails
[14:52:07] tubbo: andrew-l: no problem :)
[14:52:11] universa1: Abhijit: puts 42 if []
[14:53:20] diegoviola: has joined #RubyOnRails
[14:53:57] tomatoes: has joined #RubyOnRails
[14:54:11] tjbiddle: has joined #RubyOnRails
[14:55:02] rubyonrailed: has joined #RubyOnRails
[14:55:15] gbgdev: has joined #RubyOnRails
[14:55:53] Abhijit: universa1, i dont get it. how is that puts statement related to my if condition?
[14:56:10] universa1: Abhijit: run it.
[14:56:14] universa1: Abhijit: what happens?
[14:56:46] sp1rs: has joined #RubyOnRails
[14:58:15] andrew-l: tubbo: hmmm... nope. still getting same error. I ran: 'bundle exec rspec' 'bundle exec bundle install' (which seems stupid, i know)
[14:58:53] andrew-l: but rspec runs fine on my other branch
[14:58:58] tubbo: andrew-l: i think running `bundle exec bundle install` can cause a black hole to form, be careful man
[14:59:04] andrew-l: i'm just adding a new gem
[14:59:10] tubbo: did you bundle?
[14:59:20] universa1: andrew-l: which gem?
[14:59:22] Abhijit: universa1, in irb, it gives 42 => nil, in erb <%=puts 42 if []%> prints nothing
[14:59:26] andrew-l: output says: using blankslate 3.1.3
[14:59:34] RegulationD: has joined #RubyOnRails
[14:59:44] universa1: Abhijit: so it prints out the 42...
[14:59:54] universa1: Abhijit: what does that say about the "truth"-value of []
[15:00:12] Abhijit: universa1, 2.2.1 :001 > puts 42 if []
[15:00:13] Oliphaunte: has joined #RubyOnRails
[15:00:34] enkristoffer: Can you set default headers somewhere for minitest's post method? It gets a bit bothersome adding them to every single test.
[15:00:40] havenwood: universa1: Everything but nil and false are truthy. #puts returns nil.
[15:00:50] universa1: havenwood: i know that.
[15:01:16] havenwood: universa1: Both your names are green in my syntax highlighting - I got confused.
[15:01:21] SteenJobs: has joined #RubyOnRails
[15:01:25] universa1: havenwood: no worries :-)
[15:02:10] universa1: Abhijit: now that we know that. what happens if you do => (haskell_job.skills & user.skills) ?
[15:02:28] bricker: has joined #RubyOnRails
[15:04:39] ashleyw: has joined #RubyOnRails
[15:05:38] universa1: Abhijit: i gtg, but i hope you understand now why your code does what it does ;)
[15:05:40] Abhijit: universa1, <% if @h.skills & current_user.skills%> True <% else %> False <% end %> outputs True where @h = Job.where(:id=>"47").first
[15:05:51] pixelhan_: has joined #RubyOnRails
[15:05:53] Abhijit: universa1, amm....no!
[15:06:08] Abhijit: i just understood that its ignoring the match requirement!
[15:06:14] universa1: Abhijit: NOOOOIO
[15:06:28] wolfravenous: has joined #RubyOnRails
[15:06:31] universa1: Abhijit: if [] ; True else ; False
[15:06:37] universa1: Abhijit: what does that return?
[15:06:50] universa1: Abhijit: True or False ?
[15:07:29] Abhijit: universa1, nothing.
[15:07:35] universa1: Abhijit: whaaaaat?
[15:07:57] Abhijit: universa1, True. it gives true.
[15:08:03] universa1: Abhijit: ok.
[15:08:17] chipotle: has joined #RubyOnRails
[15:08:33] Abhijit: universa1, whats actually happening?
[15:08:34] universa1: Abhijit: so if you if job.skills & user.skills and they have nothing in common, what is the result of: job.skills & user.skills
[15:08:42] universa1: *so if you do
[15:09:03] Abhijit: if there are no skills in common ,then it still matches it and prints it saying it matched.
[15:09:12] universa1: Abhijit: that was not the question.
[15:09:22] universa1: Abhijit: so if you do job.skills & user.skills and they have nothing in common, what is the result of: job.skills & user.skills
[15:09:29] universa1: just the result of job.skills & user.skills
[15:09:37] universa1: not what your code does. just that one statement.
[15:09:46] tvw: has joined #RubyOnRails
[15:10:12] Abhijit: universa1, it gives True.
[15:10:15] Abhijit: universa1, <% if @h.skills & current_user.skills%> True <% else %> False <% end %> outputs True where @h = Job.where(:id=>"47").first
[15:10:31] universa1: Abhijit: job.skills & user.skills
[15:10:33] universa1: does not give True
[15:10:40] andrew-l: tubbo: solved the bundler missing gem issue: spring was the culprit
[15:10:43] naftilos76: has joined #RubyOnRails
[15:10:46] aegis3121: has joined #RubyOnRails
[15:10:54] andrew-l: i just had to stop spring and rspec did the right thing
[15:10:54] universa1: Abhijit: i said NOT YOUR CODE, just the one statement: job.skils & user.skills
[15:11:05] Abhijit: okdas, ideally it should give false universa1
[15:11:14] openstruct: has joined #RubyOnRails
[15:11:14] rubyonrailed: has joined #RubyOnRails
[15:11:14] teaearlgraycold: That's a set operation, not a conditional one
[15:11:17] universa1: Abhijit: o0 wtf...
[15:11:20] naftilos76: Is there a ruby method that can evaluate ruby+html code ?
[15:11:24] universa1: Abhijit: [1,2,3] & [2,3]
[15:11:31] universa1: naftilos76: erb?
[15:11:31] teaearlgraycold: naftilos76: you mean like ERB?
[15:11:45] universa1: Abhijit: what does that return?
[15:12:00] universa1: Abhijit: wrong.
[15:12:26] tjohnson: has joined #RubyOnRails
[15:12:31] teaearlgraycold: [2, 3]. [1,2,3] | [2,3] is what you want
[15:12:35] universa1: Abhijit: [1,2,3] & [2,3] => [2,3]
[15:12:51] universa1: Abhijit: [1,2,3] & [4] => ????
[15:12:54] naftilos76: universa1, eval() does that but only for ruby code
[15:13:00] universa1: naftilos76: what?!
[15:13:03] Abhijit: i have to check what is & operator. i am not familiar with it universa1
[15:13:10] universa1: teaearlgraycold: have fun taking over...
[15:13:25] universa1: Abhijit: ... do that.
[15:13:30] naftilos76: universa1, don't you know ruby eval method?
[15:13:31] teaearlgraycold: Abhijit: read up on all of the ruby operators while you're at it
[15:13:38] adavia: has joined #RubyOnRails
[15:13:43] rubyonra_: has joined #RubyOnRails
[15:13:45] universa1: naftilos76: i'm not understanding what you are trying to say...
[15:13:47] teaearlgraycold: naftilos76: what problem are you trying to solve
[15:14:03] universa1: and with that i'm gone.
[15:14:07] Abhijit: universa1, bye.
[15:15:26] naftilos76: let me repeat myself, i have a block of source code that includes a html div with some styling and in the div i have some simple ruby code. Is there a way to evaluate that content with a method?
[15:15:28] jayp: has joined #RubyOnRails
[15:15:56] banister: has joined #RubyOnRails
[15:16:31] teaearlgraycold: naftilos76: well if you're using the rails framework you should just put all of that in a partial and have rails use ERB templating on it.
[15:16:45] teaearlgraycold: You can however manually invoke the ERB methods if it's ERB formatted
[15:17:33] teaearlgraycold: naftilos76: if you could post the code it'd help
[15:19:24] bronson: has joined #RubyOnRails
[15:19:25] axl_: has joined #RubyOnRails
[15:19:34] dopamean_: has joined #RubyOnRails
[15:20:47] mustmodify: has joined #RubyOnRails
[15:20:58] mustmodify: Do I need to reset I18n.locale between requests?
[15:21:02] mustmodify: Presumably not, right?
[15:21:15] tubbo: andrew-l: haha yeah...sometimes `bundle exec` gets around it.
[15:21:18] mfaeh: has joined #RubyOnRails
[15:21:22] teaearlgraycold: No unless you're doing something wrong
[15:21:36] tubbo: mustmodify: do you figure out what I18n.locale should be based on some kind of input?
[15:21:40] tubbo: or is it just the default?
[15:22:25] mustmodify: tubbo: For this app, it's set based on a user profile.
[15:22:38] PedramT: has joined #RubyOnRails
[15:22:47] mustmodify: but I just saw evidence that it may be leaking.
[15:22:54] mustmodify: So I guess I'm going to reset it, just surprised.
[15:23:33] rubyonra_: has joined #RubyOnRails
[15:24:06] tubbo: mustmodify: we kind-of have that happen on this one site. the locale sometimes falls back to english in cases where elasticsearch is reindexing
[15:24:28] tubbo: quite unfortunate, i wish i pushed harder for developing in spanish rather than in english. that wouldn't be an issue.
[15:25:19] EdwardIII: hrm i have a design issue
[15:25:42] EdwardIII: i have so my StayRequest can have a bunch of extras, these come from an api based on a bunch of different criteria specific to your exact use-case and search as a user
[15:25:55] EdwardIII: so i don't think a m2m or whatever makes sense in this instance
[15:25:58] mustmodify: tubbo: that's odd.
[15:26:05] arup_r: has joined #RubyOnRails
[15:26:33] EdwardIII: i've come up with the idea of implementing my own objects with load/dump, then i can can use serialize: MyClassName on my model! awesome! and they get saved as json in the db, beautiful
[15:26:55] EdwardIII: but it's kinda a pain to then pass these around between form submits heh
[15:27:04] tubbo: mustmodify: what, the reindexing or how we went about making the site? :)
[15:27:16] EdwardIII: just wondering if anyone has done something like this before? or just wants to accuse me of being insane?
[15:27:16] jas02: has joined #RubyOnRails
[15:27:19] Abhijit: teaearlgraycold, http://www.tutorialspoint.com/ruby/ruby_operators.htm says & copies bits if it presents on both sides. but then i still dont get why my if condition fails.
[15:27:45] mustmodify: mustmodify: that re-indexing caused a change in locale.
[15:27:51] disgrntld: has joined #RubyOnRails
[15:29:05] tubbo: mustmodify: it didn't cause a change in locale.
[15:29:40] tubbo: EdwardIII: i don't know what you're talking about
[15:30:18] tubbo: EdwardIII: but i can tell you that if you're loading/dumping marshalled objects in ruby, why can't i just craft a special request so that you load in my arbitrary ruby code?
[15:31:37] EdwardIII: tubbo: it's a bit of a dangerous guess, but i'm guessing rail's json serialiser on a model doesn't let you serialise methods, only data
[15:31:38] blackmesa: has joined #RubyOnRails
[15:31:44] tubbo: perhaps something like Net::SMTP.start('smtp.gmail.com') { |smtp| smtp.send_message File.read(Rails.root.join('config', 'secrets.yml')), 'edward3@pwned.box', ['tubbo@psychedeli.ca'])
[15:32:03] tubbo: EdwardIII: i wouldn't be so quick to assume that
[15:32:12] mustmodify: or `rm config/database.yml`
[15:32:13] tubbo: given ruby's past history with this feature
[15:32:21] tubbo: mustmodify: now why would i do such a terrible thing like that
[15:33:43] mustmodify: there was a hilarious reddit thread where someone was changing actual OS user passwords by dumping the result of an HTTP post to the command line. Respondents tried to come up with the most devious things they could do to compromise that box. My favorite was someone who renamed 'vim' and 'nano' to 'rm'
[15:33:48] EdwardIII: tubbo: i'll double check it then: https://gist.github.com/EdwardIII/480ef83f734f80748a50
[15:34:28] tubbo: EdwardIII: how's this gonna work? https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-extra_collection-rb-L25-L27
[15:34:54] EdwardIII: heh in a glorious loop of justice
[15:35:31] EdwardIII: https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-extra_collection-rb-L26
[15:36:31] tubbo: ah ok, yeah that's not so bad
[15:36:51] tubbo: EdwardIII: there's a difference between marshalling entire executable ruby objects and just initializing a pre-existing object with json data.
[15:36:56] tubbo: in this case you're ok
[15:37:35] Tyrant505: has joined #RubyOnRails
[15:37:40] EdwardIII: and it's running through this (snipped for readability): https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-a_model-rb-L4
[15:39:32] gbgdev: has joined #RubyOnRails
[15:41:06] KensoDev: has joined #RubyOnRails
[15:42:07] beauby: has joined #RubyOnRails
[15:42:21] EdwardIII: or maybe i SHOULD just do a one-to-many and delete all the old ones
[15:42:27] EdwardIII: this is a common problem for me
[15:42:38] EdwardIII: i've never found a really nice solution to it
[15:42:47] merida: has joined #RubyOnRails
[15:43:00] EdwardIII: * delete all the old ones periodically
[15:43:08] djbkd: has joined #RubyOnRails
[15:44:09] Tyrant505: whats with this new irc proto
[15:45:02] tubbo: Tyrant505: i c u!
[15:45:08] tubbo: Tyrant505: proto?
[15:45:21] tubbo: afaik the new irc protocol hasn't been formally established
[15:45:23] Tyrant505: it was telling me they updated it
[15:45:23] tubbo: irc v3 i assume
[15:45:26] tubbo: oh really? cool
[15:45:42] Tyrant505: using colloquy on mbp
[15:45:47] tubbo: the idea is that eventually, stuff like services and account management will be baked into the irc protocol
[15:45:56] tubbo: Tyrant505: you sure you're not just connected over SSL?
[15:46:23] sp1rs: has joined #RubyOnRails
[15:46:33] Tyrant505: possibly, might be standard on my new download? just formated the fuck out of thsi
[15:47:53] mustmodify: has left #RubyOnRails: ()
[15:48:28] Tyrant505: i used to be an efnet guy
[15:48:47] Tyrant505: but that went to hell after all the gov breakins
[15:49:09] Tyrant505: jeez im getting old
[15:49:19] chouhoul_: has joined #RubyOnRails
[15:49:54] tubbo: Tyrant505: when did the government break into efnet?
[15:50:06] tubbo: ACTION missed the efnet boat and started mostly with undernet
[15:50:13] tubbo: by the time i started IRCing efnet was shitty
[15:50:23] Tyrant505: yea undernet was around then too
[15:50:29] Tyrant505: but efnet was the spot
[15:50:45] Tyrant505: we ran all the best pipes
[15:50:52] dionysus69: has joined #RubyOnRails
[15:51:13] Tyrant505: .nl .se were obviously the best
[15:51:28] Tyrant505: i was in middle school lol
[15:51:39] tubbo: yeah it was good for that too
[15:51:44] tubbo: but not for chatting
[15:51:53] tubbo: a channel i used to frequent moved from efnet to undernet to escape trolls and spammers
[15:52:01] tubbo: then they came to undernet, so we went to freenode when it first started.
[15:52:08] Tyrant505: just old times from an old 30 year old lol
[15:52:23] tubbo: i'm 27, don't remind me :P
[15:52:27] Tyrant505: was fun as hell
[15:52:46] Tyrant505: get that release on the sites
[15:53:01] Tyrant505: i ran a what you call a courier group
[15:53:11] Tyrant505: in fucking middle school
[15:53:42] Tyrant505: i think im in the clear since its been so long ago to speak apon
[15:54:40] Tyrant505: where is rollins
[15:54:43] Tyrant505: i forget his nick
[15:54:53] Tyrant505: he is a reg here
[15:55:13] Tyrant505: i was trying to hire him as sinior dev
[15:55:33] tubbo: haha yeah nobody cares about files you stole 20 years ago
[15:55:49] tubbo: i had access to some topsites because i knew a guy who was part of one of those courier groups
[15:56:20] Tyrant505: i know them all
[15:56:25] chouhoulis: has joined #RubyOnRails
[15:56:38] tubbo: honestly i can't remember, it was like TopFTP or something. never actually downladed anything from it. at the same time, bittorrent was becoming really popular so i mostly focused on that.
[15:56:51] tubbo: irc was too hard to use and never had anything that i couldn't get on bt
[15:57:27] Tyrant505: ie the wolfs den
[15:57:32] tubbo: lol Tyrant505 do you actually have a rails question or are we just going to talk about warez?
[15:57:40] tubbo: it might've been TWD
[15:57:49] Tyrant505: Pixie ran that
[15:58:01] Tyrant505: and no i dont have a rails question right now lol
[15:58:22] d0nn1e: has joined #RubyOnRails
[15:58:26] Tyrant505: just formatted and getting my irc up
[15:58:37] Tyrant505: relaxing at home
[15:59:05] Tyrant505: that was when 10mbs was huge hahaha
[15:59:12] Tyrant505: im out of the game now
[15:59:18] tomatoes: has joined #RubyOnRails
[15:59:19] Tyrant505: for many reasons
[15:59:23] tubbo: yeah, i mean there's less of a "game" these days anyway
[15:59:32] tubbo: now that it's easier to download stuff legally
[15:59:34] Tyrant505: ya its torrents and tor
[15:59:40] tubbo: even that shit is like meh
[15:59:48] tubbo: lot of effort just to not pay a couple bucks
[16:00:16] Tyrant505: as an adult now i dont my paying
[16:00:17] tubbo: it's funny how file-sharing back in the day was the proving ground for all the ways we use media these days
[16:00:24] Tyrant505: but half the stuff is crap
[16:00:44] thebastl: has joined #RubyOnRails
[16:01:00] tubbo: i dunno man, it would have been a lot of effort to download simcity back in the day but now i can just pay some money and get cities: skylines off stema
[16:01:06] PedramT: has joined #RubyOnRails
[16:01:26] baweaver: has joined #RubyOnRails
[16:01:28] tubbo: who wants to sit around decompressing ISOs when you could be building a city and then obliterating it with comets?
[16:01:28] Tyrant505: and agreed apon
[16:01:49] Tyrant505: well back in the day they were way behind us
[16:02:03] Tyrant505: im in agreement
[16:02:37] ivanskie: has joined #RubyOnRails
[16:02:57] Tyrant505: napster was around
[16:03:06] Tyrant505: damn, im old
[16:04:31] mag42c: has joined #RubyOnRails
[16:07:09] umdstu: has joined #RubyOnRails
[16:07:33] umdstu: what would you put in .gemrc to change the "executable directory" path ?
[16:07:39] Tyrant505: anyone looking for senior rails dev position?
[16:08:46] [Butch]: has joined #RubyOnRails
[16:09:56] Uber|Dragon: has joined #RubyOnRails
[16:10:38] Devalo: has joined #RubyOnRails
[16:11:56] Tyrant505: i dont know if this against the rules
[16:12:08] Tyrant505: im taking over the food industry
[16:12:18] tubbo: Tyrant505: not at all, IRC is just probably not a great place to find a jbo
[16:12:30] Tyrant505: so looking for the smartest
[16:12:32] tubbo: umdstu: BUNDLE_BIN changes where bundler saves binstubs.
[16:12:34] arup_r: but I can help to get you some where else
[16:12:37] Tyrant505: my cto has a masters in dba
[16:12:49] arup_r: where you can ask people
[16:13:05] tubbo: imho, chat isn't a great place to get jobs.
[16:13:11] Tyrant505: feel free to msg
[16:13:22] EdwardIII: ungh just did my first bit of metaprogramming
[16:13:52] DmitryBochkarev: has joined #RubyOnRails
[16:14:22] nerium: has joined #RubyOnRails
[16:14:45] ivanskie: has joined #RubyOnRails
[16:14:46] havenwood: Tyrant505: You should be asking for hungry Rails developers who want and kneed to rise to the occasion and make grate things.
[16:14:58] umdstu: tubbo: it's bundler i'm trying to install, hah
[16:15:23] tubbo: havenwood: they would knead to rise to the occasion?
[16:15:41] solars: has joined #RubyOnRails
[16:15:53] tubbo: umdstu: !xy
[16:15:53] helpa: umdstu: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[16:15:57] havenwood: tubbo: dough... my pun failed?
[16:16:24] tubbo: havenwood: no, my sense of humor is just a bit stale.
[16:16:56] AzaToth: has joined #RubyOnRails
[16:17:45] Tyrant505: havenwood haha true story
[16:19:51] umdstu: tubbo: I'm trying to `gem install bundler-1.11.2.gem` and it installs to /usr/bin, whihch is the directory `gem env` has EXECUTABLE DIRECTORY set to. hence me asking how to set that value in .gemrc
[16:20:08] jds: has joined #RubyOnRails
[16:20:40] cryo28: has joined #RubyOnRails
[16:20:47] tubbo: umdstu: not entirely sure how you'd change that. maybe try setting PREFIX=/usr/local/bin...what's the issue with it being in /usr/bin?
[16:20:54] d0nn1e: has joined #RubyOnRails
[16:22:10] umdstu: tubbo: the ruby install put the default bins in /usr/local/bin so I want additional gem bins to go there as well
[16:22:34] umdstu: tubbo: aside from permissions, i wanted consistency
[16:24:47] futilegames: has joined #RubyOnRails
[16:26:06] tubbo: umdstu: i think bundler/rubygems install binstubs to wherever the ruby version has its binary files by default, unless you tell it to generate binstubs within your app that is
[16:26:23] uglybandersnatch: has joined #RubyOnRails
[16:26:28] tubbo: umdstu: so in this case, it might be installed to /usr/bin/bundler because you're using /usr/bin/ruby, or at least gem thinks you are.
[16:26:46] [Tyrant]: who is hungry?
[16:26:53] [Tyrant]: i need devs
[16:27:16] Devalo: has joined #RubyOnRails
[16:28:12] Hates_: bot is hungry!
[16:28:16] Hates_: !botsnack
[16:28:16] helpa: Nom nom. Thanks, Hates_!
[16:33:28] mdw: has joined #RubyOnRails
[16:34:01] merida: has joined #RubyOnRails
[16:39:49] n008f4g_: has joined #RubyOnRails
[16:39:50] roshanavand: has joined #RubyOnRails
[16:40:20] teaearlgraycold: [Tyrant]: Junior rails dev here :P
[16:40:33] teaearlgraycold: So what web startup is this for?
[16:41:34] atrius: has joined #RubyOnRails
[16:42:18] [Tyrant]: im taking over the food industry
[16:42:54] [Tyrant]: already took over motorcycles in the US
[16:43:45] Ergo: has joined #RubyOnRails
[16:44:07] shinnya: has joined #RubyOnRails
[16:46:37] mrbubbles: has joined #RubyOnRails
[16:47:18] someish: has joined #RubyOnRails
[16:47:56] petor: has joined #RubyOnRails
[16:50:13] PedramT: has joined #RubyOnRails
[16:50:20] rogue_koder: has joined #RubyOnRails
[16:50:24] dionysus69: has joined #RubyOnRails
[16:50:49] umdstu: tubbo: yea you're probably correct. seemed like setting GEM_HOME before the gem install did the trick
[16:50:56] tubbo: umdstu: yeah that'll do it :)
[16:50:58] davee_: has joined #RubyOnRails
[16:51:01] bronson: has joined #RubyOnRails
[16:51:11] tubbo: although i'm of the opinion you should never need to mess with that, can be dangerous. not for bundler though
[16:51:17] umdstu: oh i agree
[16:51:30] tubbo: umdstu: for example, say you set GEM_HOME=/location/of/ruby/2.2 but your `ruby` bin points to /location/of/ruby/1.9.3. that might be bad.
[16:51:34] umdstu: just needed to get bundler installed. now i can use bundler for the rest
[16:52:15] umdstu: tubbo: definitely. i only maintain one ruby version on this system though, 2.2. separate system for 1.9.3 before i completely switch over
[16:53:49] IFrank00: has joined #RubyOnRails
[16:54:02] roshanavand: has joined #RubyOnRails
[16:54:04] umdstu: arg. bundle and bundler installed to the correct (and same) directory. but running a `bundle` command fails to find `bundler`. it must be blind
[16:54:21] yellow5: has joined #RubyOnRails
[16:55:13] tubbo: umdstu: see what i mean? :)
[16:57:26] chipotle: has joined #RubyOnRails
[16:57:54] hahuang65: has joined #RubyOnRails
[16:58:03] roshanavand: has joined #RubyOnRails
[16:59:06] choke: has joined #RubyOnRails
[17:02:02] renanoronfle: has joined #RubyOnRails
[17:02:41] lessless: has joined #RubyOnRails
[17:02:49] WilfredTheGreat: has joined #RubyOnRails
[17:03:21] lessless: Hey folks, how to instruct `sanitize()` helper to leave &nbsp ?
[17:05:22] umdstu: lessless: did you google? 'rails sanitize', first result had the answer based on an initial scan. can't be 100% sure tho
[17:05:24] hahuang65: has joined #RubyOnRails
[17:05:40] riotjones: has joined #RubyOnRails
[17:06:23] sleungcy: has joined #RubyOnRails
[17:06:23] umdstu: lessless: if not, then a nasty solution could be gsub before/after
[17:08:28] baweaver: has joined #RubyOnRails
[17:09:49] EdwardIII: i'm struggling to get these params through permit: {"stay_detail"=>{"arrival_date"=>"2016-03-16", "extras"=>{"HOND"=>{"name"=>"HOND", "number_of_extras"=>"1"}, "ONTBIJT"=>{"name"=>"ONTBIJT", "number_of_extras"=>"2"}}}}
[17:10:20] EdwardIII: i tried :extras => [:name, [:name, :number_of_extras], ] but no joy
[17:10:58] umdstu: EdwardIII: i had a similar problem before, i dont recall my solution. give me a minute
[17:11:52] EdwardIII: or maybe i'm abusing simple_fields_for too much
[17:12:44] srinidhi: has joined #RubyOnRails
[17:14:45] polishdub: has joined #RubyOnRails
[17:15:09] qejk: has joined #RubyOnRails
[17:16:37] y2mq37: has joined #RubyOnRails
[17:17:17] dionysus69: has joined #RubyOnRails
[17:19:15] rnda: has joined #RubyOnRails
[17:19:35] draig: has joined #RubyOnRails
[17:20:56] CassioAlmeidas: has joined #RubyOnRails
[17:21:27] umdstu: EdwardIII: is Extra a model?
[17:21:55] umdstu: or is it jsut a serialized field
[17:22:49] EdwardIII: it's a plain old ruby object that gets serialised: https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-extra-rb
[17:23:04] lexileo: has joined #RubyOnRails
[17:23:07] PedramT: has joined #RubyOnRails
[17:23:29] EdwardIII: i think i've managed to sneak it past params, but i'm seeing "Attribute was supposed to be a RezExchange::ExtraCollection, but was a ActionController::Parameters. -- {}" because of https://gist.github.com/EdwardIII/480ef83f734f80748a50#file-a_model-rb-L4
[17:23:41] EdwardIII: but how come this doesn't happen for like... one to many relationships? how does rails navigate those?
[17:24:14] ROUN1N: has joined #RubyOnRails
[17:24:26] CassioAlmeidas: has joined #RubyOnRails
[17:24:36] CassioAlmeidas: how best to migrate a site made in drupal to rails? Exporting data in json format or exporting direct database?
[17:24:53] banister: has joined #RubyOnRails
[17:25:03] dopamean_: has joined #RubyOnRails
[17:28:26] baweaver: has joined #RubyOnRails
[17:28:41] CassioAlmeidas: has joined #RubyOnRails
[17:29:14] CassioAlmeidas: how best to migrate a site made in drupal to rails? Exporting data in json format or exporting direct database?
[17:29:31] EdwardIII: ah, this looks pretty excellent: http://stackoverflow.com/a/31798620/3486297
[17:30:09] EdwardIII: CassioAlmeidas: my feeling is that if you import the whole db structure verbatim and try to build on top of it you'll end up spending a lot of time wrestling rails
[17:30:48] EdwardIII: CassioAlmeidas: but if you build your app then do a migration script to massage the data from one app to the other (either by directly reaching into mysql, or json export or whatever) that pain is only happening at one point
[17:31:30] fryguy: CassioAlmeidas: basically rewriting the application
[17:31:57] sp1rs: has joined #RubyOnRails
[17:33:10] petor: has joined #RubyOnRails
[17:34:07] arup_r: has joined #RubyOnRails
[17:34:14] CassioAlmeidas: has joined #RubyOnRails
[17:34:33] CassioAlmeidas: EdwardIII: thanks
[17:34:43] CassioAlmeidas: fryguy: ok, thanks
[17:34:59] tvw: has joined #RubyOnRails
[17:35:16] chouhoulis: has joined #RubyOnRails
[17:35:23] Rahul_Roy: has joined #RubyOnRails
[17:35:31] yardenbar: has joined #RubyOnRails
[17:36:22] VeryBewitching: has joined #RubyOnRails
[17:36:50] boontdustie: has joined #RubyOnRails
[17:37:13] CassioAlmeidas: has left #RubyOnRails: ()
[17:38:38] smathy: has joined #RubyOnRails
[17:41:05] eyeamaye: has joined #RubyOnRails
[17:41:19] EdwardIII: what do you guys use to manage your apps? ansible & capistrano? just ansible? something like that?
[17:41:32] EdwardIII: i use ansible extensively, not sure if i should bother with cap
[17:42:36] norc: has joined #RubyOnRails
[17:43:02] boontdustie: has joined #RubyOnRails
[17:43:38] fryguy: We use terraform + chef + capistrano at my job
[17:43:54] eyeamaye: has joined #RubyOnRails
[17:45:18] EdwardIII: fryguy: why chef & cap? why not just chef?
[17:45:20] bkulbida: has joined #RubyOnRails
[17:46:04] fryguy: EdwardIII: because chef is declarative, and because of that at any given point in time you don't know the state of your server while it's running. this makes it a poor choice for coordinating and orchestrating changes to multiple servers at once
[17:46:23] fryguy: so facilitating things like 0-downtime deployments is much harder with chef, and much easier with capistrano
[17:47:25] fryguy: chef explicitly precludes you from doing ordered, dependency driven execution of tasks, and capistrano explicitly facilitates that type of thing
[17:47:53] EdwardIII: cool, thanks for the input
[17:48:42] universa1: has joined #RubyOnRails
[17:48:46] norc: fryguy, the main issue for 0 downtime deployment is the server architecture.
[17:49:17] norc: Capistrano can only "trigger" it.
[17:49:18] [Butch]: has joined #RubyOnRails
[17:49:28] fmcgeough: has joined #RubyOnRails
[17:49:46] EdwardIII: i've deployed other apps with ansible, i haven't tied it in with autoscale but apparently that works
[17:49:49] EdwardIII: never a rails app though
[17:50:09] bkulbida: has joined #RubyOnRails
[17:51:03] mostlybadfly: has joined #RubyOnRails
[17:54:00] EdwardIII: gonna try and deploy my first app in the morning
[17:54:35] RoR_need_help: has joined #RubyOnRails
[17:54:58] djbkd: has joined #RubyOnRails
[17:55:03] EdwardIII: puma seems pretty popular
[17:55:06] mwlang: has joined #RubyOnRails
[17:55:29] fryguy: puma and passenger are probably the 2 most common at this point
[17:55:52] EdwardIII: yeah puma seems to be up there on all the howto guides (digital ocean etc)
[17:56:16] tubbo: fryguy: good point, never thought of that (re: cap + chef)
[17:56:33] EdwardIII: tubbo: what's your approach to deployment?
[17:56:35] digitalcakes: has joined #RubyOnRails
[17:57:05] tubbo: EdwardIII: at work, we use chef to build/provision servers and capistrano to deploy to them. this is somewhat because of the fact that we have one ops team, but many build teams for our projects.
[17:57:25] n008f4g_: has joined #RubyOnRails
[17:57:34] tfitts: has joined #RubyOnRails
[17:57:43] broman: has joined #RubyOnRails
[17:58:10] RoR_need_help: has left #RubyOnRails: ()
[17:58:29] tubbo: EdwardIII: for personal projects, i use travis to deploy to staging when new changes are merged to master. when i push a tag to github, it deploys that built tag to production. using heroku for hosting.
[17:58:29] cricket42: has joined #RubyOnRails
[17:59:34] EdwardIII: so travis just does 'git push production 1.5.0' # job done take the rest of the day off?
[17:59:54] EdwardIII: don't you find heroku kind of expensive?
[18:00:22] mwlang: Three ways to do the same thing: https://gist.github.com/mwlang/eb59aad6825bc594befa Which do you prefer and why?
[18:00:51] _bogus_: has joined #RubyOnRails
[18:01:05] RegulationD: has joined #RubyOnRails
[18:01:06] cricket42: has joined #RubyOnRails
[18:02:17] B4daBing73: has joined #RubyOnRails
[18:02:28] sneakerhax: has joined #RubyOnRails
[18:02:32] EdwardIII: based on the source i've been seeing 'a' seems to be the most popular
[18:02:33] cricket42: Hi guys, I am trying to deploy RoR app on Ubuntu server with Capistrano for few days and not making it. Can anyone help me?
[18:02:43] tfitts: I was reading over the weekend and came across these Sandi Metz rules. Anyone here use them?
[18:03:22] fryguy: cricket42: what's the specific problem
[18:03:47] fryguy: tfitts: i don't use the sandi metz rules explicitly, but I use their analogs via flog and flay
[18:04:15] sonofdirt: has joined #RubyOnRails
[18:04:16] dopie: has joined #RubyOnRails
[18:04:18] godzillaenlacasa: has joined #RubyOnRails
[18:04:20] tfitts: EdwardIII: I'd probably use a, I think it has to do with failing early and it looks cleaner than the tertiary
[18:05:24] fryguy: i'd use the 3rd, tertiary is pretty bad and the case isn't exceptional, so it shouldn't have an explicit early return.
[18:06:02] cricket42: @fryguy Last problem I am having is here: http://pastebin.com/XqfU3EBA
[18:07:06] fryguy: cricket42: probably don't use rvm, and you need to install bundler on the machine it looks like
[18:08:10] cricket42: fryguy: I have installed rvm on server and I have specific gemset for my app, but I am not sure that capistrano recongized my gemset.. I have following lines in Capfile: set :rvm_type, :system set :rvm_ruby_version, '2.2.2@project_generator'
[18:08:50] fryguy: you should read the messages that it's telling you. you don't have rvm set up correctly globally
[18:09:47] baweaver: has joined #RubyOnRails
[18:10:12] cricket42: fryguy: what can I do to fix that? I am not quite sure what's wrong with my rvm..
[18:10:27] mwlang: EdwardIII: I haven’t seen version a very much in the wild, but I’m finding I’m writing my code this way more and more.
[18:10:58] snockerton: has joined #RubyOnRails
[18:11:21] fryguy: cricket42: add the necessary rvm invocation to your shell
[18:11:35] snockerton: is it a dumb idea to use an initializer to pull runtime configuration?
[18:11:37] mwlang: I see b and c versions far more often, but find when you combine a few of these together, the logic is more challenging to follow than several a-like methods chained together.
[18:11:44] broman: i have a module inside my app I have the Products model inside that module... from it I want to call another Products model from outside the model.. how can I accomplish that? to call the legacy one i issue an Legacy::Products.method.. but how can i call the Products from inside that Legacy model?
[18:11:55] snockerton: i.e. use rest-client to grab a YML file from somewhere on the network
[18:12:32] fryguy: broman: maybe you want ::Product, i'm not sure I understand the question
[18:12:33] mwlang: tfitts: what’s the link to Sandi Metz’ rules that you’re looking at?
[18:12:47] chouhoulis: has joined #RubyOnRails
[18:12:49] broman: let me try this :)
[18:13:50] broman: fryguy, thank you man!
[18:14:17] fryguy: sweet, i guessed right!
[18:14:46] cricket42: fryguy: How to do that? Sorry for noobie questions, but this is my first deploy on linux server..
[18:14:50] arup_r: mwlang: I will do b.rb
[18:15:03] RegulationD: has joined #RubyOnRails
[18:16:01] fryguy: cricket42: maybe in /etc/profile.d
[18:17:14] arup_r: mwlang: famous https://www.youtube.com/watch?v=npOGOmkxuio
[18:17:31] IFrank00: has joined #RubyOnRails
[18:18:25] cricket42: fryguy: Oh, I forgot, I already added following rvm.sh to that folder: http://pastie.org/10761068
[18:18:27] sp1rs: has joined #RubyOnRails
[18:19:26] fryguy: cricket42: well something is missing then. i don't know what
[18:19:32] fryguy: i'd never use rvm so I don't know much about it
[18:20:05] cricket42: fryguy: Ok thanks, anyway
[18:20:18] SteenJobs: has joined #RubyOnRails
[18:20:55] cricket42: Anyone can help about deploying app with Capistrano, RVM, NGINX, Passenger on Ubuntu Server?
[18:21:25] syndikate: has joined #RubyOnRails
[18:22:43] fox_mulder_cp: geed evening, people
[18:22:43] mwlang: updated my gist with real example and my thoughts there: https://gist.github.com/mwlang/eb59aad6825bc594befa
[18:22:58] fox_mulder_cp: cold at home... brr
[18:22:59] cricket42: @cricket42 test
[18:23:18] tubbo: EdwardIII: not as expensive as being on-call for BS devops issues. plus, my projects are using heroku's free version.
[18:23:21] tubbo: so who knows
[18:23:48] tubbo: mwlang: !g sandi metz poodr
[18:25:31] tubbo: sorry i thought you were asking :D
[18:25:42] mdw: has joined #RubyOnRails
[18:25:44] tubbo: anyway yeah it's just what is outlined in POODR
[18:25:46] manfrin: has joined #RubyOnRails
[18:26:23] bronson: has joined #RubyOnRails
[18:28:16] cnk: has joined #RubyOnRails
[18:28:26] gingray: has joined #RubyOnRails
[18:28:28] EdwardIII: did any of you guys see those videos saying procedural > oo?
[18:28:37] machty_: has left #RubyOnRails: ()
[18:28:43] EdwardIII: was it sandi's code they were using as an example? i think it might have been
[18:28:51] futilegames: has joined #RubyOnRails
[18:29:53] tubbo: EdwardIII: no but are you sure you mean "procedural"? i've seen arguments saying that functional-style programming is a great way to write ruby.
[18:30:19] EdwardIII: heh no he really means procedural, not functional
[18:30:26] EdwardIII: it was on /r/programming a few days ago
[18:30:26] tubbo: EdwardIII: i see. well that person is retarded.
[18:30:52] EdwardIII: https://www.youtube.com/watch?v=IRTfhkiAqPw
[18:31:16] tubbo: nah i think there's a place for most techniques in programming..."procedural" code is great for e.g. creating sample data/seed data for your project.
[18:31:27] tubbo: but you wouldn't want your controller code to be very procedural.
[18:32:29] jstransky: has joined #RubyOnRails
[18:32:36] tubbo: i would describe POODR as a set of guidelines rather than actual rules. it's supposed to make you detect code smells faster, but not be a bible for how you write ruby.
[18:32:59] EdwardIII: it echoes a lot of what david west said
[18:33:06] EdwardIII: pretty sure these were some metrics he used too
[18:33:12] mwlang: I generally follow Metz’ rules. The one rule I tend break most often is 100 lines per class rule.
[18:33:34] blackmesa: has joined #RubyOnRails
[18:34:29] tubbo: mwlang: depending on what class that is, might not be a bad thing. e.g. if it's a model following the active record pattern (not to be confused with using ActiveRecord, the gem, necessarily)
[18:34:31] enkristoffer: has joined #RubyOnRails
[18:34:39] mwlang: IMHO, if you break things apart at an unnatural joint just for sake of having small classes, it can make following the code and having “context” of what’s going on in the classes harder to decipher.
[18:35:11] EdwardIII: yeah if you've ever worked with symfony... that's a good education
[18:35:13] tubbo: that's what nobody seems to get at. they just come at you with "X is bad, use Y" but never mention the fact that hey, maybe "X" is good sometimes and maybe "Y" is good sometimes.
[18:35:48] mwlang: tubbo: one example where this often gets busted is the Draper decorators in which we’re formatting field values for presentation.
[18:36:23] tubbo: mwlang: ah, yeah if we combined all our presenters for Order together, we'd probably be well over a couple hundred lines.
[18:37:27] tubbo: EdwardIII: but yeah, i would be way of anyone that says something is just absolutely bad and you should never use it...there's a reason we
[18:37:49] tubbo: all use technology. it works. it's good enough. it's good enough for now. or maybe, like in OOP, it helps us model things that we couldn't model procedurally.
[18:37:56] tubbo: if we could, why didn't facebook come out in 1975?
[18:38:46] EdwardIII: that being said people are going nuts about the number of classes in the FB mobile app heh
[18:41:55] PedramT: has joined #RubyOnRails
[18:42:03] mwlang: Metz is making a very good point that is almost always missed by new comers. Rails is built to handle CRUD on Active Record patterns, but we’re often building an application that uses Rails but doesn’t necessarily have functionality that maps cleanly to RESTful and AR patterns.
[18:42:29] adre: has joined #RubyOnRails
[18:42:35] mwlang: what I find is that developers will still try to shoehorn such functionality into this pattern when it’s the wrong solution altogether.
[18:43:15] cricket42: Hi ppl, I am having problem when doing first time deploy on my new Ubuntu server. Can anyone take a look? http://pastebin.com/XqfU3EBA
[18:45:25] tubbo: mwlang: metz is talking about the overall way one writes ruby, even if you're not using rails.
[18:45:59] mwlang: tubbo: yes, classic OOP rules
[18:46:30] tubbo: i personally believe that rails was designed with classical OOP in mind...just not all the time.
[18:46:34] Disavowed: has joined #RubyOnRails
[18:46:34] tubbo: because you don't need it all the time.
[18:47:14] tubbo: cricket42: do you have rvm set up properly in your server user's ~/.profile
[18:47:21] tubbo: looks like the deploy user doesn't have rvm set up in their env
[18:47:26] cnk: Gile Bowkett wrote an intersting book / rant about how Rails got OO wrong and still right
[18:47:55] cricket42: tubbo: I installed rvm globaly and added rvm.sh in /etc/profile.d
[18:48:32] tubbo: cricket42: might be something you have to do with cap to get it to run commands using /bin/bash --login
[18:49:01] cricket42: tubbo: how to configure that to my deploy script?
[18:49:21] tubbo: cricket42: if i may make a small suggestion, seeing as this isn't some kind of weird legacy issue and it's your first time...why not use a more simple ruby version manager than RVM? RVM has been replaced mostly by rbenv and chruby (pick one, it doesn't matter) for managing ruby versions.
[18:49:27] tubbo: cricket42: !ubuntu
[18:49:27] helpa: cricket42: Ubuntu, Ruby, ruby-install, chruby, Rails setup guide: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/ - Gauranteed to work 100% of the time or your money back!
[18:49:37] tubbo: there's a guide for it that has worked for many who've come in here.
[18:51:19] renegadeandy: has joined #RubyOnRails
[18:51:48] Oliphaunte: has joined #RubyOnRails
[18:51:59] netzfisch: has joined #RubyOnRails
[18:52:22] snockerton: docker pull rails:onbuild
[18:53:21] myntcake: has joined #RubyOnRails
[18:53:23] cricket42: tubbo: I used rvm earlier..that's why.. do you have any idea whats wrong with my deployment?
[18:53:34] tubbo: cricket42: nope.
[18:53:44] tubbo: cricket42: i mean, i kinda do...like it seems rvm is not being loaded properly.
[18:53:52] tubbo: but any more than that i'm not sure
[18:54:29] cricket42: tubbo: ok..thanks
[18:55:51] petor: has joined #RubyOnRails
[18:56:19] cnk: cricket42: what are you using for your deploys? is this capistrano or some automated tool?
[18:56:30] cricket42: cnk: capistrano
[18:56:35] intrigueD: has joined #RubyOnRails
[18:56:56] cnk: capistrano is sshing in using a shell that isn't set as a login shell
[18:56:57] Uber|Dragon: has joined #RubyOnRails
[18:57:12] cnk: there is a capistrano directive you need to make this a login shell and not a subshell
[18:57:57] tvw: has joined #RubyOnRails
[18:57:59] cnk: http://capistranorb.com/documentation/faq/why-does-something-work-in-my-ssh-session-but-not-in-capistrano/
[18:59:31] emachnic: has joined #RubyOnRails
[18:59:50] banister: has joined #RubyOnRails
[18:59:51] SteenJobs: has joined #RubyOnRails
[19:00:13] cnk: I don't see the directive I used in the older version of capistrano. So, in this case, converting to one of the other ruby managers might be the answer
[19:03:31] SteenJobs: mwlang: is there a classic type of app that comes to mind? (where it’s shoehorned to fit a RESTful pattern)
[19:03:50] chipotle: has joined #RubyOnRails
[19:04:00] cricket42: cnk: I will try to add login shell to capistrano..if I change to some other ruby managers, I suppose i will have other problems, so i will remain on rvm for now..
[19:06:07] havenwood: cricket42: If you only need one Ruby, Brightbox maintains nice up-to-date Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
[19:06:15] tubbo: cricket42: frankly, i feel like you'll have more problems sticking with RVM than you will have moving to a nother version manager and figuring out its idiosyncracies at this stage in the game.
[19:06:29] tubbo: mostly because people overwhelmingly don't use it anymore.
[19:07:20] Regulati_: has joined #RubyOnRails
[19:07:44] mwlang: SteenJobs: one example: “as a system admin, I can approve a new user account” A lot of developers will pass addtional parameters in on the #update action to switch on updating that new user account vs. adding a new method #approve to the users controller that is specific to approving the user account.
[19:07:56] mwlang: because they only think in terms of the RESTful CRUD actions.
[19:08:53] emachnic_: has joined #RubyOnRails
[19:09:08] mwlang: that poor decision also leads to adding logic into the views and conditionally showing an edit form vs. showing user details with an “approve” button, etc.
[19:09:33] baweaver: has joined #RubyOnRails
[19:10:37] cnk: havenwood: thanks for the tip about the Ubuntu packages
[19:13:29] roshanavand: has joined #RubyOnRails
[19:15:47] SteenJobs: mwlang: ah yea, i totally see that. i guess a lot of user model related logic ends up getting squished into CRUD actions when they’re really something distinct. no need to muddy the update waters when you’re simply approving a user
[19:15:57] sp1rs: has joined #RubyOnRails
[19:16:30] cricket42: cnk: I added set :default_shell, "bash -l" in Capfile and still getting same error
[19:16:30] yardenbar: has joined #RubyOnRails
[19:16:52] SteenJobs: mwlang: so how do you usually resolve such a dilemma
[19:16:57] cnk: Sorry I haven't used a recent capistranor
[19:17:28] cricket42: cnk: Do you have any good guide for deploying rails app with capistrano?
[19:17:28] cnk: My top choices for this would be the Brightbox packages or one of the simpler ruby managers
[19:17:50] cnk: Sorry, I haven't used the latest cap so no help
[19:17:58] mwlang: SteenJobs: well, in this case, separate “approve” to it’s own action and remove all the conditional logic so that update does just what it’s supposed to do — update user attributes from an edit form.
[19:18:07] cnk: when I used it there was a set pty or tty option
[19:18:11] cricket42: cnk: I am using AWS server now
[19:18:19] cnk: what OS
[19:18:29] SteenJobs: mwlang: i guess more in the sense of how to reconcile the inevitable need for non-CRUD actions when building an app in rails
[19:18:59] cnk: I still like rvm for development but esp with cheap instances, the case for a ruby manager in production is weak
[19:19:11] deur-_: has joined #RubyOnRails
[19:19:12] aegis3121: has joined #RubyOnRails
[19:20:18] mwlang: SteenJobs: I just do it. It’s not a debate in my mind, but it often is for junior developers joining a project — a well established project needs no real training for new developers joining, but when taking on a poorly built “rescue” project, it’s an educational chore to show the existing team the light of the better way.
[19:21:09] tubbo: SteenJobs: if you want to see why rails is the way it is, use basecamp.
[19:21:20] bePolite: has joined #RubyOnRails
[19:21:46] tubbo: rails has a few criteria for new features, in priority order: 1.) does basecamp use it?, 2.) do most rails developers need it?, 3.) how many people would get mad at us if we made it this way?
[19:22:02] tubbo: what's good for basecamp is good for all rails developers.
[19:22:20] tubbo: but rails also gives you the opportunity to take out shit that is getting in your way
[19:23:12] roshanavand: has joined #RubyOnRails
[19:23:26] mdw: has joined #RubyOnRails
[19:23:45] mwlang: tubbo: like ERB. :-D
[19:24:05] SteenJobs: tubbo: will do
[19:24:18] tubbo: mwlang: haha or turbolinks, or actioncable, or sprockets, or...
[19:24:22] tubbo: activerecord
[19:24:56] SteenJobs: mwlang: light of the better way referring to which way?
[19:24:58] mwlang: ah, turbolinks…that’s the first thing I rip out every time.
[19:25:04] SteenJobs: ugh turbolinks. just ugh.
[19:25:16] yellow5: has joined #RubyOnRails
[19:26:10] SteenJobs: mwlang: i guess the approach you’re saying is instead of all or nothing, all RESTful and CRUD with rails vs. none with a different framework, with Rails it should be a RESTful and CRUD primarily, with exceptions to the rule
[19:26:31] tubbo: mwlang: get down on that --skip-turbolinks --skip-test-unit tip ;)
[19:26:40] tubbo: for example i always --skip-test-unit, because i use rspec
[19:27:03] tubbo: SteenJobs: "all or nothing" approaches almost never work in software design.
[19:27:50] SteenJobs: right, i’m saying that’s the issue he raised. that devs feel the need to shoehorn things into CRUD actions because they’re using Rails and feel the need for an “all or nothing” approach, when in reality it should be CRUD is the rule, but there are exceptions
[19:30:41] baweaver: has joined #RubyOnRails
[19:30:51] EdwardIII: i've been playing with turbolinks
[19:30:56] EdwardIII: i kinda like it
[19:31:45] mwlang: SteenJobs: let’s rephrase that: 1) know the rules, 2) know when to break them, and most importantly, 3) know what you want to build. Rails distills an opinion that makes it hard to ignore the implied rules. That’s it’s strength. It’s weakness is that newcomers think it’s the only way to do it — it’s a long time before they question how they’ve been building functionality inside a Rails app and that includes even
[19:31:46] mwlang: experienced developers like me. I didn’t become a better Rails developer until I started building Sinatra apps and Ruby apps that have nothing to do with Web…then I came back to Rails and realized I’d been partially brainwashed and drinking too much koolaid.
[19:31:46] SteenJobs: i’ve just wasted way too much time tracking down bugs in my JS that ended up being because of turbolinks so i gave it up.
[19:32:13] yxejamir: has joined #RubyOnRails
[19:32:13] yxejamir: has joined #RubyOnRails
[19:32:25] SteenJobs: mwlang: wise words sir! well said
[19:33:15] dopamean_: has joined #RubyOnRails
[19:33:40] SteenJobs: mwlang: for me, i started to appreciate the implied rules and convention once i started doing iOS development. having agreed upon Best Practices is an incredible asset to have when doing development, especially because there are so many ways to implement the same thing, some better than others. With iOS, there was little unanimity, and i missed the ability to immediately research BPs with Rails
[19:34:12] SteenJobs: mwlang: on the same note, that’s really the whole idea behind BPs. All things considered in a perfect world, you should follow BP, but every situation is different and it may require using alternate methods. and that’s OK.
[19:34:35] arup_r: BP means?
[19:35:11] IFrank00: What is the corre syntax for doing this https://gist.github.com/Frank004/e311b7889d19ecb4d51a
[19:35:46] SteenJobs: arathald: best practice
[19:36:20] tubbo: IFrank00: well first of all you're using the greater-than (>) operator rather than the less-than operator (<)...
[19:36:22] cnk: IFrank00: you may need to use 'having' instead of 'where'
[19:36:30] cnk: count is an aggregate function
[19:36:36] arup_r: Employee.includes(:trainings).where('trainings.count > ?', 10).references(:trainings)
[19:36:47] arup_r: IFrank00: ^^
[19:36:59] baweaver: has joined #RubyOnRails
[19:36:59] IFrank00: opps thank you yes the other way jaaj
[19:37:00] arup_r: now it WILL work
[19:37:04] cnk: arup_r: why the 'references(:trainings)
[19:37:04] roshanavand: has joined #RubyOnRails
[19:37:29] arup_r: cnk: that is how they documented.. if you use condition in Hash style, then don;t need it
[19:37:43] arup_r: but if you use SQL like where, you have to say Rails that thing
[19:37:53] arup_r: cnk: mentioned in the doc..
[19:37:57] cnk: hmm thanks
[19:38:10] tubbo: arup_r: that would return the wrong object though, he wants Employees not Trainings.
[19:38:30] tubbo: he wants all employees where the amount of trainings associated with said employee is less than 10.
[19:38:30] arup_r: I concentrated the error first tubbo :)
[19:38:44] arup_r: Logic I didn't check yet
[19:38:54] BBonifield: has joined #RubyOnRails
[19:38:55] tubbo: arup_r: i don't even think your solution would work for the error
[19:38:55] pragmatism: has joined #RubyOnRails
[19:39:06] arup_r: It WILL I bet
[19:39:32] BBonifield: What is the difference between `autoload: true` and `autoload_once: true` when adding paths in application.rb?
[19:39:55] arup_r: IFrank00: can you try it in rails console.. leave the logical error for now.. fix the syntax first
[19:40:08] arup_r: we will fix logic later
[19:40:19] IFrank00: arup_r, yes im checking it out
[19:40:34] IFrank00: thank you for the time
[19:41:26] arup_r: trainings.count syntax wouldn't work.. but it will remove the first error..
[19:44:20] arup_r: Employee.joins(:trainings).group("employees.id").having('COUNT(employees.id) > ?', 10).select("employees.id, *") try this for actual logic.
[19:44:28] arup_r: IFrank00: ^^ final code.
[19:44:49] tubbo: yeah that'll do it
[19:44:56] tubbo: arup_r: man i almost won some money
[19:45:11] arup_r: tubbo: first answer, was to fix the error in our table :D
[19:45:55] arup_r: That error comes when you use `.includes` but without `.references` clauses, when included relation used in where clause like a SQL ..
[19:46:04] arup_r: and that error caught my eyes.. :D
[19:46:38] arup_r: tubbo: now you can see, how many times I did the same mistake, so I know the reason of that error exactly.. haha
[19:46:48] IFrank00: so when using where always use '.references'
[19:47:07] tubbo: IFrank00: absolutely not.
[19:47:16] roshanavand: has joined #RubyOnRails
[19:47:39] arup_r: IFrank00: ^^
[19:48:18] SteenJobs: why does .count being an aggreagate function prevent it from working in this case?
[19:48:43] IFrank00: arup_r, yeah thats the error that im getting
[19:48:53] jenrzzz: has joined #RubyOnRails
[19:49:22] arup_r: what code and what error?
[19:49:32] thebastl: has joined #RubyOnRails
[19:49:48] IFrank00: arup_r, im updating the gist
[19:50:15] bricker: has joined #RubyOnRails
[19:50:36] IFrank00: https://gist.github.com/Frank004/e311b7889d19ecb4d51a
[19:51:17] arup_r: yes, error changed now..
[19:51:34] arup_r: new error is welcome :)
[19:51:47] arup_r: IFrank00: You need this `Employee.joins(:trainings).group("employees.id").having('COUNT(employees.id) > ?', 10).select("employees.id, *") `
[19:51:53] arup_r: forgot the old code
[19:52:15] bronson: has joined #RubyOnRails
[19:52:18] IFrank00: arup_r, how do you search the docs so fast LOL
[19:52:54] arup_r: wait my joins is broken.. that `.groups` are so worst while selecting.. 1 min
[19:53:39] arup_r: you have a thorugh: table humm..
[19:53:41] jtong: has joined #RubyOnRails
[19:53:57] IFrank00: jeje yeah im using a through
[19:54:22] Rahul_Roy: has joined #RubyOnRails
[19:54:28] ewilliam: has joined #RubyOnRails
[19:55:00] arup_r: IFrank00: now you need to rock and roll your query... hehe
[19:55:21] arup_r: without rails console and data, tough to help for me..
[19:56:09] arup_r: but, Employee.joins(:trainings).group("employees.id").having('COUNT("training_employees.id") > ?', 10).select("employees.id, *") <~~ try
[19:56:30] arup_r: and that's my last attempt.. you need to fix it by yourself.. as I have no data here
[19:57:10] mdw7: has joined #RubyOnRails
[19:57:52] IFrank00: arup_r, problem You help me a lot more of what expected I think I can handle my self from here.
[19:58:16] arup_r: thanks :)
[19:59:46] rrrepsaj: has joined #RubyOnRails
[20:02:06] netzfisch: has joined #RubyOnRails
[20:03:33] ur5us: has joined #RubyOnRails
[20:04:04] IFrank00: arup_r documentation from your part a look more in to it
[20:05:54] solars: has joined #RubyOnRails
[20:06:18] chouhoulis: has joined #RubyOnRails
[20:06:44] jtong_: has joined #RubyOnRails
[20:10:39] mdw: has joined #RubyOnRails
[20:12:13] srinidhi: has joined #RubyOnRails
[20:12:51] PaulePanter: Hi. For my session store I like to use whatever is configured in my environment as the cache store.
[20:12:58] PaulePanter: Rails.application.config.session_store
[20:13:11] PaulePanter: … in `config/initializers/session_store.rb`.
[20:13:46] PaulePanter: But the documentation does not list it.
[20:13:47] PaulePanter: http://guides.rubyonrails.org/configuring.html
[20:13:56] mag42c_: has joined #RubyOnRails
[20:14:02] PaulePanter: > config.session_store is usually set up in config/initializers/session_store.rb and specifies what class to use to store the session. Possible values are :cookie_store which is the default, :mem_cache_store, and :disabled. The last one tells Rails not to deal with sessions. Custom session stores can also be specified:
[20:14:13] blackmesa: has joined #RubyOnRails
[20:14:25] baweaver: has joined #RubyOnRails
[20:15:00] PaulePanter: Any idea, what speaks against `Rails.application.config.session_store ActionDispatch::Session::CacheStore`?
[20:15:07] PaulePanter: … and why it is not listed?
[20:16:27] PaulePanter: The reasoning is, that Memcached should not be required during development, so I’d like to use whatever cache store is defined in the environment under `config/environments`.
[20:16:59] rickmasta: has joined #RubyOnRails
[20:17:18] roshanavand: has joined #RubyOnRails
[20:19:46] beauby: has joined #RubyOnRails
[20:19:53] tenderlove: has joined #RubyOnRails
[20:23:11] trosborn: has joined #RubyOnRails
[20:23:48] SteenJobs: has joined #RubyOnRails
[20:27:50] _bogus_: hi there.. im trying to create a custom page for when the user signs up, telling him to check his confirmation email (im using devise). couldnt find a similar page in devise views so Im creating a new one under usuarios#confirmacao, but i would like to render the confirmation resend form from devise, which requires a 'resource' variable, which I suppose is the Usuario model (record) for the user signing up, tho im not very sure how to set
[20:27:50] _bogus_: this... any ideas?
[20:28:13] uglybandersnatch: has joined #RubyOnRails
[20:28:28] jtong: has joined #RubyOnRails
[20:29:02] mdw7: has joined #RubyOnRails
[20:29:38] timdotrb: has joined #RubyOnRails
[20:29:50] timdotrb: Afternoon, all
[20:30:01] bronson: has joined #RubyOnRails
[20:36:18] e: has joined #RubyOnRails
[20:39:01] mag42c: has joined #RubyOnRails
[20:40:05] yardenbar: has joined #RubyOnRails
[20:40:30] davee_: has joined #RubyOnRails
[20:40:45] maxx88: has left #RubyOnRails: ()
[20:43:19] m15k_: has joined #RubyOnRails
[20:44:47] m15k_: Hi. Howto configure a log in a daemonized rackup process?
[20:45:15] yekta: has joined #RubyOnRails
[20:46:12] mdw: has joined #RubyOnRails
[20:46:47] agit0: has joined #RubyOnRails
[20:47:04] PedramT: has joined #RubyOnRails
[20:48:22] PedramT_: has joined #RubyOnRails
[20:48:29] tubbo: m15k_: Logger.new '/var/log/whatever.log'
[20:48:39] AntiSpamMeta: has joined #RubyOnRails
[20:48:41] tubbo: you should be able to log to any file
[20:49:05] blackmesa: has joined #RubyOnRails
[20:49:30] Didac: has joined #RubyOnRails
[20:49:57] m15k_: tubbo - I start an app using rackup with --damonize
[20:50:05] mrgreenfur: has joined #RubyOnRails
[20:50:06] mdw7_: has joined #RubyOnRails
[20:50:20] m15k_: Do you mean I need to adjust the Rackfile?
[20:50:51] tubbo: m15k_: ruby's stdlib has a Logger class that you can use to write to a file. http://ruby-doc.org/stdlib-2.1.0/libdoc/logger/rdoc/Logger.html
[20:50:53] mdw7: has joined #RubyOnRails
[20:54:06] m15k: has joined #RubyOnRails
[20:54:48] yekta: Hello, I used to have an Upload class which used to use paperclip and now I’ve broken it apart into several other models (Images, Contracts etc) which all inherit from Upload and each define their own paperclip settings but use the same database table through Upload. Upload still belongs_to a Project. My problem is now that I’ve set this up when I do project.contracts or project.images I get results of Upload class type. D
[20:54:49] yekta: need to use polymorphic associations to get the right object types?
[20:56:16] mwlang: Is there anything out there I can feed a Ruby script and it’ll analyze and tell me exactly what’s duplicate code?
[20:56:54] tubbo: mwlang: codeclimate? flog? flay?
[20:57:27] mwlang: I have a 500 line ERB file I swear is 80% identical and ultimately about 50 lines repeated under one conditional after another.
[20:58:14] mwlang: tubbo: hmmm…haven’t looked at flog or flay in a while…
[20:58:20] rickmasta: has joined #RubyOnRails
[20:58:23] treehug88: has joined #RubyOnRails
[20:59:08] tubbo: mwlang: the tools i suggested might be better at finding duplicate code between multiple files (since that is most likely the case) than in the same file.
[20:59:18] tubbo: mwlang: like in the same file can't you just look at it? :P
[21:00:58] johnflux: has joined #RubyOnRails
[21:00:59] mwlang: tubbo: it’s is friggin’ mess. of I18n calls and inline if/else
[21:01:24] tubbo: mwlang: sometimes duplication isn't a bad thing. www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction
[21:01:29] tubbo: http://www.sandimetz.com/blog/2016/1/20/the-wrong-abstraction for the linkable
[21:01:45] jtong: has joined #RubyOnRails
[21:02:10] mwlang: tubbo: well…here’s the kicker — *why* is it duplicated?
[21:02:20] tubbo: mwlang: good question
[21:02:31] tubbo: mwlang: could be that it's 80% the same except 20% different, and the dev was lazy
[21:02:32] jtong: has joined #RubyOnRails
[21:02:41] tubbo: but you're the one who's looking at it so you'd have a better idea than i would.
[21:04:48] mwlang: tubbo: looks like 2nd dev was lazy…didn’t understand 1st dev’s code, so just copied it to match his specific scenario…(working hypothesis…)
[21:05:22] m15k: https://gist.github.com/asbachb/58cae6a0f71ed78c5358 - any suggestions what's the problem?
[21:06:21] mwlang: just found another one…just 150 lines…https://gist.github.com/mwlang/3316b3c9d77f17de20b3
[21:06:32] mwlang: probably just going to have to grin and bear it to refactor it.
[21:06:45] mrgreenfur: mwlang: oh dear lord
[21:07:16] mwlang: mrgreenfur: I can pray for devine inspiration, too. :-)
[21:07:28] mrgreenfur: i always thought this was the stuff that you just never touch until it breaks ...
[21:07:40] mrgreenfur: lol, this isn’t #prayers?
[21:07:59] mwlang: mrgreenfur: or when you gotta bring it over to Rails 4 from Rails 1…
[21:08:04] axl_: has joined #RubyOnRails
[21:08:08] mrgreenfur: mwlang: ahhhh
[21:08:17] mrgreenfur: just gem update and it'll be fine
[21:08:43] mrgreenfur: i should change my nick to “ShittyRailsAdvice"
[21:10:33] nerium: has joined #RubyOnRails
[21:10:45] qejk: has joined #RubyOnRails
[21:11:03] mwlang: mrgreenfur: nah, just “mrsnarky” :-)
[21:11:20] mwlang: yeah, I’m just gonna have to wade through this.
[21:11:53] mrgreenfur: mwlang: you can do it! mr positivitity!
[21:11:58] mrgreenfur: it’ll be fun!
[21:13:25] Maletor: has joined #RubyOnRails
[21:13:39] ziyadb: has joined #RubyOnRails
[21:14:06] mdw: has joined #RubyOnRails
[21:14:09] rubyonrails684: has joined #RubyOnRails
[21:16:50] greengriminal: has joined #RubyOnRails
[21:18:16] jenrzzz: has joined #RubyOnRails
[21:21:55] jkahn: has joined #RubyOnRails
[21:22:18] maxx88: has joined #RubyOnRails
[21:24:37] jscheel: has joined #RubyOnRails
[21:24:53] Tyrant505: has joined #RubyOnRails
[21:25:05] VeryBewitching: mwlang: That is one busy view
[21:25:26] Devalo: has joined #RubyOnRails
[21:25:32] n008f4g_: has joined #RubyOnRails
[21:25:49] choke: has joined #RubyOnRails
[21:28:17] VeryBewitching: mwlang: I would consider partials for each tab content block and a helper to build the containers proceduraly.
[21:28:20] Radar: GOOD MORNING
[21:29:13] mwlang: VeryBewitching: funny. that’s what I’m doing. Every tab is becoming a partial at the moment. then I’ll diff each one and collapse futher if no discernable diff.
[21:29:19] beauby: has joined #RubyOnRails
[21:29:39] mwlang: then finally, I’ll figure out what’s really needed and isn’t.
[21:30:24] mwlang: some of it makes no sense because they’re rendering a tab and putting “no content” in there, but further up, they don’t even add a tab to the available_tabs list if it’s going to be empty…
[21:31:02] mdw7: has joined #RubyOnRails
[21:31:28] VeryBewitching: Was hard for me to read at first and couldn't figure out why, then realized it's ERB
[21:32:44] mdw7_: has joined #RubyOnRails
[21:32:57] Didac: has joined #RubyOnRails
[21:33:20] jayp: has joined #RubyOnRails
[21:33:52] baweaver: has joined #RubyOnRails
[21:35:37] mwlang: VeryBewitching: what? you mean there’s so much ruby in there it’s like ERB embedded in Ruby instead of the other way around? :-)
[21:36:11] VeryBewitching: mwlang: I haven't written HTML in over a year, I use HAML
[21:36:26] VeryBewitching: My brain had to catch up to fully parse it is all :D
[21:36:38] mwlang: html2haml is my friend in this project.
[21:38:01] VeryBewitching: Did you pick up maintenance of it from other developers?
[21:38:48] mostlybadfly: has joined #RubyOnRails
[21:39:04] mwlang: yes. not my code.
[21:39:15] mwlang: Rails 1.2 code at that.
[21:39:21] yekta: http://stackoverflow.com/questions/36022642/multiple-models-with-paperclip any feedback would be great
[21:40:27] VeryBewitching: yekta: That's an interesting SO question.
[21:41:12] bronson: has joined #RubyOnRails
[21:41:12] sp1rs: has joined #RubyOnRails
[21:41:53] ivanskie: has joined #RubyOnRails
[21:42:26] intrigueD: has joined #RubyOnRails
[21:42:32] yekta: Thanks. I’m a little perplexed myself.
[21:43:07] VeryBewitching: mwlang: A project manager last week tried to give me some work to do on an application designed to perform executive assessments of companies prior to purchase. The original developers built this application in... WordPress.
[21:43:23] Uber|Dragon: has joined #RubyOnRails
[21:44:24] VeryBewitching: yekta: I'm not sure I could give valuable advice on this, I've never worked with Rails 3
[21:44:47] pawnbox: has joined #RubyOnRails
[21:44:51] yekta: This is rails 4, I should update the tag.
[21:45:37] Radar: yekta: should that second accepts_nested_attributes_for perhaps be for s3_files?
[21:45:59] chipotle: has joined #RubyOnRails
[21:46:45] Pulp: has joined #RubyOnRails
[21:46:53] VeryBewitching: Radar: Good catch.
[21:47:10] yekta: Radar: ah yeah, bad copy/paste
[21:47:49] jtong: has joined #RubyOnRails
[21:48:43] abhishekvasisht: has joined #RubyOnRails
[21:49:46] _bogus_: hi there.. im trying to create a custom page for when the user signs up, telling him to check his confirmation email (im using devise). couldnt find a similar page in devise views so Im creating a new one under usuarios#confirmacao, but i would like to render the confirmation resend form from devise, which requires a 'resource' variable, which I suppose is the Usuario model (record) for the user signing up, tho im not very sure how to set
[21:49:46] _bogus_: this... any ideas?
[21:52:23] jottr: has joined #RubyOnRails
[21:54:05] lacuna: has joined #RubyOnRails
[21:55:44] GreatDanton: has joined #RubyOnRails
[21:55:56] mdw: has joined #RubyOnRails
[22:02:06] jottr: has joined #RubyOnRails
[22:03:29] ivanskie: has joined #RubyOnRails
[22:04:45] cnk: has joined #RubyOnRails
[22:04:54] axilaris: has joined #RubyOnRails
[22:05:52] rubyonrailed: has joined #RubyOnRails
[22:07:37] baweaver: has joined #RubyOnRails
[22:09:10] uglybandersnatch: has joined #RubyOnRails
[22:10:43] Palsson: has joined #RubyOnRails
[22:10:59] mdw: has joined #RubyOnRails
[22:11:30] axilaris: hi all, i'ved got this error exception https://gist.github.com/anonymous/a850a0fc278ad2b1a5fc
[22:11:40] axilaris: basically im trying to signout https://github.com/axilaris/admin_user_devise_articles/blob/master/app/views/admin/dashboard/index.html.erb
[22:12:02] axilaris: and when signingout i want to redirect to the relevant page https://github.com/axilaris/admin_user_devise_articles/blob/master/app/controllers/application_controller.rb
[22:12:27] cabinB: has joined #RubyOnRails
[22:13:04] axilaris: so basically, what i am trying to do is if signing out from user --goto--> user signin page, if signing out from admin --goto--> admin signin page
[22:15:06] sevenseacat: has joined #RubyOnRails
[22:16:52] IFrank00: has joined #RubyOnRails
[22:19:43] gbgdev: has joined #RubyOnRails
[22:20:29] mwlang: axilaris: are you using your own controller or is that error coming out of devise’s controller?
[22:21:42] axilaris: mwlang: i guess its mine, not sure https://github.com/axilaris/admin_user_devise_articles/tree/master/app/controllers/admin
[22:21:50] axilaris: i found this http://stackoverflow.com/questions/14063455/unique-after-sign-out-paths-with-multiple-models-with-devise-and-rails
[22:21:56] axilaris: the last answer, trying that out
[22:23:51] axilaris: that last stackoverflow helped
[22:24:13] emachnic: has joined #RubyOnRails
[22:25:40] Felix444: has joined #RubyOnRails
[22:26:25] Jasaka: has joined #RubyOnRails
[22:27:30] quazimodo: has joined #RubyOnRails
[22:27:42] trosborn: has joined #RubyOnRails
[22:29:06] rakm: has joined #RubyOnRails
[22:30:29] rakm: is there something in activesupport that will make a number in the order of "thousands" intelligently round up/down and also attach a modifer. e.g. "almost 2,000" for 1800-2000 or "over 2000" for 2001-2700
[22:30:30] htmldrum: has joined #RubyOnRails
[22:30:47] rakm: (those number ranges are just examples)
[22:31:08] rakm: also activesupport is a strawperson, could be anything
[22:31:38] digitalcakes: has joined #RubyOnRails
[22:33:14] abhishekvasisht: has left #RubyOnRails: ()
[22:35:43] unreal: has joined #RubyOnRails
[22:37:53] trosborn: rakm: I don’t think you’re going to find anything like 1800.almost?(2000) if that is what you mean. that just seems too subjective.
[22:38:20] workmad3_: has joined #RubyOnRails
[22:38:43] n008f4g_: has joined #RubyOnRails
[22:40:44] petor: has joined #RubyOnRails
[22:42:41] _bogus_: please, im using this: <%= p.collection_select(:persona_avatar_id, PersonaAvatar.all, :id, :avatar) %> where :avatar is a paperclip field . for now :avatar is returning to me the url of the image, is there a way to get the url for the :small image ?
[22:43:05] baweaver: has joined #RubyOnRails
[22:44:22] smathy: rakm, no, nothing like that.
[22:45:56] axl_: has joined #RubyOnRails
[22:46:33] mehwork: has joined #RubyOnRails
[22:47:15] mehwork: does rails have an easy builtin way of seeing the sql query active record is generating for the current page?
[22:47:27] baash05: has joined #RubyOnRails
[22:47:35] baweaver: rails logs or *.to_sql
[22:47:41] rakm: thanks trosborn smathy
[22:47:51] rakm: this seems to cover most of my use cases http://pastie.org/10761393
[22:47:52] SteenJobs: has joined #RubyOnRails
[22:48:01] mehwork: i was hoping for something more specific than the logs, what is *.to_sql?
[22:48:17] baweaver: Model.where(x => y).to_sql
[22:48:21] baash05: anyone know where the code ActionMailer::Base.default_url_options is used?
[22:48:49] Radar: baash05: When AM generates URLs from helpers like `root_url`
[22:48:50] baash05: I'm trying to overide a bit of the url that's made, and I want to know what my options are.
[22:49:00] helpa: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[22:49:01] baweaver: could always intercept the logger as a before action and put it back after if you _really_ want to capture it.
[22:49:10] fluxsource: has joined #RubyOnRails
[22:49:31] baash05: Yeah.. I've got to tack on '/login/' to the end of all the urls I generate in a specific case.
[22:49:46] baash05: I don't want to manually go to each url generation..
[22:50:36] baash05: Just wondering where in the rails stack that usage lives.
[22:51:01] stannard: has joined #RubyOnRails
[22:51:10] baash05: doesn't show up in ActionMailer::Base.. as I'd expect..
[22:51:29] digitalcakes: has joined #RubyOnRails
[22:52:03] rubyonrailed: has joined #RubyOnRails
[22:53:56] yardenbar: has joined #RubyOnRails
[22:54:35] a1fa: has joined #RubyOnRails
[22:54:59] a1fa: does anyone know if it is possible to toggle visibility of <tr> using aria?
[22:55:58] one_zero: has joined #RubyOnRails
[22:56:18] silverdust: you mean like aria-hidden="true" ?
[22:56:43] smathy: rakm, there you go: https://gist.github.com/smathy/7ad2490791ef7787111e
[22:57:53] a1fa: silverdust: yeah
[22:58:04] a1fa: silverdust: it looks like it doesnt take aria-hidden but it takes hidden=""
[22:58:13] a1fa: silverdust: i want to toggle this w/o javascript
[22:58:44] rakm: smathy what's the 'm' supposed to stand for?
[22:59:06] smathy: rakm, multiple or something.
[22:59:32] rakm: yours doesn't account for when x < m i don't think, but other than that i like that you moved out the capitalization thing
[22:59:37] rakm: that doesn't belong there probably
[22:59:50] Miron: has joined #RubyOnRails
[22:59:57] smathy: rakm, modulus.
[23:00:04] Didac: has joined #RubyOnRails
[23:00:14] sevenseacat: hidden isnt a valid HTML attribute
[23:00:27] a1fa: sevenseacat: according to w3 it is
[23:00:33] smathy: rakm, you didn't give any specific rules for x < m, so it does the same.
[23:00:39] smathy: "over 0" and "almost 1000"
[23:00:42] a1fa: https://www.w3.org/TR/html-markup/global-attributes.html
[23:01:48] a1fa: so is there a way to toggle it w/o javascript?
[23:02:23] baash05: You can accomplish it in CSS.. to..
[23:02:42] baash05: I know you can.. I don't know how to do it though.
[23:02:44] j0llyr0tten: has joined #RubyOnRails
[23:02:44] smathy: rakm, I also assumed the 701-799 gap in your requirements was an omission.
[23:03:13] a1fa: i hate to add <div> in the middle of a <tbody>
[23:03:22] smathy: rakm, and that when equal to 2000 you didn't actually want "almost 2000"
[23:03:30] j0llyr0tten: hey, non RoR question but i'm at a loss. What the simplest way to connect Rails with a TripleStore?
[23:03:40] Radar: a1fa: You want events to happen when someone clicks on something... but you want to do it without JavaScript?
[23:03:50] DiCablo: has joined #RubyOnRails
[23:04:05] Radar: j0llyr0tten: a what
[23:04:17] a1fa: Radar: yes sir.
[23:04:28] a1fa: Radar: aria can do it
[23:04:37] j0llyr0tten: Radar: i'll try over in #ruby-rdf first, nvm
[23:04:41] Radar: a1fa: "I want to fly through the air but I don't want to use an aeroplane"
[23:04:42] Arcaire: ... Aria is Javascript, a1fa.
[23:05:22] rtom: has joined #RubyOnRails
[23:05:33] Radar: Arcaire: [citation needed]
[23:05:40] Arcaire: http://ariatemplates.com/
[23:05:43] Arcaire: The <title> tag.
[23:06:08] Arcaire: Yeah yeah.
[23:06:20] Radar: Arcaire: look what happens when you use cold hard facts
[23:06:49] Radar: j0llyr0tten: Seems to be some kind of DBMS. You'll need to create an adapter for it.
[23:06:53] Arcaire: I get immediately tired of you?
[23:07:05] sevenseacat: here we go again
[23:07:08] Arcaire: I mean if every time I use "cold hard facts" it comes with that footnote, that can get out.
[23:07:10] Radar: Arcaire: Yes, exactly.
[23:07:18] a1fa: https://www.w3.org/TR/wai-aria/
[23:07:27] Radar: Oh look some more cold hard facts.
[23:07:28] a1fa: mentiones nothing about js
[23:07:37] Radar: Arcaire: sometimes people forget things after a sleep
[23:07:52] Arcaire: This isn't a standard, a1fa.
[23:07:55] Arcaire: This is a recommendation.
[23:07:58] Arcaire: The answer is "use JavaScript".
[23:08:19] Radar: a1fa: You read the whole thing?
[23:08:19] Arcaire: If you don't like that, the answer to that is "that's a shame, nobody else really does either but we have no choice because we picked JavaScript instead of Dart or something sensible."
[23:08:22] Radar: I am impressed.
[23:08:34] a1fa: Radar: javascript site:..
[23:08:38] a1fa: cheated a bit
[23:09:05] a1fa: ok, i will use javascript.. it's not even that hard
[23:09:16] Arcaire: It isn't. It's one line.
[23:09:36] Arcaire: Don't expect this recommendation to be standardised any time soon, either.
[23:09:39] Radar: Generally a good idea to use JS if you want JS features.
[23:09:42] Arcaire: It will be approximately 2-4 years.
[23:11:15] Arcaire: Er, to clarify, the "hidden" HTML element does not hide the element on the page.
[23:11:31] Arcaire: That standard is for screen readers and increased accessibility for the visually impaired.
[23:12:02] Arcaire: The "hidden" HTML attribute is probably tangentially related, but is nothing to do with visibility and moreso to do with its metadata - whether or not it's currently relevant, etc.
[23:13:00] Arcaire: What you'll want is the `hidden` CSS attribute, which is either `visibility: hidden` if you want it retain its position on the page, or `display: none` otherwise.
[23:14:25] eyeamaye: has joined #RubyOnRails
[23:16:00] moei: has joined #RubyOnRails
[23:16:53] ensyde_: has joined #RubyOnRails
[23:17:20] tekk: has joined #RubyOnRails
[23:17:30] sdwrage: has joined #RubyOnRails
[23:18:48] superlou: has joined #RubyOnRails
[23:22:06] EasyCo_: has joined #RubyOnRails
[23:22:35] rubyonrailed: has joined #RubyOnRails
[23:23:11] ensyde_: has joined #RubyOnRails
[23:23:18] BBonifield: has joined #RubyOnRails
[23:26:30] diegoviola: has joined #RubyOnRails
[23:26:49] DLSteve: has joined #RubyOnRails
[23:27:05] quazimodo: has joined #RubyOnRails
[23:29:12] jbermudes_: has joined #RubyOnRails
[23:32:05] n008f4g_: has joined #RubyOnRails
[23:39:33] syndikate: has joined #RubyOnRails
[23:41:20] bronson: has joined #RubyOnRails
[23:41:33] Megamos: has joined #RubyOnRails
[23:41:50] rew: has joined #RubyOnRails
[23:42:20] rew: has left #RubyOnRails: ()
[23:43:07] shinnya: has joined #RubyOnRails
[23:43:13] rewmi: has joined #RubyOnRails
[23:45:29] rewmi: can anyone tell if active_model_serializers still able to work with rals < 5? i'm getting "could not find gem" with bundler
[23:46:25] pwnd_nsfw`: has left #RubyOnRails: ()
[23:46:38] pwnd_nsfw: has joined #RubyOnRails
[23:46:45] pwnd_nsfw: rewmi, yeah pretty sure
[23:46:53] pwnd_nsfw: I still use it, and I haven't even tried 5 yet honestly
[23:47:02] pwnd_nsfw: are you sure it's spelled correctly?
[23:48:55] rewmi: pwnd_nsfw, yep, i've pasted it from github readme
[23:49:04] jtong: has joined #RubyOnRails
[23:49:14] rewmi: and able to install with gem install, hm
[23:49:29] rewmi: seems like something with bundler
[23:51:23] helpa: You have not provided enough information to debug your problem. Please provide this information: https://gist.github.com/radar/5384431
[23:51:31] sevenseacat: AMS is fine with Rails 4.
[23:52:11] rewmi: ok, thanks! was able to add it to bundler after 'gem install'
[23:53:01] mfoo: has joined #RubyOnRails
[23:55:50] stannard_: has joined #RubyOnRails
[23:59:26] chipotle: has joined #RubyOnRails
[23:59:59] dopamean_: has joined #RubyOnRails