« Back to channel list

#RubyOnRails - 15 July 2016

« Back 1 day Forward 1 day »
[00:00:16] nettoweb: has joined #RubyOnRails
[00:00:23] JamesGames: @itemdesc = Item.all.map{|item| item.dblclick}.join(',' )
[00:00:41] JamesGames: ill try that one
[00:01:08] cnk: You can also do the map in the template - and call escape_javascript on each item as you proccess it
[00:03:25] JamesGames: cnk: It filled the page w text, like the lasttime we forgot the "j"
[00:03:57] xall_: has joined #RubyOnRails
[00:04:08] cnk: what sort of text
[00:04:31] JamesGames: the rest of show.html.erb from that point on
[00:04:32] cnk: an error message or the doubleclick info or War and Peace
[00:04:42] cnk: that seems bad
[00:04:54] cnk: I don't know. But I do knwo I am done
[00:04:58] cnk: good luck
[00:06:05] JamesGames: ok. Thanks. And I mean that. Im much closer. Good night/day, wherever u r!
[00:06:49] Mirubiri: /goo.gl/dgSj5
[00:07:51] Andr3as: has joined #RubyOnRails
[00:08:10] ur5us: has joined #RubyOnRails
[00:08:57] fschuindt: has joined #RubyOnRails
[00:09:40] quazimodo: am I supposed to have "run ActionCable.server" in config.ru
[00:12:00] pontiki: has joined #RubyOnRails
[00:12:07] zacts: has joined #RubyOnRails
[00:14:26] quazimodo: ok maybe not
[00:16:59] ElFerna: has joined #RubyOnRails
[00:21:23] barhum2013: has joined #RubyOnRails
[00:23:19] Dimik--: has joined #RubyOnRails
[00:28:35] dudepare: has joined #RubyOnRails
[00:30:29] JamesGames: Help ! I made a JS array : <%= javascript_tag do %> window.itemarray[] = "<%=j @itemdesc %> "; <% end %> and it's not giving me output
[00:30:46] ElFerna: has joined #RubyOnRails
[00:31:31] rafaelflores: has joined #RubyOnRails
[00:31:49] pwnd_nsfw: has joined #RubyOnRails
[00:34:36] DoctorMonocular: has joined #RubyOnRails
[00:35:12] pwnd_nsfw`: has joined #RubyOnRails
[00:36:12] flashpoint9: has joined #RubyOnRails
[00:37:01] rafaelflores: has joined #RubyOnRails
[00:39:32] JamesGames: do I make a long string to jescape it and then split it . I want an array of strings
[00:41:57] JamesGames: @itemdesc = Item.all.map{|item| item.dblclick}.join(',')
[00:42:02] JamesGames: in the controller
[00:42:17] JamesGames: and then to pull a value from that?
[00:45:43] dminuoso: has joined #RubyOnRails
[00:46:40] Mia: has joined #RubyOnRails
[00:46:52] SteenJobs: has joined #RubyOnRails
[00:49:07] jtong: has joined #RubyOnRails
[00:49:40] flashpoint9: has joined #RubyOnRails
[00:49:48] yardenbar: has joined #RubyOnRails
[00:50:09] rafaelflores: has joined #RubyOnRails
[00:52:48] xlegoman: has joined #RubyOnRails
[00:59:55] jenrzzz: has joined #RubyOnRails
[00:59:55] jenrzzz: has joined #RubyOnRails
[01:05:34] blackmesa: has joined #RubyOnRails
[01:06:44] xall_: has joined #RubyOnRails
[01:09:04] diprotic: has joined #RubyOnRails
[01:09:04] diprotic: has joined #RubyOnRails
[01:11:13] eserror: has joined #RubyOnRails
[01:14:38] Hobogrammer: has joined #RubyOnRails
[01:16:03] JamesGames: Hey Everybody! I got it!
[01:16:13] JamesGames: Waaaaaaaaaaaaaaaaaiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii!!!!!!!!!!!!!!!!!!!!!!!!!
[01:17:15] JamesGames: go me! But thanks y'all!!! Coouldnt have done without ues
[01:17:33] kevr: has joined #RubyOnRails
[01:17:39] DoctorMonocular: has joined #RubyOnRails
[01:17:49] kevr: How can I remove a sunspot_solr installation?
[01:19:38] rafaelflores: has joined #RubyOnRails
[01:21:17] tego101: has joined #RubyOnRails
[01:27:03] twilling: has joined #RubyOnRails
[01:29:42] nettoweb: has joined #RubyOnRails
[01:33:07] sumobob_: has joined #RubyOnRails
[01:33:57] rafaelflores: has joined #RubyOnRails
[01:35:30] rafaelflores: has joined #RubyOnRails
[01:35:32] jheathco: has joined #RubyOnRails
[01:40:55] rafaelflores: has joined #RubyOnRails
[01:43:29] douglascorrea: has joined #RubyOnRails
[01:43:49] barhum2013: has joined #RubyOnRails
[01:46:29] dminuoso: has joined #RubyOnRails
[01:47:55] dnewkerk: has joined #RubyOnRails
[01:49:30] Ropeney: has joined #RubyOnRails
[01:50:17] unreal: has joined #RubyOnRails
[01:50:50] jtong: has joined #RubyOnRails
[01:52:47] dnewkerk: with Rails 5 has_secure_token, is finding a matching record in my controller via the token secure like this? Video.find_by_preview_token(params[:preview_token])
[01:52:49] fschuindt: has joined #RubyOnRails
[01:53:55] xall_: has joined #RubyOnRails
[01:58:34] l4v2: has joined #RubyOnRails
[01:58:55] rafaelflores: has joined #RubyOnRails
[01:59:40] douglascorrea: has joined #RubyOnRails
[02:00:52] barhum2013: has joined #RubyOnRails
[02:02:14] adam12: dnewkerk: It *could* be like that. If you shared some code with what you have already we could confirm.
[02:05:18] Mia: has joined #RubyOnRails
[02:05:51] ur5us: has joined #RubyOnRails
[02:05:52] dnewkerk: adam12: thanks. that’s basically it besides def show around it, render :show if the token matches. Namely I was worried about if code could be injected into the query, though I just found some indication on http://guides.rubyonrails.org/security.html#sql-injection-countermeasures that this input does get sanitized
[02:07:18] adam12: Yes - the value is sanitized. You can pass directly from params in this case.
[02:07:35] dnewkerk: cool that’s what I was hoping for
[02:08:50] adam12: My guess is that find_by_preview_token is a dynamic finder, and I am fairly sure they are deprecated. You likely want something like Video.find_by(preview_token: params[:preview_token])
[02:09:35] adam12: Actually, nevermind. The format you are using isn't deprecated - I just don't see it very often anymore.
[02:10:15] Darmani: cnk: You still here?
[02:10:40] dnewkerk: adam12: yeah I thought it was still valid… http://edgeguides.rubyonrails.org/active_record_querying.html#dynamic-finders
[02:10:49] stephenmac7: has joined #RubyOnRails
[02:11:06] adam12: It is - they deprecated some a while ago and I likely glazed over it where it said which ones still remained.
[02:11:19] dnewkerk: yeah I remember something about that too
[02:12:49] stephenmac7: I'm working on an ad hoc querying library (https://github.com/radicalbear/rad-hoc/blob/master/lib/rad-hoc.rb) but would like to allow users to pass in models that are already scoped (for example `Track.where(track_number: 5)`). I'm using Arel to build the query and can't seem to be able to merge in the conditions I want.
[02:14:37] adam12: stephenmac7: what have you tried / what's not working?
[02:14:42] Meow-J: has joined #RubyOnRails
[02:16:34] stephenmac7: adam12: I've tried running #arel on the object and building the query from there then running .to_sql but it seems to lose all the bind values when I do that
[02:17:25] stephenmac7: I've also tried to pull out the where values but that is no longer part of the public API (as of rails 4.something IIRC) but I run into the same issue
[02:21:11] stephenmac7: It doesn't help much that the documentation for ActiveRecord internals is sparse (to say the least)
[02:21:22] rickmasta: has joined #RubyOnRails
[02:21:24] adam12: Yeah - Arel docs are ... slim.
[02:21:32] adam12: Can you use `merge`?
[02:21:56] stephenmac7: I don't think you can merge in an Arel query to an active record object, right?
[02:22:04] ankhers: has joined #RubyOnRails
[02:22:44] adam12: Can you post some code? Maybe give me a better idea of what you're looking to achieve.
[02:24:58] hastur: has joined #RubyOnRails
[02:25:30] stephenmac7: adam12: Yeah, I posted a github link above which has the entirety of the logic. http://lpaste.net/169882 has a test which describes the desired behavior
[02:28:14] Robtop__: has joined #RubyOnRails
[02:28:55] adam12: stephenmac7: I looked over the code but you're into some of the internals I cant' say I'm familiar with.
[02:29:01] stephenmac7: Here's a version of the code which suffers from the no-bind issue: http://lpaste.net/169883
[02:29:04] l4v2: Missing required arguments: aws_access_key_id, aws_secret_access_key (I jsut got all of the stuff from AWS and ran the commands like heroku config:set S3_SECRET_KEY=a88aauafhrugha7a
[02:29:25] l4v2: (that’s not really my key)
[02:29:51] l4v2: but that’s my error message when I try to run rails c production
[02:30:20] l4v2: I’ve been googling it for a few hours, am I missing something obvious?
[02:30:55] adam12: l4v2: Anymore to that error? Like a stack trace?
[02:31:01] adam12: ie. Are you using Figaro?
[02:31:13] l4v2: no to Figaro
[02:32:04] l4v2: lots of stuff in the .rvm path coming up in the trace
[02:32:37] roamingdog: has joined #RubyOnRails
[02:32:56] stephenmac7: adam12: So, no ideas on how to get the desired behavior? If not, it's okay. It's so obscure that I don't necessarily expect an answer.
[02:33:16] adam12: l4v2: We'd have to know where that error is coming from. The AWS SDK? Some config manager like Figaro/etc? So maybe post your stacktrace in a Gist.
[02:33:47] adam12: stephenmac7: Not really - I do some Arel stuff but following all your code without spending time in it is over my energy level tonight. And Arel docs are extremely slim as it is.
[02:34:15] Emily: has joined #RubyOnRails
[02:34:23] rickmasta: has joined #RubyOnRails
[02:34:39] l4v2: I origionally crated this project, but then deleted it and cloned it from my repo. I’m wondering if I didn’t set something up, but I did run bundle
[02:35:51] stephenmac7: adam12: Do you know how to add an arel-style join to an ActiveRecord relation?
[02:36:30] l4v2: https://gist.github.com/cam271/555e582413ecfb68a2e825742a5b4976
[02:36:30] adam12: stephenmac7: I can't say I ever have, outside `merge`. It's either all AR::Relation or all AREL
[02:37:16] adam12: l4v2: Is it possible you need a ~/.fog file?
[02:38:39] stephenmac7: Yeah. It's to avoid duplication of authorization code.
[02:39:03] twilling: has joined #RubyOnRails
[02:40:09] Ericx2x: has joined #RubyOnRails
[02:40:47] l4v2: No, I have that file in the stack trace
[02:42:35] _Tariq: has joined #RubyOnRails
[02:45:15] l4v2: there’s also the config/initializers/carrier_wave.rb file
[02:46:06] Axy: has joined #RubyOnRails
[02:46:42] moeabdol: has joined #RubyOnRails
[02:47:01] jishankai: has joined #RubyOnRails
[02:47:15] hastur: hmmm, how do i pass the request parameters with a redirect_to '/' ?
[02:47:39] hastur: redirect_to '/', :id => params[:id] doesn't seem to be working
[02:47:40] adam12: hastur: what about redirect_to root_path(some_param: "foo")
[02:47:46] adam12: or maybe url_for
[02:48:06] adam12: Depends on what root_path is set to in your routes.
[02:48:28] dminuoso: has joined #RubyOnRails
[02:48:45] macsteps: has joined #RubyOnRails
[02:49:05] hastur: good!! now url is /id?="id"
[02:49:12] hastur: 'll see where thius goes :)
[02:50:50] SteenJobs: why would my assets not update on production after a deployment, is that usual behavior?
[02:50:59] flashpoint9: has joined #RubyOnRails
[02:51:24] adam12: Does your deploy process call rake assets:precompile
[02:51:53] matthewd: stephenmac7: You can pass an Arel::Nodes::Join to Relation#joins, if that helps?
[02:52:04] SteenJobs: for some reason some CSS isn’t updating
[02:52:14] Mirubiri: has joined #RubyOnRails
[02:52:18] jtong: has joined #RubyOnRails
[02:53:09] stephenmac7: matthewd: Really? I'll try it.
[02:53:26] SteenJobs: adam12: but it’s only some specific stuff. weird.
[02:53:38] matthewd: You can also pass an arel expression node to #where
[02:54:43] Ericx2x: has joined #RubyOnRails
[02:56:10] xhoy: has joined #RubyOnRails
[02:56:54] stephenmac7: matthewd: How would I go about creating a floating join node (that is, without an object to apply it to right away)?
[02:58:03] fryguy: stephenmac7: have an example?
[02:58:13] douglasc_: has joined #RubyOnRails
[02:59:04] stephenmac7: I have a line `q.join(join_table).on(base_table[join_name.foreign_key].eq(join_table[:id]))` and would like to make it `q.joins(...)`
[03:00:46] SteenJobs: adam12: could it have anything to do with moving my css files inside an additional directory? “/assets/stylesheets/main/
[03:00:49] Dimik--: has joined #RubyOnRails
[03:01:05] adam12: SteenJobs: It could if you don't update the manifest to compile them from that path?
[03:01:29] Ericx2x: has joined #RubyOnRails
[03:01:30] SteenJobs: adam12: i did, it works in development. i added the path to config.assets.paths and the manifest is inside main/
[03:02:08] adam12: Err, you added it to what?
[03:02:11] moeabdol: has joined #RubyOnRails
[03:02:24] adam12: What's the pathname of the sprockets manifest for main?
[03:03:08] l4v2: Is heroku run rails console --sandbox the same as rails c production?
[03:03:22] l4v2: minus the sandbox part
[03:03:52] SteenJobs: adam12: prefix is still /assets, is that what you’re asking? adding “Rails.application.config.assets.paths << Rails.root.join("app", "assets", "stylesheets", "main”)” allowed putting everything in main to work, at least in development
[03:04:01] SteenJobs: with application.scss inside of /main as well
[03:04:12] SteenJobs: since there’s a directory /stylesheets/administrate/ which has its own application.scss
[03:04:16] matthewd: stephenmac7: Arel::Nodes::InnerJoin.new(join_table, Arel::Nodes::On.new(base_table[join_name.foreign_key].eq(join_table[:id]))) looks plausible
[03:04:33] adam12: SteenJobs: Oh. I see.
[03:05:25] adam12: SteenJobs: Why did you add to asset paths, vs the precompile list?
[03:05:42] matthewd: stephenmac7: Where base_table is the_relation.arel_table, or, on 5.0, the LHS is the_relation.arel_attribute(join_name.foreign_key)
[03:05:50] SteenJobs: adam12: because it’s still my main asset path, i just didn’t want require_tree . to include the administrate/ files
[03:06:08] SteenJobs: adam12: i have separate files in precompile which i generally restrict to vendor assets
[03:06:19] adam12: SteenJobs: I see - I must not be understanding how you have your assets restructured.
[03:07:25] xall: has joined #RubyOnRails
[03:08:31] matthewd: SteenJobs: I haven't read scrollback, but adding directories that are nested inside an asset path directory to the asset path may cause pain
[03:09:02] SteenJobs: everything’s fine in development - there just seems to be some seemingly random css that’s not updating
[03:09:14] SteenJobs: it’s the older version, i changed up the CSS code but it’s not updating on the server
[03:10:24] stephenmac7: matthewd: Wait, what changes in 5.0?
[03:10:54] rickmasta: has joined #RubyOnRails
[03:11:08] kevr: has joined #RubyOnRails
[03:11:13] matthewd: stephenmac7: It's optional, but as well as relation.arel_table[column_name], there's relation.arel_attribute(column_name)
[03:11:52] matthewd: Doesn't really matter for this use case, but it's aware of things like attribute aliases
[03:12:45] stephenmac7: Nice. I wish they would make the docs better for Arel. Anyway, just building on top of ActiveRecord::Relation seems to have fixed my issues.
[03:13:08] matthewd: stephenmac7: Patches welcome :)
[03:13:48] matthewd: The core problem is we don't *want* to document too much, because people expect things that are documented to not change, and we explicitly don't want to make that commitment
[03:14:27] moeabdol1: has joined #RubyOnRails
[03:15:18] stephenmac7: matthewd: I don't know anything about the ruby doc system, but of course I could learn. I've never committed much to open source either, so am not sure how that works. I understand that if it's documented it's harder to make breaking changes but... it's useful stuff that people can't use because they have no idea how to use it.
[03:15:40] stephenmac7: Like, how am I supposed to guess that ActiveRecord::Relation#joins accepts an arel node?
[03:16:46] stephenmac7: Whatever, at least I've found my solution. Thank you so much, matthewd!
[03:17:23] hahuang61: has joined #RubyOnRails
[03:18:31] flashpoint9: has joined #RubyOnRails
[03:20:31] fschuindt: has joined #RubyOnRails
[03:21:51] macsteps: has joined #RubyOnRails
[03:22:35] matthewd: stephenmac7: You're welcome :)
[03:23:53] matthewd: stephenmac7: Yeah, again, the problem is that officially it doesn't ;) -- because Arel is an internal implementation tool, and nothing directly involving it is guaranteed to work across versions
[03:24:15] matthewd: I am trying to change that, but that's our current situation
[03:24:22] stephenmac7: If I've selected the correct fields, why can't I get them from a result object? Example: if I run `Track.joins(:album).select("albums.title").first` how would I get the field I selected without running the SQL manually?
[03:24:58] matthewd: Err... the unofficialness / deliberate undocumentation, that is. We'll be looking to find a way to do that while still making clear that things can change without notice/deprecation.
[03:25:52] matthewd: ...first.title ? (That's also the only attribute it'll have... nothing from Track)
[03:26:53] stephenmac7: matthewd: I'm glad you're doing that so that people later can benefit from the power of arel.
[03:27:33] treaki__: has joined #RubyOnRails
[03:28:50] stephenmac7: matthewd: Sorry, I meant Track.join(:album).select("tracks.title", "albums.title").first
[03:28:56] SteenJobs: i checked the application manifest in my browser, and it has the old css. but on the server the correct css is present. hehhh?
[03:29:12] matthewd: stephenmac7: Ah, that'll not go so well ;)
[03:29:36] matthewd: stephenmac7: You'll need to alias them with unique names
[03:30:05] eserror: has joined #RubyOnRails
[03:30:50] rickmasta: has joined #RubyOnRails
[03:32:44] stephenmac7: matthewd: As you can see here (https://github.com/radicalbear/rad-hoc/blob/master/lib/rad-hoc.rb#L22) I'm currently running #to_sql but then we lose all the typecasting magic. However, there doesn't seem to be a way to collect results based on position if we don't execute a raw query.
[03:33:45] SteenJobs: adam12: it seems like assets are being added to /public/assets/main/
[03:33:50] SteenJobs: and my guess is that’s what’s causing an issue
[03:34:55] matthewd: stephenmac7: I think you lose the (result) typecasting magic as soon as AR doesn't know how to map result columns to table columns... so I doubt even a more cooperative #select would help you there
[03:36:49] matthewd: OTOH, if you know where all the columns originally came from, you should be able to look up their types and do the casting yourself
[03:40:27] matthewd: stephenmac7: You may also be interested in https://github.com/ManageIQ/manageiq/blob/master/app/models/miq_expression.rb and other related (though somewhat distributed) code
[03:41:44] matthewd: stephenmac7: ManageIQ has a reporting system that seems not unlike what you're building.. but it's currently more coupled to the application than it could/should be
[03:45:38] SteenJobs: adam12: fixed!
[03:45:52] adam12: I'm about to head out - what was your solution tho?
[03:45:59] SteenJobs: you promise not to be mad? haha
[03:46:11] SteenJobs: the stylesheet link in application.html.erb wasn’t updated
[03:46:19] SteenJobs: needed to change it to main/application.css
[03:46:23] SteenJobs: *main/application
[03:46:29] adam12: LOL. That will do it.
[03:46:40] fox_mulder_cp: has joined #RubyOnRails
[03:46:41] stephenmac7: matthewd: Huh. I'll have to take a look. This is actually for another application but I insisted that it be a separate library in case we needed to use it again for something else.
[03:46:47] matthewd: SteenJobs: Then you don't need main in the asset path
[03:46:58] SteenJobs: matthewd: right
[03:47:18] SteenJobs: matthewd: for some reason despite being in the asset path, it was adding the main/ subdirectory to public/assets, rather than the contents of main/
[03:47:40] Leepoff: has joined #RubyOnRails
[03:48:16] matthewd: SteenJobs: Yeah.. that's not what the asset path does
[03:48:26] zacts: has joined #RubyOnRails
[03:48:29] Radar: config.assets.prefix might do that? iirc.
[03:48:35] SteenJobs: that’s what i tried originally
[03:48:49] SteenJobs: but then took it out and went with config.assets.paths which was working fine in development
[03:48:51] matthewd: SteenJobs: If you had an app/assets/stylesheets/main/foo/bar.js, you would've ended up with a public/assets/bar.js
[03:48:57] SteenJobs: but that’s because assets weren’t being precompiled obviously
[03:49:02] Radar: matthewd: really?
[03:49:08] SteenJobs: i don’t believe that’s true
[03:49:14] dminuoso: has joined #RubyOnRails
[03:49:18] matthewd: Radar: It ignores the first level, because of stylesheets/javascripts
[03:49:19] Radar: I would think it would be public/assets/main/foo/bar.js.
[03:49:20] flashpoint9: has joined #RubyOnRails
[03:49:27] matthewd: Radar: Oh, yes, that too
[03:49:36] SteenJobs: i have app/assets/stylesheets/main/foobar.js, and it becomes public/assets/main/foobar.js
[03:49:43] matthewd: Radar: But SteenJobs had added app/assets/stylesheets/main to the search path
[03:49:46] SteenJobs: which is why the code wasn’t loading
[03:50:03] matthewd: So the above would've been true *as well* as the fuller path existing
[03:50:09] SteenJobs: which is what was odd, because it still added the main/ folder itself, rather than its contents
[03:50:22] matthewd: See previous comment re: nested dirs = pain
[03:50:24] Radar: matthewd: aha
[03:50:29] SteenJobs: yea, but all fixed now
[03:50:31] Radar: ACTION hasn't been paying much attention.
[03:50:36] SteenJobs: by changing the path for the stylesheet tag
[03:51:14] Radar: Ok, new funnest Rails 5 feature.
[03:51:28] Radar: @order.invoices.each { |i| i.some_method_which_creates_a_new_invoice }
[03:51:40] Radar: Instead of iterating through just the ONE invoice, it will iterate through the SECOND invoice too.
[03:51:51] matthewd: SteenJobs: The only thing I'm confused about is why it was working for you in development. But I guess we can ignore that.
[03:51:51] Radar: So if @order.invoices only contains one invoice at the start, BOTH invoices will be iterated over.
[03:52:08] SteenJobs: matthewd: that was confusing me too - my guess is because assets aren’t being precompiled?
[03:52:13] Radar: 3 hours of debugging this and I just added a .to_a so it's @order.invoices.to_a.each and it works
[03:52:17] SteenJobs: Radar: oh that’s sick
[03:52:28] Radar: #feelsgood
[03:52:30] rickmasta: has joined #RubyOnRails
[03:52:32] matthewd: Radar: (!!)
[03:52:59] matthewd: I assume some_method_.. is doing an invoices << or similar?
[03:53:10] Radar: matthewd: Yeah, I think that might be it.
[03:53:18] Radar: matthewd: order.invoices.create(email: franchise, coupon: coupon)
[03:53:26] stephenmac7: matthewd: I can use some string manipulation to get the Model and column name for each field coming back from the db. I've read http://technology.customink.com/blog/2015/01/06/activerecord-42s-type-casting/ but can't figure out how to cast the types of the values coming out
[03:53:48] jtong: has joined #RubyOnRails
[03:53:53] matthewd: Radar: Ohhh... umm... this might be my fault :P
[03:54:00] Radar: matthewd: its OK. It's a good thing.
[03:55:00] Radar: matthewd: I've got a moratorium on filing issues / PRs on rails/rails after what happened last time. If you think it's big enough problem, feel free to do it yourself.
[03:55:01] matthewd: I changed various relation internals to use the inner array directly, instead of always going via to_a, to save "needless" dups
[03:55:15] twilling: has joined #RubyOnRails
[03:55:20] pwnd_nsfw`: has joined #RubyOnRails
[03:55:34] matthewd: Pretty sure I wasn't expecting to create a behaviour change, but yeah, I'll go with "oh well" for now :)
[04:02:36] macsteps: has joined #RubyOnRails
[04:02:48] Radar: matthewd: I've got some view specs here which don't have access to routing helpers any more. You wouldn't happen to know why, would you?
[04:03:37] armyriad: has joined #RubyOnRails
[04:03:53] kevr: has joined #RubyOnRails
[04:05:28] rickmasta: has joined #RubyOnRails
[04:06:04] matthewd: Radar: Doesn't sound familiar
[04:06:10] Radar: Ok, I will keep digging.
[04:06:14] matthewd: Radar: And at a glance, I can't see anything relevant in https://github.com/ManageIQ/manageiq/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Amatthewd%20is%3Amerged%20label%3Arails5%20
[04:08:35] Radar: https://github.com/rspec/rspec-rails/issues/1644 Oh look there's an open issue.
[04:09:00] conta: has joined #RubyOnRails
[04:09:50] _djbkd: has joined #RubyOnRails
[04:12:02] matthewd: Oh oops, I probably should've known about that. Hadn't read the back-story on the rails-controller-testing issue
[04:13:20] Mirubiri: has joined #RubyOnRails
[04:15:48] matthewd: Ugh.. the on_load thing is technically correct, but when we've suddenly broken so many external libraries... :/
[04:17:34] yfeldblum: has joined #RubyOnRails
[04:20:03] kevr: has joined #RubyOnRails
[04:23:52] stephenmac7: matthewd: If you're interested, I got type casting working! https://github.com/radicalbear/rad-hoc/blob/master/lib/rad-hoc.rb#L135-L145
[04:24:01] Rodya_: has joined #RubyOnRails
[04:24:21] SteenJobs: has joined #RubyOnRails
[04:25:55] matthewd: stephenmac7: Nice!
[04:26:14] sumobob: has joined #RubyOnRails
[04:26:59] Mirubiri: has left #RubyOnRails: ()
[04:27:25] matthewd: stephenmac7: The "direct" inflections, vs reflecting via the class's associations, say, gives me a little pause
[04:28:26] stephenmac7: What do you mean?
[04:29:33] matthewd: You're using pluralize/classify/foreign_key inflections to guess the names of things, when your model knows the 'real' relationships
[04:30:12] matthewd: (yes, guessed via those same mechanisms.. but it feels like detail you shouldn't need to deal with)
[04:31:03] stephenmac7: matthewd: I admit, it's fragile. However, I don't see a way around it because I'm guessing everything based on the contents of a yaml file
[04:32:52] kevr: has joined #RubyOnRails
[04:33:00] matthewd: Depends what the contents of the yaml file needs to be
[04:33:46] matthewd: e.g., it could start with a primary *class*, then list the *associations* to join (in a nested-hash form, as .joins / .includes uses)
[04:33:58] rickmasta: has joined #RubyOnRails
[04:35:14] jheathco: has joined #RubyOnRails
[04:40:54] stephenmac7: matthewd: The idea is for it to look like this: https://github.com/radicalbear/rad-hoc/blob/master/example.yaml
[04:41:09] stephenmac7: The person writing the file shouldn't have to think about joins
[04:43:11] matthewd: stephenmac7: All the more reason to use associations, IMO
[04:43:48] matthewd: In fact, isn't that what this is doing? https://github.com/radicalbear/rad-hoc/blob/master/example.yaml#L11
[04:44:06] matthewd: The table is surely users/members/similar, not assigned_to_members
[04:44:30] stephenmac7: You know what? That's completely true.
[04:45:54] stephenmac7: I forgot the association are tracked by rails because I always named my test fields as a singularized version of the table name
[04:45:55] dnewkerk: has joined #RubyOnRails
[04:49:04] siaw23: has joined #RubyOnRails
[04:49:14] siaw23: if someone can help http://stackoverflow.com/questions/38388028/component-rendering-with-react-in-rails-not-working
[04:50:02] dminuoso: has joined #RubyOnRails
[04:50:29] xall: has joined #RubyOnRails
[04:50:53] Radar: render component: 'App'
[04:50:55] Radar: What is this line
[04:52:07] pawnbox: has joined #RubyOnRails
[04:53:10] ur5us: has joined #RubyOnRails
[04:54:16] dminuoso: has joined #RubyOnRails
[04:55:16] dminuoso: has joined #RubyOnRails
[04:55:25] jtong: has joined #RubyOnRails
[04:56:49] rickmasta: has joined #RubyOnRails
[04:57:24] siaw23: i got that line from the example the gem gives on github
[04:57:59] siaw23: Radar: from here: https://github.com/reactjs/react-rails#rendering-components-instead-of-views
[04:58:31] Radar: Oh right.
[04:58:37] Radar: I don't know what's going wrong, sorry.
[04:59:47] matthewd: siaw23: !gist the (full) backtrace
[04:59:47] helpa: siaw23: http://gist.github.com - Put your codes online with pretty syntax highlighting and the ability to embed it into other pages.
[05:01:33] siaw23: matthewd: from the server https://gist.github.com/siaw23/3423aa1ca8e83c03557d62ada77ee7ea
[05:02:04] DoctorMonocular: has joined #RubyOnRails
[05:03:31] alfiemax: has joined #RubyOnRails
[05:05:30] quazimodo: if i spin up an action cable standalone instance the websocket subscription goes fine
[05:06:33] quazimodo: but if i don't put run ActionCable.server into the rackup file the websocket connection goes as far as hitting ApplicationCable::Connection#connect and then stops there
[05:07:45] matthewd: siaw23: Is there not a proper backtrace in the HTML response you screenshotted?
[05:08:43] siaw23: but if i remove therubyracer gem i’m getting this: https://gist.github.com/siaw23/3423aa1ca8e83c03557d62ada77ee7ea
[05:16:11] dnewkerk: has left #RubyOnRails: ()
[05:16:11] cd-rum: has joined #RubyOnRails
[05:17:15] Cohedrin: has joined #RubyOnRails
[05:18:16] Mirubiri: has joined #RubyOnRails
[05:21:08] rvanlieshout: has joined #RubyOnRails
[05:24:01] alfiemax: has joined #RubyOnRails
[05:29:03] xall: has joined #RubyOnRails
[05:31:42] EasyCo: has joined #RubyOnRails
[05:37:28] pawnbox: has joined #RubyOnRails
[05:50:34] rickmasta: has joined #RubyOnRails
[05:50:37] flashpoint9: has joined #RubyOnRails
[05:53:11] pawnbox: has joined #RubyOnRails
[05:55:11] pawnbox: has joined #RubyOnRails
[05:55:20] GoranPavlovic: has joined #RubyOnRails
[05:56:06] jtong: has joined #RubyOnRails
[05:59:51] abhvl: has joined #RubyOnRails
[06:00:05] abhvl: how to access associations and their associations and so on recursively?
[06:00:24] xlegoman: has joined #RubyOnRails
[06:04:09] roamingdog: abhvl: literally recursively?
[06:04:12] rvanlieshout: abhvl: could you be a bit more specific?
[06:04:23] rvanlieshout: there are multiple solutions for any problem and having context helps us in guiding you to the right one
[06:05:08] kevr: has joined #RubyOnRails
[06:06:19] sypheren: has joined #RubyOnRails
[06:16:46] alfiemax: has joined #RubyOnRails
[06:16:54] Dragon535: has joined #RubyOnRails
[06:18:01] abhvl: rvanlieshout: before cloning old record to new recold i want to make all its associations ( and their associations) nil.
[06:18:51] alfiemax: abhvl, i missed out previous messages, so i might not have much context, but how are you cloning a record?
[06:19:21] abhvl: manually. using .dup wherever i can and/or assign_attributes
[06:19:38] rvanlieshout: you'll also have to create dups of each relationship then
[06:19:41] rvanlieshout: but why would you need a clone?
[06:19:56] abhvl: however there are two gems for this. deep cloneable and ameoba.
[06:20:01] abhvl: if you want that is...
[06:22:46] rails45: has joined #RubyOnRails
[06:22:54] rails45: if ((<%= @post.votes_for.size %>) == 1) {(".votecounter").fadeTo(1)};
[06:23:01] rails45: ^Guys, is this a valid line?
[06:23:17] rails45: This jQuery triggers every time I click the vote button
[06:23:29] rails45: .votecounter shows the number of votes on a post
[06:23:53] rails45: I want to make it such the number of votes won't show if it's equal to zero, but it's not working
[06:24:01] dionysus69: has joined #RubyOnRails
[06:24:04] rails45: I'm using the acts_as_votable gem.
[06:25:01] rails45: ".votecounter" is initially set to "opacity:0" in css
[06:31:59] Leepoff: has joined #RubyOnRails
[06:32:15] kevr_: has joined #RubyOnRails
[06:41:34] douglascorrea: has joined #RubyOnRails
[06:43:11] benlieb: has joined #RubyOnRails
[06:43:37] roamingdog: has joined #RubyOnRails
[06:47:54] tego101: has joined #RubyOnRails
[06:49:35] euphoria-: has joined #RubyOnRails
[06:50:31] DoubleMalt: has joined #RubyOnRails
[06:50:36] solars: has joined #RubyOnRails
[06:51:56] flashpoint9: has joined #RubyOnRails
[06:52:04] jstransky: has joined #RubyOnRails
[06:54:29] pawnbox: has joined #RubyOnRails
[06:55:31] Pazician: has joined #RubyOnRails
[06:55:31] Pazician: has joined #RubyOnRails
[06:55:57] yfeldblum: has joined #RubyOnRails
[06:56:14] eserror: has joined #RubyOnRails
[06:56:42] pawnbox: has joined #RubyOnRails
[07:13:13] TomyWork: has joined #RubyOnRails
[07:13:25] k3rn31: has joined #RubyOnRails
[07:14:01] stardiviner: has joined #RubyOnRails
[07:14:17] blackmesa: has joined #RubyOnRails
[07:19:34] Palsson: has joined #RubyOnRails
[07:20:25] siaw23: has joined #RubyOnRails
[07:21:17] hahuang61: has joined #RubyOnRails
[07:21:21] Devalo: has joined #RubyOnRails
[07:21:30] edwinvdgraaf: has joined #RubyOnRails
[07:23:20] pawnbox: has joined #RubyOnRails
[07:24:29] Jasaka: has joined #RubyOnRails
[07:25:41] pawnbox: has joined #RubyOnRails
[07:26:44] zpe: has joined #RubyOnRails
[07:30:38] euphoria-: has joined #RubyOnRails
[07:35:29] exadeci: has joined #RubyOnRails
[07:39:42] raunicolae: has joined #RubyOnRails
[07:40:02] raunicolae: has left #RubyOnRails: ()
[07:40:13] Devalo: has joined #RubyOnRails
[07:44:26] roamingdog: has joined #RubyOnRails
[07:46:09] Macaveli: has joined #RubyOnRails
[07:47:00] mikecmpbll: has joined #RubyOnRails
[07:47:13] Dragon535: has left #RubyOnRails: ()
[07:48:31] ngw: has joined #RubyOnRails
[07:50:10] pawnbox: has joined #RubyOnRails
[07:52:15] arBmind: has joined #RubyOnRails
[07:52:24] pawnbox: has joined #RubyOnRails
[07:53:13] dionysus69: has joined #RubyOnRails
[07:55:02] kevr_: has joined #RubyOnRails
[07:55:31] AimlessRAven: has joined #RubyOnRails
[07:55:33] AimlessRAven: https://gist.github.com/anonymous/6eeb6d1997f1a1e0976964a70b8d6041
[07:55:43] AimlessRAven: why i need to reload once page to my remote works well
[07:55:59] AimlessRAven: when i enter my page and click like .. he like my post.. unlike then like again
[07:56:03] AimlessRAven: when i reload once page
[07:56:18] AimlessRAven: and click like .. everything is good i like/unlike post remote
[07:57:02] rvanlieshout: see the documentation of turbolinks
[07:57:15] dminuoso: No. Just disable turbolinks entirely.
[07:57:22] rvanlieshout: dminuoso: because?
[07:57:27] dminuoso: rvanlieshout: Because it's AimlessRaven.
[07:58:04] ewelina_: has joined #RubyOnRails
[07:58:06] dminuoso: If after 9 months of ruby on rails he cannot figure out how to extract a substring from a string, then the subtleties of event propagation and dom reordering will be out of his scope.
[07:58:12] ur5us: has joined #RubyOnRails
[07:58:50] jtong: has joined #RubyOnRails
[07:59:59] ElFerna: has joined #RubyOnRails
[08:01:07] roshanavand: has joined #RubyOnRails
[08:03:44] artto: has joined #RubyOnRails
[08:03:56] duncannz: has joined #RubyOnRails
[08:04:55] fermonkus: has joined #RubyOnRails
[08:05:38] mikecmpbll: has joined #RubyOnRails
[08:11:03] darutoko: has joined #RubyOnRails
[08:14:30] k13nox: has joined #RubyOnRails
[08:15:35] Dimik: has joined #RubyOnRails
[08:16:04] k13nox_: has joined #RubyOnRails
[08:18:39] siaw23: has left #RubyOnRails: ()
[08:20:23] Devalo: has joined #RubyOnRails
[08:22:03] hahuang61: has joined #RubyOnRails
[08:22:59] apotry: has joined #RubyOnRails
[08:23:39] euphoria-: has joined #RubyOnRails
[08:24:43] rocketsurgeon: has joined #RubyOnRails
[08:26:43] davidklsn: has joined #RubyOnRails
[08:30:10] Pumukel: has joined #RubyOnRails
[08:31:40] workmad3: has joined #RubyOnRails
[08:32:32] moeabdol1: has joined #RubyOnRails
[08:34:33] eserror_: has joined #RubyOnRails
[08:36:22] mikecmpb_: has joined #RubyOnRails
[08:36:34] workmad3_: has joined #RubyOnRails
[08:37:37] Kedare: has joined #RubyOnRails
[08:39:33] moeabdol1: has joined #RubyOnRails
[08:43:27] benlieb: has joined #RubyOnRails
[08:43:57] douglascorrea: has joined #RubyOnRails
[08:44:50] AzaToth: has joined #RubyOnRails
[08:52:39] arBmind: has joined #RubyOnRails
[08:53:39] flashpoint9: has joined #RubyOnRails
[08:57:03] benlieb: has joined #RubyOnRails
[08:57:39] moep: has joined #RubyOnRails
[09:01:32] jtong: has joined #RubyOnRails
[09:02:56] snowy: has joined #RubyOnRails
[09:03:06] tvw: has joined #RubyOnRails
[09:03:11] arup_r: has joined #RubyOnRails
[09:07:25] MEATCHICKEN: has joined #RubyOnRails
[09:07:41] yfeldblum: has joined #RubyOnRails
[09:09:56] yfeldblum: has joined #RubyOnRails
[09:10:45] yfeldblum: has joined #RubyOnRails
[09:17:17] hastur: what's the <% tag %> for manually inserting an auth token to a form
[09:18:47] dminuoso: hastur: What exactly are you trying to do?
[09:22:53] DevMagpie: has joined #RubyOnRails
[09:24:11] hahuang61: has joined #RubyOnRails
[09:27:33] armyriad: has joined #RubyOnRails
[09:28:33] pawnbox: has joined #RubyOnRails
[09:30:39] pawnbox: has joined #RubyOnRails
[09:34:21] armyriad: has joined #RubyOnRails
[09:34:35] hastur: ah, i have to write a form to POST to an action using HTML, not the magic tags
[09:35:00] hastur: it'as of yet, it throws invalidauthenticationerror
[09:35:08] hastur: InvalidAuthenticityToken
[09:35:11] hastur: to be precise
[09:35:30] hastur: from handle_unverified_request
[09:35:57] hastur: dminuoso,
[09:37:00] lxsameer: has joined #RubyOnRails
[09:37:41] hastur: django you can just {{ csrf_token }} is there an equivalent for rails?
[09:39:05] armyriad: has joined #RubyOnRails
[09:45:25] xpl0iter: has joined #RubyOnRails
[09:46:41] indigomez: has joined #RubyOnRails
[09:47:24] lizard2010: <%= csrf_meta_tag %> ?
[09:47:27] xpl0iter: Hi, I am using will_paginate. Each of the items show a delete button for each entry as well. I don't have clue on how this delete button comes. Can someone please give me a hint? erb file where the paginate is being called:http://pastie.org/private/dxcz6if5zr2uw3bzo80nlg
[09:48:44] wethu: has joined #RubyOnRails
[09:48:52] indigomez: hi! When SQLite3::Database.new from scratch, how do I specify a subdirectory from the source file to create the database there rather than in the root folder? Thanks!
[09:53:33] ewelina_: has joined #RubyOnRails
[09:53:43] lexileo: has joined #RubyOnRails
[09:54:05] mikecmpbll: has joined #RubyOnRails
[09:54:56] indigomez: solved: SQLite3::Database.new("db/#{db_name}")
[09:55:59] lizard2010: xpl0iter, look for cycle, which drow each entry
[09:56:00] flashpoint9: has joined #RubyOnRails
[10:00:16] neohunter: has joined #RubyOnRails
[10:00:19] stardiviner: has joined #RubyOnRails
[10:01:32] roamingdog: has joined #RubyOnRails
[10:01:47] xpl0iter: lizard2010, I don't have a clue on how it came. I haven't specified anything May be it took it from this other paginate thing I had. Anyway, I just rmeoved the render part and manually gave a segment.each do statement
[10:02:07] abhvl: has joined #RubyOnRails
[10:02:24] jtong: has joined #RubyOnRails
[10:02:42] eserror: has joined #RubyOnRails
[10:05:10] arup_r: has joined #RubyOnRails
[10:07:49] flashpoint9: has joined #RubyOnRails
[10:09:10] Meow-J: has joined #RubyOnRails
[10:15:52] dionysus69: has joined #RubyOnRails
[10:17:38] yfeldblum: has joined #RubyOnRails
[10:20:32] harfangk: has joined #RubyOnRails
[10:20:35] rickmasta: has joined #RubyOnRails
[10:23:35] alfiemax: has joined #RubyOnRails
[10:23:47] moep: has joined #RubyOnRails
[10:23:54] moep: has joined #RubyOnRails
[10:24:49] hahuang61: has joined #RubyOnRails
[10:25:40] workmad3_: has joined #RubyOnRails
[10:29:57] fermonkus: has joined #RubyOnRails
[10:30:42] artto: has joined #RubyOnRails
[10:31:39] euphoria-: has joined #RubyOnRails
[10:32:00] yardenbar: has joined #RubyOnRails
[10:36:43] petor: has joined #RubyOnRails
[10:39:08] srinidhi: has joined #RubyOnRails
[10:42:49] xall: has joined #RubyOnRails
[10:43:46] ewelina_: has joined #RubyOnRails
[10:44:20] conta: has joined #RubyOnRails
[10:45:26] tvw: has joined #RubyOnRails
[10:45:33] existensil: has joined #RubyOnRails
[10:45:47] douglascorrea: has joined #RubyOnRails
[10:46:46] ewelina_: has joined #RubyOnRails
[10:46:53] yfeldblum: has joined #RubyOnRails
[10:50:17] pawnbox_: has joined #RubyOnRails
[10:55:47] Ropeney: has joined #RubyOnRails
[10:58:13] euphoria-: has joined #RubyOnRails
[10:59:37] blackmesa: has joined #RubyOnRails
[11:01:20] rodfersou: has joined #RubyOnRails
[11:03:04] Ropeney: has joined #RubyOnRails
[11:03:23] Ropeney: has joined #RubyOnRails
[11:03:50] jtong: has joined #RubyOnRails
[11:04:38] quazimodo: this is ood
[11:05:22] quazimodo: i have action cable working just fine on a fresh rails 5 app in localhost, but the rails 4 upgrade app can't get the cable response to upgrade to a websocket. I've change everything on the rails 4 app to look like the rails 5 one :(
[11:05:37] quazimodo: killing my life this effin thing
[11:09:11] elepedus: has joined #RubyOnRails
[11:12:28] ewelina: has joined #RubyOnRails
[11:12:55] quazimodo: And now it's working
[11:13:03] quazimodo: ACTION hifives himself and everyone's face
[11:13:07] ur5us: has joined #RubyOnRails
[11:18:32] tribals: has joined #RubyOnRails
[11:19:09] Leonardodutra: has joined #RubyOnRails
[11:19:27] tribals: when using fog for assets on S3, i fall into ultimate problem in production environment
[11:19:36] Mia: has joined #RubyOnRails
[11:19:36] Mia: has joined #RubyOnRails
[11:19:53] tribals: i'm getting exception with message "SocketError: getaddrinfo: Name or service not known"
[11:20:31] tribals: i absolutely do not understand any relation between trying to use S3 and `getaddrinfo` error
[11:20:42] tribals: have anyone any idea?
[11:21:22] rvanlieshout: that's a dns issue
[11:21:45] tribals: rvanlieshout: what you mean by "dns issue"?
[11:22:00] rvanlieshout: getaddrinfo tries to resolve a hostname
[11:22:03] rvanlieshout: but is unable to do so
[11:22:18] tribals: any reason for that???
[11:22:23] tribals: i don't understand
[11:22:27] rvanlieshout: what names is it trying to resolve?
[11:23:01] tribals: i've no idea. the code that runs into this issue simple creates file on AWS S3
[11:23:21] lizard2010: because you user wrong address or resolver
[11:23:39] rvanlieshout: and it uses a dns-name for that AWS S3 thing
[11:23:42] rvanlieshout: that it cannot resolve
[11:23:52] tribals: the backtrace containt about 200 lines, but it is only one message that shown in backtrace: "SocketError: getaddrinfo: Name or service not known"
[11:24:26] rvanlieshout: the backtrace won't show u that actual url
[11:25:20] tribals: i don't see any reason for issue with name resolution
[11:25:36] rvanlieshout: what hostname is it using?
[11:25:42] rvanlieshout: did you specify that somewhere in your config?
[11:25:51] hahuang61: has joined #RubyOnRails
[11:26:02] tribals: hostname for what kind of thing you mean?
[11:26:09] rvanlieshout: of the ASW S3 bucket
[11:26:29] tribals: no, i'm do not specify any hostnames for bucket
[11:26:57] lizard2010: you should register account and bucket before use
[11:27:11] lizard2010: and set it in env
[11:27:22] tribals: lizard2010: are you really think a'm so stupid?
[11:27:36] lizard2010: Sorry, I have no idea (=
[11:28:04] tribals: i have no idea too
[11:28:28] lizard2010: S3_BUCKET=my-s3-development
[11:28:28] lizard2010: AWS_SECRET_ACCESS_KEY=exampleBARZHS3sRew8xw5hiGLfroD/b21p2l
[11:28:46] rvanlieshout: shoulnd't S3_bucket be a full url?
[11:28:49] lizard2010: you should have somethink like this
[11:29:04] tribals: no, it should be just name of bucket
[11:29:26] rvanlieshout: well. you could always just edit the source file of the thing that is compaining that it can't resolve and see what it tries to resolve
[11:30:38] lizard2010: Can you make gist with backtrace?
[11:31:36] tribals: rvanlieshout: this is practically impossible. I understand in the code only to the second coming
[11:31:37] lizard2010: Do you have dns work on server env where get error?
[11:32:01] rvanlieshout: tribals: how is it impossible? gist the stacktrace
[11:32:11] rvanlieshout: it'll just so you the place where it tries to resolve something
[11:32:34] lizard2010: and which gem for s3 work you use? Is it latest?
[11:32:41] tribals: lizard2010: with great pleasure, second
[11:33:53] rvanlieshout: it'll take you less then 1 min to find out what it's trying to resolve...
[11:34:38] rvanlieshout: gist the stack trace
[11:34:59] lizard2010: and Carrierwave?
[11:36:17] benlieb: has joined #RubyOnRails
[11:36:50] lizard2010: and, which FOG_REGION you have set?
[11:37:07] rvanlieshout: we're now just guessting..
[11:37:15] rvanlieshout: so let's start with finding out what it tries to resolve
[11:39:06] tribals: https://gist.github.com/tribals/ee6cb1779208c070e5558a10f61766c6
[11:39:14] tribals: yes, carrierwave
[11:39:45] rvanlieshout: edit /app/vendor/bundle/ruby/2.2.0/gems/excon-0.45.4/lib/excon/socket.rb:108
[11:40:55] rvanlieshout: what's on line 108?
[11:41:51] ldnunes: has joined #RubyOnRails
[11:42:43] lizard2010: carrierwave, which then a endpoint in CarrierWave.config ?
[11:43:33] roamingdog: has joined #RubyOnRails
[11:45:11] solars: when running an app on multiple servers, how do you avoid find_or_create_by clashes? wrap it into a transaction?
[11:46:11] mdw: has joined #RubyOnRails
[11:47:21] mdw: has joined #RubyOnRails
[11:51:06] tribals: "/app/vendor/bundle/ruby/2.2.0/gems/excon-0.45.4/lib/excon/socket.rb:108: addrinfo = ::Socket.getaddrinfo(*args)"
[11:51:28] rvanlieshout: tribals: add a puts args.inspect on the line just before that
[11:51:39] rvanlieshout: and run whatever you did again
[11:51:45] tribals: ok, going to try it out, minute
[11:53:26] sevenseacat: has joined #RubyOnRails
[11:54:21] pawnbox: has joined #RubyOnRails
[11:56:41] bruce_lee: has joined #RubyOnRails
[11:56:41] bruce_lee: has joined #RubyOnRails
[11:57:57] lizard2010: tribals, which endpoint set in CarrierWave.config ?
[11:58:04] marr: has joined #RubyOnRails
[11:58:23] tribals: lizard2010: what you mean by 'endpoint'?
[11:59:34] tribals: result of `args.inspect`: ["yarivo.s3-ue-west-1.amazonaws.com", 443, 0, 1, nil, nil, false]
[11:59:55] lizard2010: tribals, typical error - copypast carrierwave config with nonexists :endpoint => 'https://s3.example.com:8080'
[12:00:36] rvanlieshout: i can't imagine how much crap example.com would get if they start to provide actual services
[12:01:32] tvw: has joined #RubyOnRails
[12:02:22] zpe: has joined #RubyOnRails
[12:02:27] lizard2010: ["yarivo.s3-ue-west-1.amazonaws.com",
[12:03:00] lizard2010: should be _eu_
[12:03:34] stardiviner: has joined #RubyOnRails
[12:05:37] jtong: has joined #RubyOnRails
[12:10:55] tribals: seems i'm really so stupid. fixed typo, just worked
[12:13:37] davidklsn: has joined #RubyOnRails
[12:15:10] blackmesa: has joined #RubyOnRails
[12:18:17] ewelina_: has joined #RubyOnRails
[12:18:32] mdw7: has joined #RubyOnRails
[12:19:01] umdstu: has joined #RubyOnRails
[12:21:44] tribals: rvanlieshout, lizard2010: thank
[12:21:54] _Tariq: has joined #RubyOnRails
[12:22:36] rvanlieshout: you're welcome
[12:24:18] ngw: has joined #RubyOnRails
[12:26:54] hahuang61: has joined #RubyOnRails
[12:26:57] SteenJobs: has joined #RubyOnRails
[12:27:50] jschoolcraft: has joined #RubyOnRails
[12:27:56] flashpoint9: has joined #RubyOnRails
[12:30:44] lacce: has joined #RubyOnRails
[12:33:33] indigomez: has joined #RubyOnRails
[12:33:36] arup_r: lizard2010: it is 2016 :p
[12:34:26] fermonkus: has joined #RubyOnRails
[12:36:04] siaw23: has joined #RubyOnRails
[12:36:11] pawnbox: has joined #RubyOnRails
[12:37:23] siaw23: : i’m using react with reails can someone tell me why i’m getting this: https://gyazo.com/7130fdab2bd4c691f7d9ab479de40b55
[12:37:31] siaw23: my files are here (that answer fixes old problem) http://stackoverflow.com/questions/38388028/component-rendering-with-react-in-rails-not-working
[12:38:20] pawnbox: has joined #RubyOnRails
[12:39:38] dvinciguerra_: has joined #RubyOnRails
[12:42:15] baash05: has joined #RubyOnRails
[12:50:06] tribals: has joined #RubyOnRails
[12:50:33] baash05: Hey all.. I'm trying to pick up this new project.. it's on msql. and I'm getting an error
[12:50:37] baash05: Can't connect to local MySQL server through socket '/tmp/mysql.sock'
[12:50:47] M-shine: has joined #RubyOnRails
[12:50:51] rvanlieshout: baash05: and why sould you expect that it could connect to that server using that socket?
[12:51:09] baash05: Don't know.. I ran rake db:migrate.
[12:51:21] baash05: Never worked with mysql.
[12:51:27] rvanlieshout: it's not rails related
[12:51:35] rvanlieshout: you've told rails to use a mysql server (in config/database.yml)
[12:51:38] rvanlieshout: so it tries to use that
[12:51:47] rvanlieshout: it's up to you to have that dependent service running
[12:52:27] baash05: Sure.. I was wondering if it was an error others knew how to quickly jump over.
[12:52:38] rvanlieshout: start a mysql server that listens on /tmp/mysql.sock
[12:54:00] baash05: sudo systemctl start mysql.service
[12:54:10] baash05: Is that it?
[12:54:21] rvanlieshout: if you're running a system with systemd and have installed mysql in a way that it creates a systemd unit file
[12:55:26] baash05: Would there be a way to test if I'm in that sitch?
[12:55:36] lizard2010: and you have create db and user, and give them access for the db
[12:55:36] rvanlieshout: try it like that
[12:56:06] lizard2010: baash05, ps auxw | grep mysql
[12:56:14] quazimodo: has joined #RubyOnRails
[12:56:40] rvanlieshout: that would only popup if you have a mysql running
[12:59:50] harfangk: has joined #RubyOnRails
[13:00:47] baash05: I've got some hits.
[13:01:34] baash05: and I can create a db. I followed this
[13:01:35] baash05: http://www.cyberciti.biz/faq/howto-install-mysql-on-ubuntu-linux-16-04/
[13:01:47] rvanlieshout: then have rails use that db
[13:03:38] mikecmpb_: has joined #RubyOnRails
[13:04:40] baash05: Thanks. I didn't get in, but at least I've changed something.
[13:04:48] baash05: Too late now to keep going. :)
[13:06:53] rvanlieshout: :) it's still light here, carry on
[13:07:10] jtong: has joined #RubyOnRails
[13:08:29] AlexJakeGreen: has joined #RubyOnRails
[13:10:05] vanderkerkoff: has joined #RubyOnRails
[13:10:46] vanderkerkoff: Has anyone got any links to how I handle running rake commands against a database container from a ruby container during a stack deploy?
[13:11:02] vanderkerkoff: Do you have to create a .sh script or something and handle it in there?
[13:12:01] vanderkerkoff: If I stick the RUN bundle exec rake db:migrate into the Dockrfile directly, then I’m breaking a load of rules and it wont work :-(
[13:12:04] quazimodo: has joined #RubyOnRails
[13:14:28] rvanlieshout: what are you trying to do?
[13:14:44] rvanlieshout: you're not using Capistrano for you deploy?
[13:14:54] Detch: has joined #RubyOnRails
[13:15:20] ewelina_: has joined #RubyOnRails
[13:17:27] douglascorrea: has joined #RubyOnRails
[13:19:37] arup_r: vanderkerkoff: yes we are
[13:19:42] vanderkerkoff: I’m trying to deploy a rails app as a docker container, that connects to a mysql container
[13:20:12] rickmasta: has joined #RubyOnRails
[13:20:34] vanderkerkoff: so youre using a script that is called from the Dockerfile for this sort of thing?
[13:20:42] ewelina_: has joined #RubyOnRails
[13:21:19] elepedus: has joined #RubyOnRails
[13:22:29] arup_r: No, I thought you want to check if we can see you. I didn't see above messages you did already. Sorry, I don't use docker :/
[13:24:09] vanderkerkoff: no worries arup_r
[13:24:39] vanderkerkoff: has left #RubyOnRails: ()
[13:25:42] edwinvdg_: has joined #RubyOnRails
[13:28:12] Kedare: has joined #RubyOnRails
[13:28:21] davidklsn: has joined #RubyOnRails
[13:29:40] M-MichaelKulpa: has joined #RubyOnRails
[13:29:57] oqui: has joined #RubyOnRails
[13:31:31] roamingdog: has joined #RubyOnRails
[13:33:15] oqui: Hello, am fairly new to rails. I've seen syntax in html forms such as <input type="text" name="member[name]"> which am finding for the first time. I don't understand that you can have members[name] as value for an html key. How does rails reference this value for instance? normally it would be params[:name], but params[:members[name]] would seen awkward for me
[13:33:25] davidklsn: has joined #RubyOnRails
[13:33:34] rvanlieshout: oqui: member[name] would result in a param[:member]
[13:33:37] rvanlieshout: that's a hash itself
[13:34:36] rvanlieshout: so if you have inputs foo=one, member[bar]=two and member[baz]=three it'll result in params { foo: 'one', member: { bar: 'two', baz: 'three' })
[13:35:52] fschuindt: has joined #RubyOnRails
[13:37:54] quazimodo: has joined #RubyOnRails
[13:38:46] oqui: rvanlieshout: cool thanks. I suppose syntax is unique to rails.
[13:40:33] rvanlieshout: it's quite common actually :)
[13:41:01] rvanlieshout: even is something like 3 inputs with the name member_ids[], values 1,2,3. That'll result in params = { member_ids: [1,2,3] }
[13:43:37] oqui: okay. Am going to read it up a lot more.
[13:50:17] johnkpaul: has joined #RubyOnRails
[13:50:48] snowy: has joined #RubyOnRails
[13:50:54] johnkpaul: Is there a way to save an active record model while skipping the models’ validations but *not* skipping the nested model validations
[13:51:03] siaw23: has left #RubyOnRails: ()
[13:51:11] johnkpaul: I have a model that accepts nested attributes for another one
[13:51:28] rvanlieshout: johnkpaul: the approach is wrong if you need to skip validations
[13:51:44] rvanlieshout: cause that would result in a model that's still invalid after a reload
[13:51:50] rvanlieshout: why would you want to skip validations?
[13:52:17] johnkpaul: ah ok, then I need to find another way to have the first screen take information for the submodel and a second screen to take info for the main model
[13:52:29] johnkpaul: I have a Request has_many Item
[13:52:49] johnkpaul: the first screen is to get information about the Item, which can belong to an empty request until the second screen
[13:52:54] johnkpaul: where I get information about the request
[13:53:09] johnkpaul: I want to use the usual validation system, but I want to be able to create the Item first
[13:53:26] rvanlieshout: so then an item is valid even if it doesn't belong to a request
[13:53:55] johnkpaul: hmm, it is not
[13:54:02] johnkpaul: it’s a nested route and a nested model
[13:54:04] rvanlieshout: it is, it might not be complete yet
[13:54:09] rvanlieshout: or usable for a request, but it essence it's valid
[13:54:13] rvanlieshout: you might want to give it a state
[13:54:19] johnkpaul: something like /requests/9/items/2
[13:54:23] rvanlieshout: and have a request only accept items of a certain state
[13:54:32] flashpoint9: has joined #RubyOnRails
[13:54:53] rvanlieshout: yes, you want your users to be able to create an item
[13:55:09] rvanlieshout: and after that a request, where they directly connect that item to?
[13:55:39] johnkpaul: I can construe it that way, but the wireframes are different
[13:55:52] johnkpaul: from the user perspective, they are creating a request the whole time, and can eventually add more items
[13:56:01] johnkpaul: they’re just putting the information into separate pages
[13:56:09] rvanlieshout: true, but they start with an item, right?
[13:56:10] johnkpaul: I see what you mean though
[13:56:36] johnkpaul: yes, they do start with an item, but it’s on /requests/new and posts to /requests
[13:57:05] rvanlieshout: you might want to create a new and create for item at /items/new and /items/create
[13:57:11] rvanlieshout: /items that is
[13:57:15] johnkpaul: yeah, I agree, such is agile. Request used to have everything but a new requirement was that a request has multiple items
[13:57:18] johnkpaul: so it was separated out
[13:57:22] johnkpaul: yeah, I see what you mean
[13:57:23] rvanlieshout: and i know that looks weird, but having it consistent is more important then the niceness of the url
[13:57:46] rvanlieshout: or have it fill all data in multiple screens without posting it when switching between screens (read: tabs)
[13:58:22] johnkpaul: oh you mean have the multiple forms be on the client side alone?
[13:58:34] rvanlieshout: it doesn't even have to be multiple forms
[13:58:48] rvanlieshout: there could be a huge difference between what the user sees and what he thinks he sees
[13:58:56] Rodya_: has joined #RubyOnRails
[13:59:57] johnkpaul: ah you mean use JS to show and hide multiple pieces
[14:00:07] johnkpaul: I get it, that makes sense
[14:00:30] johnkpaul: thank you for your help, rvanlieshout!
[14:00:34] rvanlieshout: you're welcome
[14:00:37] alfiemax: has joined #RubyOnRails
[14:00:38] johnkpaul: I’m going to try that now
[14:03:01] roamingdog: has joined #RubyOnRails
[14:03:49] diegoviola: has joined #RubyOnRails
[14:04:01] rbr: johnkpaul: Apart from if your case if valid, a with_options conditional would be a possibility for such a usecase: http://guides.rubyonrails.org/active_record_validations.html#grouping-conditional-validations
[14:04:19] rvanlieshout: yep, that's also possible
[14:04:28] rvanlieshout: but that would still make it valid in that scenario
[14:04:48] rvanlieshout: it's important that a model instance kan determine if it's valid or not by only using stuff from the model's domain
[14:05:43] augcesar: has joined #RubyOnRails
[14:06:19] rvanlieshout: anyway. time for some weekend. talk to you here later! enjoy your weekends
[14:06:50] ngw: has joined #RubyOnRails
[14:08:32] jtong: has joined #RubyOnRails
[14:09:12] travismathis: has joined #RubyOnRails
[14:12:06] fmcgeough: has joined #RubyOnRails
[14:12:46] eserror: has joined #RubyOnRails
[14:20:55] rbr: You too!
[14:21:22] Oliphaunte: has joined #RubyOnRails
[14:27:54] hahuang61: has joined #RubyOnRails
[14:27:55] benlieb: has joined #RubyOnRails
[14:28:27] mikecmpbll: has joined #RubyOnRails
[14:28:43] eljimmy: has joined #RubyOnRails
[14:29:28] rafaelflores: has joined #RubyOnRails
[14:31:39] naftilos76: has joined #RubyOnRails
[14:32:21] davidklsn: has joined #RubyOnRails
[14:34:11] Rodya_: has joined #RubyOnRails
[14:34:35] Mia: has joined #RubyOnRails
[14:36:30] bga57: has joined #RubyOnRails
[14:37:21] arup_r: has joined #RubyOnRails
[14:37:29] wd40s: has joined #RubyOnRails
[14:38:19] Mia: has joined #RubyOnRails
[14:38:19] Mia: has joined #RubyOnRails
[14:44:16] quazimod1: has joined #RubyOnRails
[14:44:31] quazimod2: has joined #RubyOnRails
[14:47:36] prithaj: has joined #RubyOnRails
[14:49:31] eserror: has joined #RubyOnRails
[14:50:35] rafaelflores: has joined #RubyOnRails
[14:50:37] davidklsn: has joined #RubyOnRails
[14:50:44] SteenJobs: has joined #RubyOnRails
[14:51:20] flashpoint9: has joined #RubyOnRails
[14:53:17] ngw: has joined #RubyOnRails
[14:55:39] artto: has joined #RubyOnRails
[15:00:41] artto: has joined #RubyOnRails
[15:00:46] MajorTennis: has joined #RubyOnRails
[15:00:55] tvon: has joined #RubyOnRails
[15:02:35] ferr: has joined #RubyOnRails
[15:03:31] Criten: has joined #RubyOnRails
[15:03:39] Criten: has left #RubyOnRails: ()
[15:06:58] diegoviola: has joined #RubyOnRails
[15:09:02] ferr: has joined #RubyOnRails
[15:10:10] jtong: has joined #RubyOnRails
[15:10:45] rafaelflores: has joined #RubyOnRails
[15:11:26] artto: has joined #RubyOnRails
[15:12:55] bool_: has joined #RubyOnRails
[15:14:29] benlieb: has joined #RubyOnRails
[15:15:53] rafaelflores: has joined #RubyOnRails
[15:17:14] one_zero: has joined #RubyOnRails
[15:18:27] JakFrist: has joined #RubyOnRails
[15:21:02] euphoria-: has joined #RubyOnRails
[15:21:39] yardenbar: has joined #RubyOnRails
[15:22:28] veex: has joined #RubyOnRails
[15:23:09] hardtail: has joined #RubyOnRails
[15:28:38] hahuang61: has joined #RubyOnRails
[15:30:31] Rodya_: has joined #RubyOnRails
[15:31:12] blackmesa: has joined #RubyOnRails
[15:35:43] disgrntld: has joined #RubyOnRails
[15:36:14] banisterfiend: has joined #RubyOnRails
[15:36:56] shinnya: has joined #RubyOnRails
[15:42:58] yardenbar: has joined #RubyOnRails
[15:43:27] epochwolf: I'm trying to install a second rails 4.2 app on the same server as an existing server. I'm getting a ExecJS::RuntimeUnavailable error from bundler... how do I find out what JS Runtime the working rails 4 is using?
[15:46:03] rafaelfranca: has joined #RubyOnRails
[15:50:15] [Butch]: has joined #RubyOnRails
[15:51:48] dionysus69: has joined #RubyOnRails
[15:54:06] crameth: has joined #RubyOnRails
[15:54:43] Palsson: has joined #RubyOnRails
[15:55:15] dvinciguerra_: has joined #RubyOnRails
[15:57:03] cschneid_: has joined #RubyOnRails
[15:57:36] fryguy: epochwolf: look at its gemfile
[15:58:20] epochwolf: fryguy: None in the gemfile.
[15:58:30] fryguy: epochwolf: are you sure?
[15:58:47] fryguy: epochwolf: maybe you are missing it. Try pastebinning the Gemfile
[15:59:39] epochwolf: Oh, there is it... better look in the correct project: "therubyracer"
[16:00:22] Medusa: has joined #RubyOnRails
[16:01:29] Medusa: I haven't done any serious programming for 2 years
[16:01:32] Medusa: What is a good way to catch up?
[16:01:35] polishdub: has joined #RubyOnRails
[16:01:53] epochwolf: fryguy: sorry, I did that before asking the question and I had the wrong branch pulled up.
[16:02:16] epochwolf: Medusa: build something.
[16:03:12] eljimmy: has joined #RubyOnRails
[16:03:58] JakFrist: has joined #RubyOnRails
[16:04:25] Medusa: epochwolf: Thanks. But what if I don't know what to build?
[16:04:40] fryguy: wait for inspiration
[16:06:25] epochwolf: Medusa: anything you want, anything you could use.
[16:06:49] epochwolf: Build a blog. :)
[16:07:47] otherj: has joined #RubyOnRails
[16:09:28] Medusa: There are many preexisting blog CMSems.
[16:09:30] euphoria-: has joined #RubyOnRails
[16:09:58] epochwolf: You want to get back into programming. The best way to do that is to program.
[16:10:46] Medusa: That's reinventing the bike. If you want a blog, the smartest idea would be to use wordpress or any other ready solution.
[16:11:26] Medusa: I want to benefit others. And I never had any specific ideas, not to say inspiration.
[16:11:36] jtong: has joined #RubyOnRails
[16:12:49] beingjohnm: When going to subdomain.myapp.com I want to redirect to subdomain.myapp.com/users/sign_in. I'm using rails 4 and have the following in my routes.rb but it doesn't seem to work: match '/', to: 'users/sessions#new', constraints: { subdomain: /.+/ }, via: [:get, :post, :put, :patch, :delete]
[16:13:07] beingjohnm: Got that from a rails 3 tutorial. So curious if that still works in rails 4?
[16:13:11] Giov: has joined #RubyOnRails
[16:13:43] Giov: Hi, I'm trying to install devise on rails 5 but I'm stuck after installing the gem
[16:14:16] Giov: rails generate devise:install gives me "Could not find generator 'devise:install'"
[16:14:57] Medusa: Isn't it rake devise:install?
[16:15:08] macsteps: has joined #RubyOnRails
[16:15:23] mikelearnsrails: has joined #RubyOnRails
[16:15:54] Giov: hi Medusa
[16:16:06] Giov: I was following the guide on the devise homepage
[16:16:25] Giov: anyway, the gem is installed: bundle show devise -> /home/user/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/devise-4.2.0
[16:16:29] lizard2010: Giov, do you have install gem?
[16:16:59] dvinciguerra_: has joined #RubyOnRails
[16:17:18] moeabdol1: has joined #RubyOnRails
[16:17:35] xlegoman: has joined #RubyOnRails
[16:18:29] Cohedrin: has joined #RubyOnRails
[16:18:57] mikelearnsrails: hi everyone, I'm just getting started with the rails4-starterkit. it's up and running, I'm just having trouble creating an admin user to access the Admin controls. Where would I set user.is_admin = true
[16:20:59] agent_white: has joined #RubyOnRails
[16:21:17] jhass: if you want to learn rails now, it might be worth to start from scratch and with rails 5
[16:22:00] epochwolf: Medusa: if you want to learn something, get over the idea that retreading existing ground is a bad thing.
[16:22:16] epochwolf: Medusa: your goal is to learn, not build something better than what already exists.
[16:22:17] lizard2010: Giov, try «gem uninstall devise»
[16:22:31] lizard2010: and after - bundle install
[16:23:31] epochwolf: Medusa: my next project after I wrangle some horrid php is an irc bot. Talk about building something that doens't need to exist. :D
[16:24:04] Giov: lizard2010: I tried it but I get the same error
[16:26:17] lizard2010: Giov, do you use kind of ruby version manager like rvm or rbenv?
[16:27:16] Giov: I tried rbenv rehash but still nothing
[16:27:45] JakFrist: has joined #RubyOnRails
[16:28:47] euphoria-: has joined #RubyOnRails
[16:29:40] hahuang61: has joined #RubyOnRails
[16:29:57] flashpoint9: has joined #RubyOnRails
[16:30:54] davidklsn: has joined #RubyOnRails
[16:31:28] lizard2010: Giov, WHat show «rbenv which bundle»
[16:32:03] rails45: has joined #RubyOnRails
[16:32:18] dvinciguerra_: has joined #RubyOnRails
[16:32:39] Zackio: has joined #RubyOnRails
[16:32:41] lizard2010: try set «rbenv local 2.2.4»
[16:33:05] lizard2010: and after « gem install bundler » and «bundle install
[16:33:34] macsteps: has joined #RubyOnRails
[16:33:39] rails45: I'm using the acts_as_votable gem. How can I sort posts with the most likes in the last 2 hours? It's sort of like currently trending posts. The posts themselves doesn't necessarily have to be created in the last 2 hours
[16:33:54] Giov: lizard2010: /home/user/.rbenv/versions/2.2.4/bin/bundle
[16:34:49] Giov: and yep I already have the .ruby-version file set to 2.2.4
[16:35:07] rails45: I'm using .order(:cached_votes_total => :desc) but it shows all-time most liked posts
[16:36:24] arup_r: has joined #RubyOnRails
[16:36:28] blackmesa: has joined #RubyOnRails
[16:39:15] lizard2010: Giov, looks like your rails looks for gem in another place
[16:39:20] Medusa: epochwolf, thanks, that makes sense.
[16:39:51] rafaelflores: has joined #RubyOnRails
[16:40:13] Giov: lizard2010: is there something I should check in bin/spring ?
[16:41:58] lizard2010: I think - no
[16:42:17] lizard2010: try « bundle show devise»
[16:42:37] dangerousdave: has joined #RubyOnRails
[16:43:33] Giov: lizard2010: bundle show devise -> /home/user/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/devise-4.2.0
[16:43:36] rbaron: has joined #RubyOnRails
[16:43:53] petor: has joined #RubyOnRails
[16:44:40] Tempesta: has joined #RubyOnRails
[16:44:40] Tempesta: has joined #RubyOnRails
[16:45:49] manfrin: has joined #RubyOnRails
[16:46:24] harfangk: has joined #RubyOnRails
[16:46:32] armyriad: has joined #RubyOnRails
[16:46:41] Giov: lizard2010: I'll have to go in a bit but thanks a lot anyway for your help! I'll try again with 4.2.6
[16:47:08] rafaelflores: has joined #RubyOnRails
[16:47:21] mdw: has joined #RubyOnRails
[16:48:31] DoctorMonocular: has joined #RubyOnRails
[16:57:41] dvinciguerra_: has joined #RubyOnRails
[16:57:52] _djbkd: has joined #RubyOnRails
[16:58:34] eljimmy: has joined #RubyOnRails
[17:01:23] travismathis: has joined #RubyOnRails
[17:08:27] benlieb: has joined #RubyOnRails
[17:09:25] rocketsurgeon: has joined #RubyOnRails
[17:09:59] jonee: has joined #RubyOnRails
[17:11:22] travismathis: has joined #RubyOnRails
[17:11:28] doodlehaus: has joined #RubyOnRails
[17:12:12] Rodya_: has joined #RubyOnRails
[17:12:20] harfangk: has joined #RubyOnRails
[17:13:04] jtong: has joined #RubyOnRails
[17:14:28] AndrewIsHere: has joined #RubyOnRails
[17:16:52] Guest21: has joined #RubyOnRails
[17:16:57] Guest21: Hi, is there any way i can dynamically change a model's table_name ? Currently I have defined a block, but it is calculated only once and then cached indefinately.
[17:19:02] arup_r: has joined #RubyOnRails
[17:21:48] Ebok: has joined #RubyOnRails
[17:22:32] mwcmitchell: has joined #RubyOnRails
[17:22:56] Coldblackice: has joined #RubyOnRails
[17:30:40] hahuang61: has joined #RubyOnRails
[17:31:00] Guest21: has joined #RubyOnRails
[17:31:05] Oliphaunte: has joined #RubyOnRails
[17:31:23] srinidhi: has joined #RubyOnRails
[17:32:45] dvinciguerra_: has joined #RubyOnRails
[17:33:19] dgynn: has joined #RubyOnRails
[17:34:08] Rodya_: has joined #RubyOnRails
[17:34:51] hahuang65: has joined #RubyOnRails
[17:37:04] _djbkd: has joined #RubyOnRails
[17:37:20] hastur: has joined #RubyOnRails
[17:37:40] blackmesa: has joined #RubyOnRails
[17:38:46] petor: has joined #RubyOnRails
[17:40:05] whathappens: has joined #RubyOnRails
[17:43:21] srinidhi: has joined #RubyOnRails
[17:44:36] Ebok: has joined #RubyOnRails
[17:45:00] bronson: has joined #RubyOnRails
[17:48:13] DoubleMalt: has joined #RubyOnRails
[17:48:18] theery: has joined #RubyOnRails
[17:48:37] DoctorMonocular: has joined #RubyOnRails
[17:48:46] pawnbox_: has joined #RubyOnRails
[17:50:59] fschuindt: has joined #RubyOnRails
[17:51:20] alfiemax: lets say i've a rails app in production on a aws ec2 linux instance
[17:52:10] alfiemax: now if i have to have a server administrator, what would be his role?
[17:52:49] pontiki: has joined #RubyOnRails
[17:52:54] arup_r: has joined #RubyOnRails
[17:53:11] alfiemax: can i myself do it? what all things comes under server maintenance, and is setting up firewalls and other security measures part of it?
[17:55:06] fox_mulder_cp: alfiemax: ook. u must find admin/devops which used AWS :)
[17:55:52] alfiemax: i've used aws, what specifically in it should i know?
[17:56:55] arup_r: has joined #RubyOnRails
[17:57:18] fox_mulder_cp: alfiemax: i'm use azure for my apps, so i can't help u with aws. i only can help as hosting operator admin
[17:57:26] jonee: well if you feel like you know your way around aws then no need to get help alfiemax
[17:57:39] alfiemax: i've read that amazon takes care of all the security
[17:58:00] alfiemax: jonee, i think so
[17:58:29] alfiemax: i'm more concerned about security, and for a new app thinking should i go for aws or digitalocean
[17:58:41] jonee: you will probably know when you actually do some work
[17:58:50] fox_mulder_cp: alfiemax: some my friends use heroku.
[17:58:54] jonee: digitalocean is just plain vps
[17:59:07] snowyrooftops: has joined #RubyOnRails
[17:59:07] fox_mulder_cp: now i'm write my own hosting panel control panel :)
[17:59:14] jonee: aws is a lot more expensive
[17:59:38] alfiemax: fox_mulder_cp, heroku uses aws ec2 itself
[17:59:53] alfiemax: and heroku in turn is more expensive and hard to work with
[18:00:00] alfiemax: these two i've used
[18:00:16] alfiemax: but don't know much about azure or digital ocean
[18:00:38] snowyrooftops: Can the Rails scaffolding generate a dropdown for referenced columns? I have a manufacturer entity, and I'm including manufacturer_id as a column in my product entity. Rails doesn't turn the manufacturer_id field into a dropdown with values populated from the manufacturer entity on building the scaffolding.
[18:00:39] fox_mulder_cp: in azure i use plain ubuntu vm for rails apps and my panel
[18:00:43] alfiemax: so, in case of digitalocean it's cheap i gues because it's just a plain vps
[18:01:00] fox_mulder_cp: snowyrooftops: not. it can't do that
[18:01:42] pontiki: rails scaffolding is only a point of departure; it's not that useful in real projects
[18:01:52] alfiemax: i've never seen a ror developer ever looking into security measures
[18:01:55] arup_r1: has joined #RubyOnRails
[18:02:11] pontiki: how many RoR developers have you seen, alfiemax ?
[18:02:21] snowyrooftops: fox_mulder_cp: Ah, okay. In the PHP world, I stuck with CakePHP for my prototypes because it's good at scaffolding - it builds the dropdowns too, and the default theme isn't all that bad.
[18:02:21] alfiemax: pontiki, :D
[18:02:27] fox_mulder_cp: snowyrooftops: u must add, as example: in controller: @app_servers = AppServer.all and in view: <%= f.collection_select :app_server_id, @app_servers.all, :id, :hostname, prompt: true %>
[18:02:42] epochwolf: alfiemax: um... I use rails for PCI compilant software.
[18:02:42] fox_mulder_cp: snowyrooftops: this is NOT PHP. $)
[18:02:57] alfiemax: pontiki, how do you manage security for the servers running your apps?
[18:03:03] blackmesa: has joined #RubyOnRails
[18:03:24] pontiki: that's not something even approaching answerable in irc
[18:04:07] epochwolf: Um... the same way you do for any server.
[18:04:08] alfiemax: pontiki, maybe you can give me some idea
[18:04:17] snowyrooftops: pontiki: For a quick prototype, the scaffolding is pretty near though.
[18:04:41] pontiki: considering the many types and layers of security, where they apply, including selection of hosting vendors, promotion procedures, internal security needs, authorization, authentications
[18:04:44] fox_mulder_cp: alfiemax: i'm secure my rails app by nginx :)
[18:04:49] pontiki: snowyrooftops: exactly
[18:04:49] snowyrooftops: fox_mulder_cp: BTW, PHP isn't all that bad. The PHP community has defined and widely adopted coding standards now.
[18:05:08] snowyrooftops: pontiki: *neat, not "near"
[18:05:23] alfiemax: snowyrooftops, yup the community has, can't say much about the devs
[18:05:24] pontiki: snowyrooftops: either word works :)
[18:05:37] fox_mulder_cp: snowyrooftops: asp.net take something from php, java, js, and more's
[18:05:56] _djbkd: has joined #RubyOnRails
[18:06:36] alfiemax: gotta go now, thanks pontiki fox_mulder_cp epochwolf :)
[18:06:46] snowyrooftops: fox_mulder_cp: The latest version of ASP.NET is taking a bit more from Python/Ruby... they're finally separating the web app from the IIS web server so it can run on other platforms.
[18:06:47] dionysus69: I have a digital ocean dropplet and I access it with ssh... how else would I "protect" it, just depends on how much more the attacker knows compared to the guys who created digital ocean lol
[18:06:48] SteenJobs: has joined #RubyOnRails
[18:07:21] dionysus69: also I doubt aws cares for the vps security itself, security-wise it should be very much alike digital ocean
[18:07:28] fox_mulder_cp: snowyrooftops: oh yes, i want adds a ruby, but
[18:07:31] lupine: dionysus69: there's stuff you can do ^^
[18:07:59] fox_mulder_cp: asp.net takes some thing from ruby and rails to. but core - is very strong for developing as for me
[18:08:12] dionysus69: lupine: like? )) any specific buzz words you can feed me so I can research on them?
[18:08:14] fox_mulder_cp: i'm drop my asp.net skills, and switth too rals
[18:08:36] pontiki: why would you drop any skills?
[18:08:44] lupine: disabling password auth for ssh and/or installing fail2ban would be a reasonable start, for instance
[18:08:49] pontiki: asp.net especially is in high demads
[18:09:02] lupine: along with ensuring you install security updates in a reasonable timeframe
[18:09:16] lupine: (unattended-upgrades for debian, say)
[18:09:24] fox_mulder_cp: pontiki: because asp.net 4 0 easy to go. asp.net core - as assebler after visualbasic )
[18:09:29] dionysus69: lupine: yes ihave heard of fail2ban, thanks for reminding, I ll definitely put it on my queue
[18:09:45] lupine: disabling password auth is more important though
[18:09:56] pontiki: that seems rather reckless
[18:09:57] fox_mulder_cp: ssh -> only keys
[18:10:01] lupine: some hosting companies provide images with it disabled by default
[18:10:04] lupine: others do not
[18:10:15] fox_mulder_cp: and stop password using is true
[18:10:33] dionysus69: lupine: I have already done that though :)
[18:10:56] lupine: never forget the great debian ssh key snafu
[18:10:56] rails45: has joined #RubyOnRails
[18:10:59] pLaTo0n: has joined #RubyOnRails
[18:10:59] pLaTo0n: has joined #RubyOnRails
[18:11:00] lupine: this is why fail2ban
[18:11:07] erlend: has joined #RubyOnRails
[18:11:08] pontiki: fox_mulder_cp: i have no idea what you meant by that :(
[18:11:12] dionysus69: snafu? what is that?
[18:11:24] rails45: When using the acts_as_votable gem, how can I access the created_at of votes?
[18:11:25] mikecmpbll: has joined #RubyOnRails
[18:11:29] fox_mulder_cp: pontiki: use only ssh keys, not password when auth ons erver
[18:11:35] lupine: error, mess-up, failure, etc
[18:11:37] whathappens: has joined #RubyOnRails
[18:11:40] pontiki: fox_mulder_cp: i'm talking about your asp.net repsonse
[18:12:00] arup_r: rails45: doesn't it create any model for you?
[18:12:30] fox_mulder_cp: pontiki: ooh. asp.net 4 using seems like and friendly, asp.net 5(core) - is hardly for start up from scratch
[18:12:33] snowyrooftops: dionysus69: The hosting provider usually secures the server such that the firewall only exposes the HTTP/HTTPS ports of the web server. From that point on, the security measures that you would have to ensure are in the functioning of the application (case in point, WordPress! :-P)
[18:12:36] lupine: (tl;dr for ~5 years debian used weak generation methods for keys, meaning one of ?4096? precomputed keys would work on any debian server)
[18:12:54] fox_mulder_cp: snowyrooftops: i'm secure WP by fail2ban too
[18:13:00] lupine: so that was fun. this was 2008 or so
[18:13:18] arup_r: rails45: it gives a `#votes` method, and with that method you will get the actual record, and from there `created_at`
[18:13:19] lupine: defence in depth is the way, the truth, and the light
[18:13:39] fox_mulder_cp: i believe some bugs in plain ssh an bash )
[18:13:40] snowyrooftops: fox_mulder_cp: When ASP.NET went from Web Forms to MVC, a lot of people stuck with Web Forms because the development was so visual... drag and drop controls, set properties in the IDE, and add the code for the click event by simply double-clicking on the button.
[18:14:26] fox_mulder_cp: snowyrooftops: asp.net forms was a trash such as bitrix, when i can see sql, styles, logiic in views
[18:14:43] jtong: has joined #RubyOnRails
[18:14:44] snowyrooftops: fox_mulder_cp: It was amazing... although it did perform poorly in many cases. They threw the baby out with the bath water when attempting to fix it.
[18:15:10] snowyrooftops: Bitrix shows you the SQL?
[18:15:11] fox_mulder_cp: and i transform some small apps from forms to mvc
[18:15:31] crystal77: has joined #RubyOnRails
[18:15:58] snowyrooftops: fox_mulder_cp: MVC is great for someone moving from RoR, Django, or Laravel.... but they built it for developers moving from VB6
[18:16:55] dionysus69: ok theres one thing I really need to hear from you people. I have met a very experienced .net/java developer with his own team about a project. I am getting started on a project that, if successful would need to scale to very very high levels. He asked me how could he help me, given he doesnt want to learn rails just for me. How could he possibly help me? help manage a database side or? what could .net/java guy do in a rails project? ANY i
[18:17:57] benlieb: has joined #RubyOnRails
[18:18:08] Leepoff: has joined #RubyOnRails
[18:18:11] snowyrooftops: dionysus69: Without learning Ruby, probably he/she can build the views (in HTML)?
[18:18:33] dionysus69: haha yep, he won't do that lol.
[18:19:03] dionysus69: if he helps me on anything, it would be on backend
[18:19:10] dionysus69: he said he doesnt waste time on frontend
[18:19:13] pontiki: rails is the back end
[18:19:27] snowyrooftops: dionysus69: Then, perhaps the deployment to the server or unit testing scripts
[18:19:48] snowyrooftops: dionysus69: Visual Studio Team Suite can build some really good tests for web apps.
[18:19:57] pontiki: i wouldn't put someone who doesn't understand how rails works in charge of deployment *or* unit testing
[18:19:58] dionysus69: could one test rails project withut rails/ruby knowledge?
[18:20:08] erlend: has joined #RubyOnRails
[18:20:13] whathapp_: has joined #RubyOnRails
[18:20:15] _djbkd: has joined #RubyOnRails
[18:20:22] rafaelflores: has joined #RubyOnRails
[18:20:25] pontiki: feature testing, probably
[18:20:45] dionysus69: he actually did mention he has one guy on team who knows rails. but I would need to know all the possible things he could help me into.
[18:20:49] pontiki: the sorts of tests you'd use cucubmer/capybara for
[18:20:59] dionysus69: I need to meet him again in a week and I need to be prepared as much as possible
[18:21:05] fox_mulder_cp: dionysus69: i'm switch from windows admin to linux hostmaster at hosting, and start to write my rails based appp
[18:21:39] snowyrooftops: dionysus69: all good coders can switch languages, to some extent... unless they're being stubborn
[18:21:40] whathappens: has joined #RubyOnRails
[18:21:48] fox_mulder_cp: snowyrooftops: ++
[18:22:04] fox_mulder_cp: my first language was basic
[18:22:13] dionysus69: well he was quite stubborn, he was open-source sceptic... which quite annoyed me really but I can't dismiss him because of that
[18:22:31] pontiki: i mean, why bother with them at all?
[18:22:31] fox_mulder_cp: than bash, c#, asp.net. now - all of them
[18:22:39] dionysus69: well I am microsoft java sceptic myself
[18:22:44] pontiki: ALL THE LANGUAGES
[18:23:09] dionysus69: didnt get that list
[18:23:16] pontiki: fox_mulder_cp: there are a few i will not admit to :D
[18:23:16] dionysus69: what was the point again?
[18:23:32] snowyrooftops: fox_mulder_cp: Basic was a revolution! It changed how people think about desktop app development.
[18:23:44] fox_mulder_cp: pontiki: if u are good programmer u can swich from one to one - all languages, OSes - only tool for making your tasks
[18:23:59] fox_mulder_cp: snowyrooftops: dos based basic $)
[18:24:08] dionysus69: pontiki: I wouldnt want to drop them, they are group of very serious developers in my country. just because we dont share stack.. sad story
[18:24:56] dionysus69: I just dont see a reason for using microsoft products. if microsoft disappeared from face of the earth, IT world would still be happy or happier actually
[18:25:05] pontiki: what difference does it make how serious or great they are if they cannot contribute to your needs, nor you to theirs?
[18:25:08] snowyrooftops: fox_mulder_cp: I started with practicing VB6, then learned VB.NET. I took up a project in Java, then got my first full-time job as a C# developer.
[18:25:22] arup_r: dionysus69: they will not disappear.. they will buy all others.. heheh
[18:25:42] snowyrooftops: fox_mulder_cp: Did you have a go at QuickBASIC? It was probably the best of the DOS-powered BASICs.
[18:25:43] dionysus69: pontiki: thats why I am looking for a niche they can help me into, like data modeling, load balancing, database management/scaling etc
[18:25:49] fox_mulder_cp: dionysus69: if U can't see a reason, but i'm see a reson $)
[18:25:55] rafaelfranca: has joined #RubyOnRails
[18:25:58] fox_mulder_cp: snowyrooftops: yes. it's )
[18:26:36] pontiki: dionysus69: why do you think you can do those things independent of your application framework and architecture?
[18:27:20] jstransky: has joined #RubyOnRails
[18:27:43] fox_mulder_cp: now i'm see only differences when try use object based and functional based languages
[18:27:53] fox_mulder_cp: it really differences
[18:28:13] Rodya_: has joined #RubyOnRails
[18:28:22] dionysus69: well, more or less independently, I hoped for it )) something at least, their experience sounds useful in general
[18:28:54] fox_mulder_cp: but ruby, python, c#, java - only syntax, only best practices and deplyment difference, as for me
[18:29:03] davidklsn: has joined #RubyOnRails
[18:30:20] fox_mulder_cp: Lenin some years ago says 'what languages count u know, what times u a Peiple'
[18:30:34] xall: has joined #RubyOnRails
[18:31:09] fox_mulder_cp: mut may be i must find that citate with good translation, not mine
[18:31:29] travismathis: has joined #RubyOnRails
[18:32:42] dionysus69: lol fox_mulder_cp where are you from ? xD
[18:32:45] hck89: has joined #RubyOnRails
[18:32:53] Rodya_: has joined #RubyOnRails
[18:33:01] fox_mulder_cp: dionysus69: Ukraine
[18:33:09] dionysus69: haha cool i am from Georgia
[18:34:17] fox_mulder_cp: dionysus69: great country. our Micheil now is our Odessa region leader :)
[18:34:32] dionysus69: haha ye I know
[18:34:38] dionysus69: hopefully his helpful
[18:34:40] barhum2013: has joined #RubyOnRails
[18:34:50] dionysus69: dunno what he actually does, I dont really know
[18:34:59] fox_mulder_cp: dionysus69: may be when i really switch to developer i have a money for pass to Georgia
[18:35:19] dionysus69: ye let me know if you visit xD
[18:35:21] fox_mulder_cp: dionysus69: make region is a cool and free from gangstars
[18:36:07] fox_mulder_cp: Odess sea port is one of biggest
[18:36:26] dionysus69: well I am glad if thats the case
[18:36:30] mikecmpbll: has joined #RubyOnRails
[18:36:55] snowyrooftops: I've only been to the Georgia state in the US... same name, different country
[18:37:19] fox_mulder_cp: snowyrooftops: Odessa, Kyiv, Moscow is a US based cities too :)
[18:37:24] DoctorMonocular: anyone know about jekyll? I just asked a question in #jekyll but the room is dead, so I could reask it here if someone is interested?
[18:37:28] fox_mulder_cp: Saint petersburg
[18:37:40] fox_mulder_cp: DoctorMonocular: i use it for my site
[18:37:52] snowyrooftops: fox_mulder_cp: Oh, I didn't know they also have a Moscow there
[18:38:15] snowyrooftops: fox_mulder_cp: The US also has a place named Dubai!!!!
[18:38:20] DoctorMonocular: fox_mulder_cp: I'm trying to do something slightly trickier than average, but here:
[18:38:25] DoctorMonocular: I wrote a hook that generates an object, and I want to add that object to the site config so in the hook I have a line like `site.config['my_obj'] = my_obj` -- in a template I then call site.my_obj. At first it didn't work because my_obj didn't define to_liquid, but then I wrote a to_liquid that output a hash. Now when I call site.my_obj it prints the right structure based on the to_liquid thing, but
[18:38:25] DoctorMonocular: I can't do something like site.my_obj['my_key'] or site.my_obj.my_key -- what's the right way to do that?
[18:38:26] fox_mulder_cp: snowyrooftops: Aidacho
[18:39:09] whathapp_: has joined #RubyOnRails
[18:39:15] fox_mulder_cp: DoctorMonocular: try to google liquid cheat sheet and jekyll cheat sheet too
[18:40:50] fox_mulder_cp: DoctorMonocular: and my repo as example https://github.com/foxmuldercp/mulder.kiev.ua
[18:41:55] DoctorMonocular: fox_mulder_cp: yeah I think I'm outside of the scope of the cheatsheet because I'm doing wonky shit with jekyll internals, but the main thing is that I don't actually know what format liquid expects -- other to_liquid methods seem to return hashes, but there are also things called Drops which I'm not clear about
[18:42:34] fox_mulder_cp: DoctorMonocular: see a my site, as example :)
[18:42:48] fox_mulder_cp: it coontains some cheated features, such as i18n :)
[18:44:23] DoctorMonocular: fox_mulder_cp: I don't see any code at all? Just hte usual jekyll files and md files and the like. Where should I look?
[18:44:51] DoctorMonocular: maybe it's in a gem?
[18:45:23] fox_mulder_cp: DoctorMonocular: it's a source of my site based on jekyll
[18:45:55] DoctorMonocular: yeah I see all that, but I don't see anything like a plugin directory where custom code could go, so I'm not sure what I'm supposed to be looking at
[18:46:13] Rodya_: has joined #RubyOnRails
[18:46:18] fox_mulder_cp: DoctorMonocular: i don't use a plugins
[18:46:25] DoctorMonocular: I want to believe, mulder!
[18:47:45] Oliphaunte: has joined #RubyOnRails
[18:52:05] SteenJobs: hey all - when using resque-scheduler, how do i make sure my workers are always running? will they continue running on their own once started?
[18:52:21] kies: has joined #RubyOnRails
[18:52:34] ekinmur: has joined #RubyOnRails
[18:52:55] l4v2: has joined #RubyOnRails
[18:54:09] sergey_makagon: has joined #RubyOnRails
[18:55:15] tvon: has joined #RubyOnRails
[18:55:31] bronson: has joined #RubyOnRails
[18:56:03] moeabdol1: has joined #RubyOnRails
[18:56:40] bryanculver: has joined #RubyOnRails
[18:58:27] yfeldblum: has joined #RubyOnRails
[18:59:52] moeabdol2: has joined #RubyOnRails
[19:04:31] eljimmy: has joined #RubyOnRails
[19:07:24] dopamean_: has joined #RubyOnRails
[19:07:26] barhum2013: has joined #RubyOnRails
[19:09:02] lirin: has joined #RubyOnRails
[19:09:38] jheathco: has joined #RubyOnRails
[19:10:38] SteenJobs: anyone recommend god vs monit for monitoring resque?
[19:10:47] Dimik: has joined #RubyOnRails
[19:12:36] Oliphaunte: has joined #RubyOnRails
[19:13:28] claypo: has joined #RubyOnRails
[19:15:58] arup_r: has joined #RubyOnRails
[19:16:24] jtong: has joined #RubyOnRails
[19:16:46] manfrin: has joined #RubyOnRails
[19:19:58] funrep: has joined #RubyOnRails
[19:20:02] funrep: hi, how do i define a variable in my controller so that its available in code blocks in the view? (rails 5.0)
[19:21:21] arup_r: funrep: using instance variable like @people = Person.all
[19:21:36] Moeh: has joined #RubyOnRails
[19:21:44] dionysus69: has joined #RubyOnRails
[19:21:50] funrep: hmm but i get error when doing it that way, maybe im just using environment variables wrong
[19:22:17] funrep: okey you are right, i do use the variables correctly its just that what it contains is nil
[19:22:59] funrep: ehm ENV['GMAPS_KEY'] returns the correct value in 'rails console' but when i run 'rails server' i get error it returns nil :s
[19:23:30] Rodya_: has joined #RubyOnRails
[19:23:51] Moeh: Hey guys, I am trying to render my errors as JSONAPI compliant object like described here: https://github.com/rails-api/active_model_serializers/pull/1004 However, when I use "render json: @user, status: :unprocessable_entity, adapter: :json_api, serializer: ActiveModel::Serializer::ErrorSerializer" I get the error "NoMethodError (undefined method `errors' for #<ActiveModel::Errors:0x007f9664c23858>)". But when I use the debugger, I
[19:23:51] Moeh: can see that @user.errors is filled by rails. Can someone give me a pointer what I am doing wrong?
[19:26:49] funrep: how do i make rails server access ENV correctly like it does in console?
[19:27:07] amperry: has joined #RubyOnRails
[19:27:08] funrep: ie ENV['GMAPS_API'] returns string in console, but when same command is ran in the webapp it returns nil
[19:27:33] davidklsn: has joined #RubyOnRails
[19:27:34] arup_r: funrep: you should have access both places, it is strange you don't have. Are you in development environment ?
[19:27:54] funrep: yes i run rails s and rails c from the same terminal
[19:28:09] arup_r: ok :( amazing! dunno ..
[19:28:24] arup_r: Are you sure that ENV is nil ?
[19:28:34] Moeh: Okay, this is stupid. The line has to be "render json: @user, status: :unprocessable_entity, adapter: :json_api, serializer: ActiveModel::Serializer::ErrorSerializer" instead of "render json: @user.errors, status: :unprocessable_entity, adapter: :json_api, serializer: ActiveModel::Serializer::ErrorSerializer"
[19:28:41] arup_r: I mean no typo etc
[19:30:02] amperry: has joined #RubyOnRails
[19:31:33] amperry: anyone know much about prawn and prawn-table?
[19:32:19] hahuang61: has joined #RubyOnRails
[19:32:41] amperry: I suspect I have a really basic question about embedded tables here: https://gist.github.com/amp108/3f39417c311e3192b6134827ae09a6d8
[19:33:25] arup_r: funrep: any success ?
[19:33:30] SteenJobs: does anyone use capistrano-resque? setting “set workers:” in my deploy.rb isn’t working
[19:33:38] SteenJobs: meaning the workers aren’t started on deploy
[19:34:50] pLaTo0n: has joined #RubyOnRails
[19:36:46] Rodya_: has joined #RubyOnRails
[19:37:10] funrep: arup_r: cant really find what's wrong, i guess i have to use something else than environment variables
[19:37:54] l4v2: has joined #RubyOnRails
[19:39:22] funrep: arup_r: found it! it was something wrong with the string concatenation, not the environment variable
[19:39:40] dionysus70: has joined #RubyOnRails
[19:41:37] flashpoint9: has joined #RubyOnRails
[19:45:10] mikecmpbll: has joined #RubyOnRails
[19:48:07] dminuoso: has joined #RubyOnRails
[19:49:39] solars: has joined #RubyOnRails
[19:56:45] travismathis: has joined #RubyOnRails
[19:58:44] Axsuul: has joined #RubyOnRails
[19:58:46] DoctorMonocular: has joined #RubyOnRails
[20:08:42] asianMike: has joined #RubyOnRails
[20:10:13] SteenJobs: anyone have an upstart conf file they can share for god?
[20:11:59] bungoman: has joined #RubyOnRails
[20:13:30] _djbkd: has joined #RubyOnRails
[20:14:32] amperry: ah, ne'ermind, I think I've got it
[20:18:00] dionysus69: has joined #RubyOnRails
[20:18:01] jtong: has joined #RubyOnRails
[20:21:54] ghormoon: has joined #RubyOnRails
[20:25:35] veloutin: for some reason I don't understand, I get a double render on status with this: https://bpaste.net/show/33e88b537900
[20:27:25] veloutin: I see two "Redirect to" lines in there, does it mean it is the redirect that fails?
[20:29:39] Darmani: has joined #RubyOnRails
[20:29:40] sergey_makagon: has joined #RubyOnRails
[20:29:59] srinidhi: has joined #RubyOnRails
[20:30:04] arup_r: veloutin: add rails server log also with the error and request full trace
[20:32:08] draig: has joined #RubyOnRails
[20:33:16] veloutin: arup_r: https://bpaste.net/show/87e4fe0e061e
[20:33:18] clandry94: has joined #RubyOnRails
[20:33:48] pramsky: has joined #RubyOnRails
[20:36:21] arup_r: veloutin: can you change the action to something else, but not _status_
[20:36:53] Martyn: has joined #RubyOnRails
[20:37:07] arup_r: veloutin: or show some more code in the controller first.
[20:37:25] arup_r: right now status looks ok, but it is getting called 2 times
[20:37:31] veloutin: that's the whole controller
[20:38:19] veloutin: sure, I'll try something else than status
[20:38:31] arup_r: ok. change the name of the action and also adjust the root and other things and try again
[20:39:12] polishdub: has joined #RubyOnRails
[20:39:24] veloutin: arup_r: changing name from status to logged_in made it work
[20:39:36] veloutin: so... I suppose "status" is reserved then
[20:40:24] veloutin: thanks a lot
[20:41:29] arup_r: what do you mean?
[20:41:53] Oliphaunte: has joined #RubyOnRails
[20:45:43] bronson: has joined #RubyOnRails
[20:50:07] dminuoso: has joined #RubyOnRails
[20:53:13] polishdub: has joined #RubyOnRails
[20:53:48] hastur: has joined #RubyOnRails
[20:56:50] whathappens: has joined #RubyOnRails
[20:57:49] Ebok: has joined #RubyOnRails
[20:58:46] sumobob: has joined #RubyOnRails
[20:59:33] Oliphaunte: has joined #RubyOnRails
[21:01:46] Rodya_: has joined #RubyOnRails
[21:03:45] blackmesa: has joined #RubyOnRails
[21:05:51] amperry: has joined #RubyOnRails
[21:06:58] jheathco: has joined #RubyOnRails
[21:09:18] whathappens: has joined #RubyOnRails
[21:09:38] amperry: has joined #RubyOnRails
[21:10:29] Darmani: amperry: hello
[21:10:43] amperry: thought I'd solved it, but does anyone know a good, complete, worked-out example of using `prawn-table`? I'm having a bear of a time getting an embedded table to work.
[21:10:48] mrgreenfur: has joined #RubyOnRails
[21:14:00] Devalo: has joined #RubyOnRails
[21:14:12] claypo: has joined #RubyOnRails
[21:15:48] AndrewIsHere: has joined #RubyOnRails
[21:16:12] FCser: has joined #RubyOnRails
[21:16:37] xall: has joined #RubyOnRails
[21:16:59] OxADD1DEAD: has joined #RubyOnRails
[21:17:32] mrgreenfur: hi everyone! im using active admin with the default namespace of ‘/admin/modelname’. When it draws the edit forms it tries to submit the updates via PATCH to /admin/modelname, but I don’t have routes like that. Do most folks add their own /admin routes?
[21:19:28] lizard2010: mrgreenfur, rails generate active_admin:resource [MyModelName] ?
[21:19:47] jtong: has joined #RubyOnRails
[21:22:49] hastur: lizard2010, you helped me last night, thank you!1
[21:23:59] amperry: specifically, I'm trying to figure out how to create a sub-table with two rows, the first of which has what the html equivalent for which would be a colspan=3
[21:24:06] hastur: i have a new question, i'm trying to follow this guide http://www.korenlc.com/creating-a-simple-search-in-rails-4/, and instead of self.search returning all posts that have `search` in name OR content, it's only returning ones with `search` in content---ie, the last where() in the method.
[21:24:45] hastur: how would i write self.search to get all posts that have `search` in name OR content?
[21:25:13] Oliphaunte: has joined #RubyOnRails
[21:26:09] Darmani: Whenever I try to add a lineitem to my variant I keep getting this error and I'm not sure why. I have the migrations and models in a gist could someone take a look?
[21:26:10] Darmani: https://gist.github.com/mfifth/73d355ce9b9db1af27fee5ca84b3eb3c
[21:26:57] hastur: ah it might have to be... collecting them one by one and returning as a big list..... hmm
[21:34:27] rafaelflores: has joined #RubyOnRails
[21:34:38] hahuang61: has joined #RubyOnRails
[21:34:41] Dreamer3: has joined #RubyOnRails
[21:35:04] bruce_lee: has joined #RubyOnRails
[21:35:04] bruce_lee: has joined #RubyOnRails
[21:35:15] mrgreenfur: lizard2010: will try again, ty
[21:36:20] wd40s: has joined #RubyOnRails
[21:36:42] weaksauce: has joined #RubyOnRails
[21:38:20] banisterfiend: has joined #RubyOnRails
[21:39:57] alfiemax: has joined #RubyOnRails
[21:41:30] barhum2013: has joined #RubyOnRails
[21:42:15] mrgreenfur: lizard2010: that generates app/admin/publisher.rb which I have. It doesn’t seem to fix the routes problem of it posting to /admin/publisher instead of /publisher. Should I just add a namespaced route?
[21:46:16] AndrewIsHere: has joined #RubyOnRails
[21:48:52] amperry: anyone here versed with prawn and prawn-table?
[21:50:54] dminuoso: has joined #RubyOnRails
[21:55:50] c355E3B: has joined #RubyOnRails
[21:56:59] amperry: more fundamental question: I include 'gem "prawn-table"' in my Gemfile, run 'bundle install', see the line 'Using prawn-table 0.2.2', but when I try to require it in the console, I get:
[21:57:00] amperry: LoadError: cannot load such file -- Prawn::Table
[21:57:01] amperry: from /var/lib/gems/2.3.0/gems/activesupport- `require'
[21:57:42] amperry: am I require-ing incorrectly?
[22:00:29] S1kx: has joined #RubyOnRails
[22:00:33] barhum2013: has joined #RubyOnRails
[22:00:52] mrgreenfur: has left #RubyOnRails: ()
[22:04:48] siaW: has joined #RubyOnRails
[22:05:17] blackmesa: has joined #RubyOnRails
[22:06:51] meoblast001: has joined #RubyOnRails
[22:07:24] siaW: hello i need help. i am using react-rails gem currently my url that points to users.json returen something like this
[22:07:25] siaW: https://gist.github.com/siaw23/1ee63f0db8e7964761e1660d7f44296d
[22:07:31] siaW: is this normal?
[22:08:06] siaW: i can see some records from my db in that file but the formatting has some strange “&quot;” stuff that i don’t know how to handle
[22:11:48] eserror: has joined #RubyOnRails
[22:12:06] crystal77: has joined #RubyOnRails
[22:13:41] Devalo: has joined #RubyOnRails
[22:13:53] nettoweb: has joined #RubyOnRails
[22:15:23] FCser: has joined #RubyOnRails
[22:19:44] mrgreenfur: has joined #RubyOnRails
[22:20:31] Ebok: has joined #RubyOnRails
[22:22:40] Rodya_: has joined #RubyOnRails
[22:23:24] jtong: has joined #RubyOnRails
[22:25:22] Oliphaunte: has joined #RubyOnRails
[22:25:59] JamesGames: has joined #RubyOnRails
[22:26:15] JamesGames: https://gist.github.com/anonymous/d05767811296132eba5d312e900698f1 im trying to set a global in my controller
[22:26:24] amperry: I need to require the fully-qualified path to a file, in this case "/var/lib/gems/2.3.0/gems/prawn-table-0.2.2/lib/prawn/table.rb"; my "$:" doesn't include "/var/lib" anything. If necessary, I can add a path to $:, but in this case, I don't know what it would be.
[22:26:51] JamesGames: I tried $ but im still getting the nil class error
[22:29:21] JamesGames: any brave prodical have a crack at this?
[22:31:01] bronson: has joined #RubyOnRails
[22:33:08] Oliphaunte: has joined #RubyOnRails
[22:34:12] DoctorMonocular: has joined #RubyOnRails
[22:37:16] DoctorMonocular: has joined #RubyOnRails
[22:40:12] whathappens: has joined #RubyOnRails
[22:40:19] DoctorMo_: has joined #RubyOnRails
[22:42:17] twilling: has joined #RubyOnRails
[22:42:24] DoctorMonocular: has joined #RubyOnRails
[22:42:57] cd-rum: has joined #RubyOnRails
[22:43:22] whathappens: has joined #RubyOnRails
[22:44:18] JamesGames: anyone https://gist.github.com/anonymous/d05767811296132eba5d312e900698f1
[22:44:51] JamesGames: the room variable is available in the view but not in its own method???
[22:45:31] cd-rum_: has joined #RubyOnRails
[22:45:36] DoctorMonocular: has joined #RubyOnRails
[22:46:26] DoctorMonocular: has joined #RubyOnRails
[22:46:55] JamesGames: a yes the lost art of talking to yourself in public
[22:47:24] bronson: has joined #RubyOnRails
[22:47:26] JamesGames: anyone wanna tell me why a controller would not see a variable?
[22:47:36] DoctorMonocular: has joined #RubyOnRails
[22:48:20] havenwood: jamesgames: whitespace like that is known to cause disassociation and existential angst
[22:48:26] matthewd: jamesgames: Do not use global variables inside controllers
[22:48:48] havenwood: jamesgames: use plural variable names when there are more than one of a thing
[22:49:17] JamesGames: havenwood: matthewd : ok, but what then? i tried @ and @@ and [: ] variables
[22:49:19] havenwood: jamesgames: the convention is to use underscores_between_words with snake_case
[22:49:28] DoctorMonocular: has joined #RubyOnRails
[22:49:57] JamesGames: havenwood: ok, i think i get you. ill try that out
[22:50:42] DoctorMonocular: has joined #RubyOnRails
[22:50:58] arthurl: has joined #RubyOnRails
[22:51:06] twilling: has joined #RubyOnRails
[22:51:16] matthewd: jamesgames: You haven't described what you're trying to do, what you're expecting, nor what's going wrong.
[22:51:26] JamesGames: havenwood: I used @room_name. got no error but i got no output
[22:51:39] dminuoso: has joined #RubyOnRails
[22:51:50] JamesGames: matthewd: ok. excuse me. I m trying to update the arrays for a change of room
[22:52:09] JamesGames: i have item tables that would populate them
[22:52:31] DoctorMonocular: has joined #RubyOnRails
[22:52:45] JamesGames: matthewd: so equating to @room.name was my plan
[22:52:48] arthurl: hi guys- trying to bring up a rails app in production mode- appear to be having some trouble with the asset pipeline- i'm able to bring up the app in development mode without issue- but this is what i see in production: https://gist.github.com/alyssenko/886c83d353629d5d55d486039213cfeb
[22:52:52] xall: has joined #RubyOnRails
[22:53:05] arthurl: any thoughts or input would be much appreciated- been looking into this for the past 3 hours
[22:53:41] JamesGames: matthewd: u want i post the view?
[22:53:53] apotry: has joined #RubyOnRails
[22:54:41] matthewd: I have no idea what's going on
[22:54:44] JamesGames: matthewd: anyway the view has : window.roomitemarray = "<%=j @iteminroomdesc %> ";
[22:54:46] DoctorMonocular: has joined #RubyOnRails
[22:55:37] DoctorMo_: has joined #RubyOnRails
[22:55:45] JamesGames: matthewd: its an array of object descriptions that are in the room. it's a game where players interact w things in each room
[22:56:06] rafaelfranca: has joined #RubyOnRails
[22:56:38] JamesGames: but so far I've only been able to pull desciptions of the objects I have or without setting the "room" variable
[22:56:46] DoctorMonocular: has joined #RubyOnRails
[22:56:58] jstransky: has joined #RubyOnRails
[22:57:00] JamesGames: matthewd: u c?
[22:57:38] DoctorMonocular: has joined #RubyOnRails
[22:58:35] DoctorMo_: has joined #RubyOnRails
[22:58:50] qejk: has joined #RubyOnRails
[22:58:58] yfeldblum: has joined #RubyOnRails
[22:59:02] SteenJobs: has joined #RubyOnRails
[22:59:36] DoctorMonocular: has joined #RubyOnRails
[23:00:38] DoctorMo_: has joined #RubyOnRails
[23:01:03] JamesGames: matthewd: here's a better gist : https://gist.github.com/anonymous/60a422ad3ce421037dbfc209b6bde5b5
[23:01:43] DoctorMonocular: has joined #RubyOnRails
[23:01:48] Oliphaunte: has joined #RubyOnRails
[23:02:05] JamesGames: basically I need the name of the room to find the items in it, but it doesn't see @room
[23:03:10] JamesGames: matthewd: what u reckon?
[23:04:49] DoctorMo_: has joined #RubyOnRails
[23:05:47] DoctorMonocular: has joined #RubyOnRails
[23:06:52] DoctorMo_: has joined #RubyOnRails
[23:07:43] DoctorMonocular: has joined #RubyOnRails
[23:08:46] DoctorMo_: has joined #RubyOnRails
[23:08:47] JamesGames: a n y o n e ?
[23:09:38] manfrin: has joined #RubyOnRails
[23:10:15] flashpoint9: has joined #RubyOnRails
[23:10:29] JamesGames: hey flashpoint9 !!
[23:10:48] DoctorMonocular: has joined #RubyOnRails
[23:11:57] DoctorMonocular: has joined #RubyOnRails
[23:12:47] DoctorMonocular: has joined #RubyOnRails
[23:13:46] flashpoint9: jamesgames: hey :)
[23:14:46] flashpoint9: semi busy yea, doing research on stocks and the market
[23:14:53] DoctorMonocular: has joined #RubyOnRails
[23:15:32] Oliphaunte: has joined #RubyOnRails
[23:15:52] DoctorMonocular: has joined #RubyOnRails
[23:17:11] beingjohnm: Stumbling on something. Users create an account at a subdomain usercompany.myapp.com. After the user is created I want to assocate them with usercompany.id. However I cannot pass any variables using after_create in user.rb. I feel like I'm missing something here. Using Devise if that matters.
[23:17:33] JamesGames: i wanna call a value in my controller https://gist.github.com/anonymous/60a422ad3ce421037dbfc209b6bde5b5
[23:17:50] DoctorMonocular: has joined #RubyOnRails
[23:18:24] Robtop__: has joined #RubyOnRails
[23:18:28] amperry: has joined #RubyOnRails
[23:18:49] DoctorMonocular: has joined #RubyOnRails
[23:19:41] eserror: has left #RubyOnRails: ()
[23:19:52] DoctorMonocular: has joined #RubyOnRails
[23:20:20] amperry: anyone know where to find better documentation for Prawn::Table than the pdf at http://prawnpdf.org/prawn-table-manual.pdf ?
[23:20:35] flashpoint9: jamesgames: what do you mean exactly?
[23:20:49] DoctorMonocular: has joined #RubyOnRails
[23:21:22] JamesGames: has joined #RubyOnRails
[23:21:36] JamesGames: sorry was offline there. i miss anything?
[23:21:43] whathappens: has joined #RubyOnRails
[23:22:03] DoctorMonocular: has joined #RubyOnRails
[23:22:50] amperry: myself, I was asking if there's better docs than the one at http://prawnpdf.org/prawn-table-manual.pdf for Prawn::Table
[23:22:56] DoctorMonocular: has joined #RubyOnRails
[23:23:54] DoctorMo_: has joined #RubyOnRails
[23:24:01] nettoweb: has joined #RubyOnRails
[23:24:17] JamesGames: flashpoint9: u there meng?
[23:24:18] leea: has joined #RubyOnRails
[23:24:53] DoctorMonocular: has joined #RubyOnRails
[23:24:54] jtong: has joined #RubyOnRails
[23:25:43] JamesGames: https://gist.github.com/anonymous/60a422ad3ce421037dbfc209b6bde5b5
[23:26:07] DoctorMonocular: has joined #RubyOnRails
[23:27:55] DoctorMo_: has joined #RubyOnRails
[23:28:34] JamesGames: a nnnnnnnn y o n e ?
[23:28:53] DoctorMonocular: has joined #RubyOnRails
[23:29:08] amperry: jamesgames: don't want you to think no-one cares, I just can't help you :(
[23:29:44] JamesGames: fair enough. Thanks
[23:29:54] DoctorMonocular: has joined #RubyOnRails
[23:30:08] asianMike: has left #RubyOnRails: ()
[23:30:10] JamesGames: anyone else feel rails is claustrophobic and unintuitive?
[23:31:28] amperry: difficult when you're not dealing with the basic use cases, yes, but not necessarily claustrophobic nor less intuitive than any other framework
[23:32:08] JamesGames: every time I try something, either people say straight out - don't do that!, or it's a weird little trick
[23:32:31] JamesGames: u can't be creative is what im saying
[23:33:34] beingjohnm: jamesgames: I have my own issue I'm working on but I don't think this line is going to work: @room = Room.find_by_name(current_user)
[23:34:03] JamesGames: beingjohnm: but it does!
[23:34:11] Oliphaunte: has joined #RubyOnRails
[23:34:31] JamesGames: i get the room variable. just not the objects in the room. beingjohnm: u no?
[23:38:51] beingjohnm: jamesgames: I would have thought you would do: @room = Room.find_by_name(current_user.room_name)
[23:41:55] quazimodo: has joined #RubyOnRails
[23:41:57] quazimod1: has joined #RubyOnRails
[23:42:07] JamesGames: beingjohnm: your right . its wrong in the gist. not my file tho
[23:43:09] flashpoint9: has joined #RubyOnRails
[23:43:27] JamesGames: wait, no. its wrong in both!!
[23:43:55] ur5us: has joined #RubyOnRails
[23:44:32] benlieb: has joined #RubyOnRails
[23:46:20] claypo: has joined #RubyOnRails
[23:46:50] amperry: but I repeat: anyone in the house good with Prawn?
[23:47:31] lalalaaa: has joined #RubyOnRails
[23:47:58] beingjohnm: amperry: sorry, no. I've used thinreports which is based on prawn but not prawn directly
[23:47:58] JamesGames: whoops. now i feel foolish
[23:48:04] JamesGames: thaanks beingjohnm
[23:48:25] beingjohnm: jamesgames: I often feel that way myself in this channel
[23:48:36] lalalaaa: can't we just use html
[23:49:25] JamesGames: lalalaaa: in a perfect world
[23:49:39] lalalaaa: i love indesign but it's just so badly designed
[23:49:44] lalalaaa: jamesgames: true that
[23:49:54] amperry: beingjohnm: I'm so frustrated with prawn and prawn-tables, I'll look at something else; my chief issue is printing tablesto pdf. Should I look at thinreports?
[23:50:21] Rodya_: has joined #RubyOnRails
[23:51:03] lalalaaa: maybe use paperjs i don't know
[23:51:09] uranther: has joined #RubyOnRails
[23:51:17] lalalaaa: all i ever needed was http://motherfuckingwebsite.com (no pun intended)
[23:51:36] Oliphaunte: has joined #RubyOnRails
[23:52:24] dminuoso: has joined #RubyOnRails
[23:54:18] coder: has joined #RubyOnRails
[23:57:03] dalbuschat: has joined #RubyOnRails
[23:57:37] benlieb: has joined #RubyOnRails
[23:57:55] oystersauce8: has joined #RubyOnRails
[23:58:23] flashpoint9: has joined #RubyOnRails
[23:59:52] weaksauce: has joined #RubyOnRails