wpp

Activity Graph

Page 1 of 4 | Next »

2016-05-25

[11:41:00] wpp: has joined #RubyOnRails
[11:41:00] wpp: has joined #ruby
[12:10:06] wpp: Quit: Textual IRC Client: www.textualapp.com

2016-05-11

[11:57:01] wpp: has joined #RubyOnRails
[11:57:01] wpp: has joined #ruby
[12:01:28] wpp: Client Quit

2015-12-04

[10:58:47] wpp: has joined #RubyOnRails
[10:58:47] wpp: has joined #ruby
[11:10:13] wpp: Hello everyone and happy friday. I'm setting up a rails enviornment for staging and ran into the following issue. I bundle installed --without test and set the RAILS_ENV variable to 'staging'. However when I try and invoke the rails console I get "missing" gem minitest.
[11:10:16] wpp: minitest is listed in the test: group in my Gemfile.
[11:10:40] wpp: Is it required for other enviornments as well?
[15:09:25] wpp: Quit: ZZZzzz???
[18:45:55] wpp: has joined #RubyOnRails
[18:45:55] wpp: has joined #ruby
[20:30:40] wpp: Quit: ZZZzzz???
[20:36:21] wpp: has joined #RubyOnRails
[20:36:21] wpp: has joined #ruby
[20:39:22] wpp: Client Quit
[21:24:50] wpp: has joined #ruby
[21:24:51] wpp: has joined #RubyOnRails
[21:29:27] wpp: Ping timeout: 260 seconds

2015-11-26

[09:12:51] wpp: has joined #RubyOnRails
[09:12:51] wpp: has joined #ruby
[11:56:56] wpp: Quit: Textual IRC Client: www.textualapp.com

2015-11-25

[15:46:19] wpp: has joined #RubyOnRails
[15:46:19] wpp: has joined #ruby
[17:00:51] wpp: Quit: ZZZzzz???

2015-11-23

[14:23:33] wpp: has joined #RubyOnRails
[14:23:33] wpp: has joined #ruby
[14:24:50] wpp: hi everyone, I'm using the ancestry gem and have a tree A (root) -> B-> C. When I call C.ancestors, I only get B (missing root).
[14:25:40] wpp: If I list C.ancestor_ids I see the id of root, but I cannot find it? Model.find(root_id) returns null and Model.find_by(id: root_id) same result.
[14:27:51] wpp: draken so all class methods are changed by ancestry?
[14:28:00] wpp: (thanks for info btw)
[14:31:03] wpp: C.root returns A, I'm so confused now
[14:35:09] wpp: no I'm expecting C.ancestors to return A as well.
[14:36:28] wpp: rvanlieshout not specificly. docs say "Scopes the model on ancestors of the record", but "ancestor_ids" Returns a list of ancestor ids, starting with the root id and ending with the parent id
[14:36:50] wpp: So I assumed the ancestors would include the root id too.
[14:38:24] wpp: rvanlieshout !fake?
[14:38:46] wpp: Ah sry I'll post a gist.
[14:45:59] wpp: rvanlieshout https://gist.github.com/wpp/3c0fc8352a1470aee83d thanks for taking a look!
[14:47:14] wpp: rvanlieshout "Ancestry" https://github.com/stefankroes/ancestry
[14:47:47] wpp: rvanlieshout ahh updated gist
[14:49:13] wpp: rvanlieshout [385153371, 424152953]
[14:50:15] wpp: rvanlieshout rather verbose I updated the gist
[14:53:24] wpp: rvanlieshout added comment with screenshot. seems to be correct (385153371) for root
[14:57:11] wpp: Same result
[16:30:03] wpp: Quit: Textual IRC Client: www.textualapp.com

2015-11-04

[09:43:21] wpp: has joined #ruby
[09:43:22] wpp: has joined #RubyOnRails
[09:45:45] wpp: Hello! I'm having a situation where @node.update_attributes({ parent: "nonsense" }) could be submitted to a controller. Currently this raises RecordNotFound (nonsense cannot be found), is there a way to have it fail "silently" so I can return the error message in the response? I'd like to avoid rescue though. Thanks
[09:48:05] wpp: Ah I guess nvm this might not be a general case at all. I'm using the ancestry gem and it uses find (as oppossed to find_by or sth) in all cases.
[12:46:41] wpp: Quit: Textual IRC Client: www.textualapp.com

2015-10-22

[07:16:20] wpp: has joined #RubyOnRails
[07:16:20] wpp: has joined #ruby
[10:35:05] wpp: Quit: Textual IRC Client: www.textualapp.com

2015-10-21

[11:39:53] wpp: has joined #RubyOnRails
[11:39:53] wpp: has joined #ruby
[11:43:37] wpp: Hi, I'm trying to run delayed_job under supervisord, since programs meant to be run under supervisor should not daemonize themselves I've switched from delayed_job start to delayed_job run
[11:43:55] wpp: the problem however is that I cannot start multiple runners (there is already one or more instance(s) of the program running)
[12:28:23] wpp: Ping timeout: 246 seconds
[13:14:16] wpp: has joined #RubyOnRails
[13:14:16] wpp: has joined #ruby
[16:13:27] wpp: Quit: ZZZzzz???
[17:13:26] wpp: has joined #ruby
[17:13:27] wpp: has joined #RubyOnRails
[23:06:58] wpp: Quit: ZZZzzz???

2015-10-19

[08:40:59] wpp: has joined #RubyOnRails
[08:40:59] wpp: has joined #ruby
[08:47:45] wpp: trosborn It is probably a better idea to have it similar to production data
[08:49:36] wpp: trosborn perhaps they were just using weird data for testing edge cases in the code?
[08:59:57] wpp: Hello, does someone here have experience with rbtrace and debugging memory leaks? I'm following http://samsaffron.com/archive/2015/03/31/debugging-memory-leaks-in-ruby and I'm trying to make a unicorn worker dump its heap. But I keep getting "timed out waiting for eval response"
[09:07:31] wpp: ok looks like there is a --timeout argument but that is only available on rbtrace master (not in 0.4.7)
[11:23:49] wpp: I hope this is not the worst question in the world, but could someone explain to me what the Garbage collector inside an MRI process is? Everything I read about the GC is just referring to it as "the GC".
[11:24:59] wpp: As in is the GC a process-wide construct or is it shared between multiple ps?
[11:25:12] wpp: jhass yes
[11:25:34] wpp: jhass c
[11:26:22] wpp: jhass yep
[11:27:07] wpp: jhass uhh I should have prefaced, I get what the gc is doing
[11:27:23] wpp: jhass I'm just wondering what exactly it is?
[11:30:04] wpp: jhass ok so it is per process right? Every mri/rails c/ruby xyz has its own GC?
[11:30:43] wpp: jhass Ok so how come when I start a new irb session and run GC.count is already at 28?
[11:31:20] wpp: jhass aah so just starting irb session triggers 28 GC runs
[11:32:18] wpp: jhass Oh boy haha I was wondering howcome its is so high, how can I find out when the GC is invoked?
[11:32:26] wpp: jhass (thanks for explaining this to me btw)
[11:33:04] wpp: shevy actually a while back, but never dealt with GC. howcome?
[11:33:47] wpp: shevy yes?
[11:34:45] wpp: wpp ok. can I just bother you a bit longer?
[11:34:58] wpp: jhass ok. can I just bother you a bit longer?
[11:35:05] wpp: (I'm an idiot)
[11:36:36] wpp: So I'm actually debugging a memory leak and ran into this post http://samsaffron.com/archive/2015/03/31/debugging-memory-leaks-in-ruby, the author recommends running a gem called rb_trace which takes a memory dump of a running process
[11:36:47] wpp: * heap dump
[11:37:34] wpp: With that heap dump you can have a look at GC generation and object count over the liftime of the process
[11:38:26] wpp: The author has at least 22 GC generations in his dump, BUT when I have a look at mine I only get generation 0.
[11:38:36] wpp: And the dump is always around the 90m mark
[11:40:37] wpp: jhass 2.2.3p173
[11:42:04] wpp: jhass I will, could you just explain how you come to the conclusion that every single thing is still referenced?
[11:42:22] wpp: could just be that the gem only dumps the first generation?
[11:42:52] wpp: jhass ah ok
[11:44:20] wpp: jhass thanks for that!
[11:44:41] wpp: shevy manveru servus :) where exactly?
[14:05:08] wpp: Quit: ZZZzzz???
[14:07:02] wpp: has joined #RubyOnRails
[14:07:02] wpp: has joined #ruby
[16:10:31] wpp: Quit: ZZZzzz???

2015-10-16

[08:18:00] wpp: has joined #ruby
[08:18:01] wpp: has joined #RubyOnRails
[14:43:27] wpp: Quit: ZZZzzz???
[16:20:25] wpp: has joined #RubyOnRails
[16:20:25] wpp: has joined #ruby
[16:39:54] wpp: Quit: ZZZzzz???
[20:30:48] wpp: has joined #RubyOnRails
[20:30:48] wpp: has joined #ruby
[22:21:54] wpp: Read error: Connection reset by peer

2015-10-15

[09:31:42] wpp: has joined #RubyOnRails
[09:31:42] wpp: has joined #ruby
[09:37:46] wpp: Hello I'm using Redis for storing caching fragments. Now I'd like retrieve these KEYS but I don't know which pattern I could use. Does someone happen to know if the fragment keys are stored in a particular way? "rails-fragment-xzy"
[09:38:33] wpp: Ah got it, nvm
[14:01:23] wpp: Ping timeout: 256 seconds

2015-10-14

[07:27:02] wpp: has joined #ruby
[07:27:03] wpp: has joined #RubyOnRails
[08:41:02] wpp: Ping timeout: 260 seconds
[13:34:33] wpp: has joined #RubyOnRails
[13:34:33] wpp: has joined #ruby
[14:14:07] wpp: Hello, anyone know how action cable client support for native clients would look like?
[14:42:11] wpp: kitsuneyo were you referring to my question? I'm sorry, I'm looking to add "real-time" capabilities to an existing rails project and got pointed towards ActionCable. I understand that the project is still in Alpha but was wondering wether someone in #rails might have more insights.
[14:42:52] wpp: kitsuneyo because the Readme only shows a javascript client, I was wondering how native client support would look like.
[14:44:16] wpp: tubbo no I didn't
[14:47:07] wpp: tubbo yeah my connection is flakey at times. Sorry about that. so on client side you would open tcp/tls socket as opposed to wss and you'd be on your own?
[14:49:02] wpp: kitsuneyo no no thanks for pointing out, I was lazy should have taken some time
[14:50:50] wpp: tubbo is there a way to merge them with existing rails apps? Or would you have to start fresh with elixir?
[14:59:56] wpp: tubbo thanks for your tips!
[16:04:04] wpp: Quit: ZZZzzz???

2015-10-13

[21:26:07] wpp: has joined #RubyOnRails
[21:26:07] wpp: has joined #ruby
[21:34:01] wpp: hi does someone know if actioncable is only going to support clients via javascript?
[21:34:29] wpp: or will there be native counterparts for android/ios?
[21:38:19] wpp: Quit: ZZZzzz???
[21:40:38] wpp: has joined #RubyOnRails
[21:40:38] wpp: has joined #ruby
[22:43:09] wpp: Quit: ZZZzzz???

2015-10-12

[07:42:16] wpp: has joined #RubyOnRails
[07:42:16] wpp: has joined #ruby
[11:10:26] wpp: Quit: ZZZzzz???
[11:12:59] wpp: has joined #RubyOnRails
[11:12:59] wpp: has joined #ruby
[12:41:55] wpp: Quit: Textual IRC Client: www.textualapp.com

2015-10-06

[09:30:47] wpp: has joined #RubyOnRails
[09:30:47] wpp: has joined #ruby
[12:35:22] wpp: Quit: ZZZzzz???
[12:35:53] wpp: has joined #RubyOnRails
[12:35:53] wpp: has joined #ruby
[12:42:27] wpp: Quit: ZZZzzz???
[12:46:22] wpp: has joined #RubyOnRails
[12:46:22] wpp: has joined #ruby
[13:19:04] wpp: Ping timeout: 260 seconds
[14:12:16] wpp: has joined #ruby
[14:12:17] wpp: has joined #RubyOnRails
[14:13:35] wpp: Hello, have the performance tests (generators etc) mentioned here http://guides.rubyonrails.org/v3.2.13/performance_testing.html been deprecated in Rails 4?
[14:14:37] wpp: Does someone have a alternative for perf testing? (esp. controller actions?)
[15:31:33] wpp: Quit: Textual IRC Client: www.textualapp.com

2015-10-02

[12:47:59] wpp: has joined #RubyOnRails
[12:47:59] wpp: has joined #ruby
[12:49:40] wpp: Helo everybody. I'm using paperclip and would like to know if I can set a filename (overwrite the original filename). I found this link but it's from 2009 (https://trevorturk.wordpress.com/2009/03/22/randomize-filename-in-paperclip/)
[12:51:24] wpp: What about monkeypatching this method? https://github.com/thoughtbot/paperclip/blob/7a085d300e510c4fda076e1a77e59ceabad7e2cf/lib/paperclip/attachment.rb#L594
[12:51:40] wpp: and just return "default.png"? Is that a bad idea?
[13:58:27] wpp: Quit: ZZZzzz???
[17:17:09] wpp: has joined #RubyOnRails
[17:17:09] wpp: has joined #ruby

2015-09-23

[13:31:32] wpp: has joined #RubyOnRails
[13:31:32] wpp: has joined #ruby
[16:01:47] wpp: Quit: ZZZzzz???
[16:50:11] wpp: has joined #RubyOnRails
[16:50:11] wpp: has joined #ruby
[16:50:42] wpp: Client Quit
[16:51:11] wpp: has joined #RubyOnRails
[16:51:11] wpp: has joined #ruby
[17:24:40] wpp: Quit: ZZZzzz???
[17:26:38] wpp: has joined #ruby
[17:26:39] wpp: has joined #RubyOnRails

2015-09-21

[07:19:43] wpp: has joined #ruby
[07:19:44] wpp: has joined #RubyOnRails
[14:40:23] wpp: has joined #RubyOnRails
[14:40:23] wpp: has joined #ruby
[14:50:31] wpp: Hi, I have a bit of a rough time coming up with a good model/associations for the following situation. I have 3 models witch all have images (one or more) associated with them. I've made a asci diagram here https://gist.github.com/wpp/2accc36efc10c8f8ca96
[14:51:12] wpp: if someone more experienced could point out a better way of doing this I would appreciate the feedback
[14:52:31] wpp: the main issue is that the a Note can have multiple images of a different "type" (i.e. a banner and an icon)
[14:53:31] wpp: USvER hi how do you handle that more than one type of image can exist in my Note example?
[14:54:26] wpp: tubbo the storage backend is custom. no paperclip or something like that
[14:57:06] wpp: tubbo the attachment model is something I added because I fear that in the future, Notes or Messages might have multiple images...does that make sense?
[15:01:08] wpp: USvER im just wondering how I could differentiate between note.banner and note.icon (not worrying about backend) on rails side? Do I have to introduce something like "subtype" for the Attachment class?
[15:02:59] wpp: USvER come again?
[15:03:58] wpp: tubbo ahh :) yes the subtype is not a great solution, do you have one?
[15:04:16] wpp: USvER no worries all ideas welcome :)
[15:10:31] wpp: tubbo that makes a lot of sense. it feels cleaner and probably less fighting with rails. Once I'm faced with multiple images I could introduce a association like "Gallery"
[15:14:05] wpp: USvER thanks for the suggestion. So "Asset" would be my "Image". I would then have a user.assets right so in order to get user.avatar I'd have to write a custom avatar/banner/icon method...
[15:14:34] wpp: tubbo & USvER btw thanks a lot for the feedback!
[15:21:39] wpp: USvER yep, so as opposed to my original thing you'd move the "type" to Asset/Image but other than that I'd be pretty much the same? Or did I miss something?
[15:25:53] wpp: USvER Ahh I missed :as in your suggestion I thought it was :through (holders)
[15:28:14] wpp: Quit: ZZZzzz???
[16:31:39] wpp: has joined #RubyOnRails
[16:31:39] wpp: has joined #ruby
[16:32:07] wpp: Client Quit

2015-09-11

[08:54:31] wpp: has joined #RubyOnRails
[08:54:31] wpp: has joined #ruby
[11:53:07] wpp: has joined #ruby
[11:53:08] wpp: has joined #RubyOnRails
[13:44:37] wpp: Quit: ZZZzzz???
[14:21:36] wpp: has joined #ruby
[14:21:37] wpp: has joined #RubyOnRails
[14:26:02] wpp: Ping timeout: 246 seconds

2015-09-08

[09:23:55] wpp: has joined #RubyOnRails
[09:25:08] wpp: Hi, is there a way to compile assets without having a database connection? I'm trying to run rake assets:precompile on a machine which will not be running the application and therefore does not have a database set up.
[09:25:43] wpp: As far as I understand there was an option for that in Rails < 4, (config.initialize_on_precompile) which has been removed in Rails 4.
[10:36:49] wpp: no_parachute I think you should just go for it
[10:36:55] wpp: ask away
[10:40:04] wpp: no_parachute you should post your code on gist.github.com
[10:41:18] wpp: psteyn not sure if I'm misunderstanding but what about a method? class UserTimeCheck; def hours puts "blabla" end end
[10:55:06] wpp: no_parachute just chiming in here, I'm not sure where what belongs in what controller, but keep in mind that Category.new (or Anything.new) will only instantiate an object, it will not save it to the database.
[10:56:42] wpp: no_parachute when objects need to be saved to the database (often called "persisted") have a look at http://api.rubyonrails.org/classes/ActiveRecord/Persistence.html
[11:01:04] wpp: FailBit no_parachute arent you supposed to add params.require(:post).permit(:category)
[11:01:30] wpp: and add what workmad3
[11:01:50] wpp: no_parachute in posts_controller
[11:03:57] wpp: no_parachute you can just update it
[11:07:46] wpp: no_parachute yeah if you look in your posts_controller you have Category.create(post_params[:category])
[11:08:17] wpp: no_parachute but post_params looks like params.require(:post).permit(:title, :content)
[11:08:35] wpp: no_parachute it is missing the category, that is what workmad3 and I mentioned earlier
[11:09:10] wpp: no_parachute do you have a server running in your terminal?
[11:10:18] wpp: no_parachute before you change the code to workmad3 have a look at the request when you submit the form
[11:10:35] wpp: no_parachute I have a feeling that will help you out in the future
[11:12:44] wpp: workmad3 I agree
[11:13:10] wpp: workmad3 btw have you seen my question asset compilation?
[11:15:35] wpp: Radar "In Rails 4.x this option has been removed and is no longer needed."
[11:16:32] wpp: Radar np I'll keep looking
[11:19:18] wpp: workmad3 Radar Ahh yes looks like an initializer is causing it.
[11:20:05] wpp: Radar yep removing it skips connection establishment
[11:20:26] wpp: So I guess "In Rails 4.x this option has been removed and is no longer needed." is true :)
[15:15:25] wpp: Quit: ZZZzzz???
[15:19:56] wpp: has joined #RubyOnRails
[15:19:56] wpp: has joined #ruby
[15:43:21] wpp: Quit: ZZZzzz???
[16:39:50] wpp: has joined #RubyOnRails
[16:39:50] wpp: has joined #ruby
[17:08:23] wpp: Ping timeout: 265 seconds