VeryBewitching

Activity Graph

Page 1 of 21 | Next »

2019-05-31

[18:34:04] VeryBewitching: has joined #ruby
[21:53:37] VeryBewitching: Quit: Konversation terminated!

2019-02-01

[19:47:29] VeryBewitching: has joined #RubyOnRails
[19:51:43] VeryBewitching: I have a bug on a production server that I'm a bit baffled by, [gist: https://gist.github.com/bewitchingme/d184e17afa3598ec4d8b9c5e8535f3e4]; it seems to me it's having an issue finding the layout file, but I have one present for both HTML and plain text emails. Rails 5.1.1, can someone give me a hint?
[19:53:05] VeryBewitching: It should be noted that this behaviour is not consistent.
[21:37:45] VeryBewitching: Quit: Konversation terminated!

2018-11-15

[19:06:14] VeryBewitching: has joined #RubyOnRails
[19:06:47] VeryBewitching: Afternoon folks; can someone suggest a means with Rails 5 to convert a view to a PDF?
[19:07:03] VeryBewitching: I need to be able to support Chart.js charts in the view.
[21:21:40] VeryBewitching: Quit: Konversation terminated!

2018-10-06

[07:18:51] VeryBewitching: apeiros: Distill.
[07:18:56] VeryBewitching: Probably the best fit.
[08:08:22] VeryBewitching: No reindeer in your talk, I suppose Santa has a Fedex account?
[08:11:34] VeryBewitching: The Industrial North Pole: A Competitive Analysis of Shaped Wood in Sleigh Production
[08:12:13] VeryBewitching: Those are smart elves.
[08:12:47] VeryBewitching: I love the idea, it's easy to have fun with while still being productive.
[08:43:45] VeryBewitching: Quit: Konversation terminated!

2018-10-05

[22:14:01] VeryBewitching: has joined #ruby

2018-09-14

[18:14:02] VeryBewitching: has joined #ruby
[18:17:22] VeryBewitching: Hey folks, I'm trying to find a way to undefine a method in a module, not really getting anywhere; in a test environment I'd like the Service method redefined, how would I go about removing the original? https://gist.github.com/bewitchingme/3e7a75e05dc5a57641908c47567572c7
[18:17:55] VeryBewitching: Oddly, simply redefining it has no effect to the test, it simply uses the original definition
[18:18:41] VeryBewitching: I've tried undef_method and remove_method in the module, to no effect.
[18:29:41] VeryBewitching: resnik2: Ooh, imma try that, thanks :D
[18:30:43] VeryBewitching: resnik2: Nope, still complains it can't find the method.
[18:31:10] VeryBewitching: It's not an instance method of the module, it's a method on the module itself, I think that trips it up a bit
[18:31:26] VeryBewitching: def self.Service; end
[18:31:40] VeryBewitching: I'm trying to redefine that method for a test.
[18:31:50] VeryBewitching: So I'm not making calls to the target webservice, but to a mock
[18:32:14] VeryBewitching: Just redefining it has no effect, it continues to use the original in the app.
[18:32:31] VeryBewitching: So I was trying to remove the original and define it, not having much luck.
[18:35:30] VeryBewitching: It might be the order the files are being auto loaded; I'd considered that too
[18:36:46] VeryBewitching: resnik2: Thanks for your time :)
[20:23:08] VeryBewitching: Quit: Konversation terminated!

2018-07-09

[19:45:43] VeryBewitching: has joined #ruby
[19:46:20] VeryBewitching: has joined #RubyOnRails
[19:49:17] VeryBewitching: Hey folks, I have Postgres running with a Rails app (5.1) and Resque, and the resque queues seem to have issues leasing connections from the connection pool. I have summed the pool size for each resque worker and the rails app (nginx, 6 worker threads, 30 connections and resque 15 connections, 5 per worker) and I keep getting this from time to time: https://gist.github.com/bewitchingme/43c627d00fc2a7d156d4ff60151fb00f
[19:52:03] VeryBewitching: I have the connections in Postgres cranked up to more than twice what I think I need, but this still occurs. Can anyone provide some advice on how to tune Rails and Resque together with PG?
[19:56:22] VeryBewitching: I have postgres set to 400 connections (much higher than I'd like)
[19:57:23] VeryBewitching: And ya, I've been looking at pgBouncer, guess I'll give that a shot next.
[20:08:08] VeryBewitching: OK, thanks folks. :)
[21:56:41] VeryBewitching: Fuzai: Either via a websocket or some kind of polling, in either case, that's a client-side scripting obstacle.
[21:57:17] VeryBewitching: Quit: Konversation terminated!

2018-06-01

[18:27:42] VeryBewitching: has joined #ruby
[18:28:18] VeryBewitching: has joined #RubyOnRails
[20:15:14] VeryBewitching: Quit: Konversation terminated!

2018-04-25

[20:22:01] VeryBewitching: has joined #ruby

2018-04-06

[18:06:20] VeryBewitching: has joined #ruby
[18:08:33] VeryBewitching: has joined #RubyOnRails
[18:09:25] VeryBewitching: Only if you want to regard it and use it as one
[20:15:15] VeryBewitching: Quit: Konversation terminated!

2017-12-19

[16:45:52] VeryBewitching: has joined #ruby-offtopic
[16:45:52] VeryBewitching: has joined #ruby
[21:44:59] VeryBewitching: Quit: Konversation terminated!

2017-12-14

[20:58:11] VeryBewitching: has joined #ruby-offtopic
[20:58:11] VeryBewitching: has joined #ruby
[20:59:09] VeryBewitching: has joined #RubyOnRails
[20:59:58] VeryBewitching: Hey folks, I'm seeing emails coming from ActionMailer with a from address of noreply@example.com all the time, configuration here https://gist.github.com/bewitchingme/7c513a3e815c63f7f51249c87b96b2ee, can anyone assist?
[21:01:27] VeryBewitching: amperry: I'm assuming that residents.placement_id is a field?
[21:01:39] VeryBewitching: amperry: Can you Gist your models?
[21:02:27] VeryBewitching: Also, do you get an error if you do Placement.find(some_id).residents ?
[21:05:14] VeryBewitching: So maybe placement_id is not set for the resident you had loaded?
[21:05:25] VeryBewitching: resident.placement <- is this nil?
[21:06:27] VeryBewitching: Gist your models please so we can see what's up.
[21:29:07] VeryBewitching: Tried this out in a test app, see: https://github.com/bewitchingme/assoc
[21:30:09] VeryBewitching: I can do in a rails console: Placement.create; Resident.create placement: Placement.find(1); Resident.create placement: Placement.find(1); r = Resident.find(1); r.placement.residents #=> Collection
[21:32:16] VeryBewitching: I would inspect resident.placement to see what the value of it is
[21:32:35] VeryBewitching: What happens when you call resident.placement.residents ?
[21:33:43] VeryBewitching: Does it raise an exception, or do you just get an empty collection?
[21:34:41] VeryBewitching: OK, so I would check if that placement actually has more than one resident (though you should get at least one given that you're resident belongs to it)
[21:40:02] VeryBewitching: kapil___: Can you elaborate on that question?
[21:40:11] VeryBewitching: amperry: You should write some tests.
[21:41:52] VeryBewitching: kapil___: https://dan.chak.org/enterprise-rails/chapter-11-view-backed-models/
[21:41:56] VeryBewitching: First result on Google
[21:42:21] VeryBewitching: amperry: Glad you found the bug :D
[21:42:50] VeryBewitching: amperry: I use TRB for business processes in Rails now, I highly recommend it.
[21:43:05] VeryBewitching: amperry: http://trailblazer.to/
[21:43:41] VeryBewitching: Iarfen: The I18n stuff allows for placeholders
[21:43:53] VeryBewitching: Iarfen: What are you trying to do?>
[21:45:03] VeryBewitching: Iarfen: http://edgeguides.rubyonrails.org/i18n.html#passing-variables-to-translations may be helpful
[21:46:28] VeryBewitching: t('some.path', my_var: link_to(params)) ?
[21:49:45] VeryBewitching: amperry: @result.blank?
[21:50:24] VeryBewitching: If you need to know if the count is higher than 0, you'll still have to check that.
[21:51:17] VeryBewitching: I think blank is irb(main):001:0> [].blank? #=> true
[21:52:41] VeryBewitching: amperry: :blank? will return false for nil, or '' or [] or {}
[21:53:24] VeryBewitching: amperry: So if your result is nil or an empty array, :blank? will return true
[21:54:00] VeryBewitching: amperry: pry + rails console is your friend
[21:54:29] VeryBewitching: amperry: Your models look to be a little heavy-set
[21:55:03] VeryBewitching: My most complicated model in my current app has no methods, just associations and scopes.
[21:57:20] VeryBewitching: amperry: If you're going to refactor it, I would certainly suggest Trailblazer. You can do it in pieces, one controller at a time. By the time you're done your models will be lean, your controllers will be lean and your tests will read better.
[21:57:49] VeryBewitching: Also, if you wanted to, you'd be in a position at that point to port the entire app to Sinatra or to Roda without too much effort (mostly routing)
[21:59:53] VeryBewitching: Iarfen: link_to(params).html_safe
[22:02:23] VeryBewitching: Or maybe link_to(params).raw might be better?
[23:07:13] VeryBewitching: Iarfen: https://github.com/enriclluelles/route_translator
[23:10:21] VeryBewitching: Perl is a lot of work imo
[23:10:48] VeryBewitching: _sfiguser: I type less in Ruby
[23:11:16] VeryBewitching: Perl is not dying
[23:11:27] VeryBewitching: There's little liklihood that it will anytime soon
[23:13:47] VeryBewitching: C and C++ are rather different beasts.
[23:16:22] VeryBewitching: _sfiguser: I guess I meant perl 5 and perl 6 being different is not like C and C++ being different.
[23:18:08] VeryBewitching: http://sciruby.com/
[23:18:13] VeryBewitching: Efforts are being made
[23:19:12] VeryBewitching: Iarfen: Second result on Google for 'rails I18n routes'
[23:21:08] VeryBewitching: amperry: user.posts << post
[23:21:58] VeryBewitching: Dart syntax reminds me a lot of QtQuick
[23:22:10] VeryBewitching: eam: I feel the same about Erlang
[23:22:52] VeryBewitching: That's time you usually have to make
[23:24:39] VeryBewitching: amperry: In a console in that app I spun up, I can do Placement.find(1).residents << Resident.new and it all works just fine
[23:26:20] VeryBewitching: I really need to focus more on learning about Node (though I don't really want to tbh)
[23:28:27] VeryBewitching: OK work day is done for me, hitting the trail.
[23:28:28] VeryBewitching: Quit: Konversation terminated!

2017-11-24

[20:03:26] VeryBewitching: has joined #ruby-offtopic
[20:03:26] VeryBewitching: has joined #ruby
[21:55:17] VeryBewitching: Quit: Konversation terminated!

2017-11-21

[19:52:59] VeryBewitching: has joined #ruby
[19:53:00] VeryBewitching: has joined #ruby-offtopic
[21:48:16] VeryBewitching: Quit: Konversation terminated!

2017-11-09

[15:58:28] VeryBewitching: has joined #ruby-offtopic
[15:58:28] VeryBewitching: has joined #ruby
[22:01:55] VeryBewitching: Quit: Konversation terminated!

2017-10-24

[18:51:13] VeryBewitching: has joined #ruby
[18:51:14] VeryBewitching: has joined #ruby-offtopic
[19:44:36] VeryBewitching: Is there anything I should be aware of when having a carriage return in my symbol list? ie. %i(one two three)?
[19:45:02] VeryBewitching: Does Ruby treat the carriage return like a space?
[19:45:59] VeryBewitching: https://gist.github.com/bewitchingme/e9889b88e150f85134cca9131e332fd3 as an example
[19:46:17] VeryBewitching: It seems to work, just wondering if there's a gotcha somewhere
[19:46:48] VeryBewitching: Papierkorb: I did not, and thanks basket :D
[21:06:57] VeryBewitching: Quit: Konversation terminated!

2017-09-29

[20:10:49] VeryBewitching: has joined #ruby-offtopic
[20:10:49] VeryBewitching: has joined #ruby
[21:06:48] VeryBewitching: Quit: Konversation terminated!

2017-09-27

[15:30:50] VeryBewitching: has joined #ruby-offtopic
[15:30:50] VeryBewitching: has joined #ruby
[15:51:18] VeryBewitching: has joined #RubyOnRails
[20:15:19] VeryBewitching: Quit: Konversation terminated!

2017-09-07

[17:56:04] VeryBewitching: has joined #ruby-offtopic
[17:56:04] VeryBewitching: has joined #ruby
[17:58:27] VeryBewitching: has joined #RubyOnRails
[17:58:46] VeryBewitching: has joined #RubyonRails-offtopic
[20:34:39] VeryBewitching: Quit: Konversation terminated!

2017-07-20

[16:32:58] VeryBewitching: has joined #ruby-offtopic
[16:32:58] VeryBewitching: has joined #ruby
[16:35:41] VeryBewitching: has joined #RubyOnRails
[20:49:17] VeryBewitching: Quit: Konversation terminated!

2017-07-14

[19:04:00] VeryBewitching: has joined #ruby-offtopic
[19:04:00] VeryBewitching: has joined #ruby
[19:09:34] VeryBewitching: has joined #RubyOnRails
[22:22:16] VeryBewitching: Quit: Konversation terminated!

2017-07-13

[18:15:27] VeryBewitching: has joined #ruby-offtopic
[18:15:27] VeryBewitching: has joined #ruby
[18:16:23] VeryBewitching: has joined #RubyOnRails
[18:17:06] VeryBewitching: has joined #RubyonRails-offtopic
[20:25:48] VeryBewitching: Quit: Konversation terminated!

2017-07-12

[17:20:11] VeryBewitching: has joined #ruby-offtopic
[17:20:11] VeryBewitching: has joined #ruby
[17:20:33] VeryBewitching: has joined #RubyOnRails
[21:07:50] VeryBewitching: Quit: Konversation terminated!

2017-07-11

[17:03:12] VeryBewitching: has joined #ruby-offtopic
[17:03:12] VeryBewitching: has joined #ruby
[17:03:21] VeryBewitching: has joined #RubyOnRails
[17:04:56] VeryBewitching: I'm using this: config.action_mailer.default_options = {from: 'Name <noreply@example.com>'} to specify the default from address and name on emails in Rails 5, but the email always comes from from@example.com, anyone experienced this?
[17:05:46] VeryBewitching: I think PHP is still in use because those developers don't know any better.
[17:06:11] VeryBewitching: I was stuck with it for more than ten years and I'm glad it's in my rear-view.
[17:07:22] VeryBewitching: dminuoso: The language does have it's issues, consistency of heritage and function conventions being the two that drive me bonkers the most.
[17:08:01] VeryBewitching: That and I don't personally believe that 0 == false == null
[17:08:43] VeryBewitching: dminuoso: Sure, but I've been working with it since PHP 2 FI and the community doesn't seem to care that they're wading in garbage
[17:09:49] VeryBewitching: I agree that JS both client and server-side has thankfully come quite a long way.
[17:10:44] VeryBewitching: There's still an old school mentality in there.
[17:14:16] VeryBewitching: Some of the PHP teams out there have provided a good deal of assistance in that matter, but the horde as a whole doesn't realize the mess they're living with. There are much better ways to skin a cat imo
[17:14:46] VeryBewitching: Maybe in 5 - 6 years PHP will attract me again
[17:15:27] VeryBewitching: Papierkorb: I know some very zealous WordPress coders who happen to think they found the grail
[17:16:01] VeryBewitching: Building applications in a blog platform turned CMS makes my proverbial skin itch something terrible
[17:18:11] VeryBewitching: Joomla! is pretty infamous for that too.
[20:12:29] VeryBewitching: Quit: Konversation terminated!

2017-05-12

[01:43:26] VeryBewitching: apparition: Though it seems cumbersome at first, rdoc is pretty functional.
[02:30:48] VeryBewitching: Quit: Konversation terminated!

2017-05-11

[19:47:01] VeryBewitching: has joined #ruby-offtopic
[19:47:01] VeryBewitching: has joined #ruby
[20:06:21] VeryBewitching: has joined #RubyOnRails

2017-04-26

[19:14:28] VeryBewitching: has joined #ruby-offtopic
[19:14:28] VeryBewitching: has joined #ruby
[21:17:59] VeryBewitching: Quit: Konversation terminated!

2017-04-12

[15:09:04] VeryBewitching: has joined #ruby-offtopic
[15:09:04] VeryBewitching: has joined #ruby
[15:36:29] VeryBewitching: Corsair Voids are nice
[15:36:50] VeryBewitching: Managed to get them working with Linux with very little trouble (Windows setup took longer)
[15:47:35] VeryBewitching: has joined #RubyOnRails
[20:52:27] VeryBewitching: Quit: Konversation terminated!

2016-07-13

[18:14:02] VeryBewitching: has joined #ruby-offtopic
[18:14:02] VeryBewitching: has joined #ruby
[18:14:02] VeryBewitching: has joined #RubyOnRails
[21:03:19] VeryBewitching: Quit: Konversation terminated!

2016-07-12

[20:27:35] VeryBewitching: has joined #ruby-offtopic
[20:27:35] VeryBewitching: has joined #ruby
[20:27:35] VeryBewitching: has joined #RubyOnRails
[21:17:55] VeryBewitching: Quit: Konversation terminated!

2016-07-11

[03:04:17] VeryBewitching: has joined #ruby-offtopic
[03:04:17] VeryBewitching: has joined #ruby
[03:04:17] VeryBewitching: has joined #RubyOnRails
[04:13:52] VeryBewitching: Quit: Konversation terminated!
[18:07:41] VeryBewitching: has joined #ruby-offtopic
[18:07:41] VeryBewitching: has joined #ruby
[18:07:41] VeryBewitching: has joined #RubyOnRails
[18:08:43] VeryBewitching: If I have a JSONB column with AR, how can I ensure that it's returned with all of it's keys symbolized?
[18:45:34] VeryBewitching: I need to pass a File object that has a fixed filename into a method, but I can only create a Tempfile object, anyone have any insight on this?
[18:47:14] VeryBewitching: I'm decoding a base64 string so I can pass the binary data to another class, but so far when I write to the temp file, the filename of the original file provided is not preserved in any way (aside from being a part of the Tempfile)
[18:50:34] VeryBewitching: toretore: I'm building a JSON API, and I'm going to receive a b64 encoded string. I need to decode this and pass it to Paperdragon; if I create a File object the filename is preserved and Paperdragon can deal with it, but it doesn't seem to pick up any filename at all from a Tempfile object
[18:54:38] VeryBewitching: toretore: I believe so (though it might work with a URI, too)
[18:55:38] VeryBewitching: toretore: Doing File.new('file.ext', flags) works because Paperdragon has a filename; Tempfile creates its own name based on your input, but for whatever reason Paperdragon doesn't carry that over.
[18:56:04] VeryBewitching: (Which makes sense to me, it's a tmp file)
[21:32:56] VeryBewitching: Quit: Konversation terminated!

2016-07-09

[02:51:25] VeryBewitching: Quit: Konversation terminated!

2016-07-08

[14:17:56] VeryBewitching: has joined #ruby-offtopic
[14:17:56] VeryBewitching: has joined #ruby
[14:17:56] VeryBewitching: has joined #RubyOnRails
[16:34:43] VeryBewitching: Dragonfly question: If I have a dragonfly_accessor :image, and I want to assign the image from a String, how do I get the validator to deal with the mime type? I'm doing model.image = b64string; model.image.name = 'filename.png'; but the validator, when it runs, doesn't allow it because the mime_type isn't present.
[16:35:33] VeryBewitching: Would I have to construct a Rack::Test::UploadedFile?
[16:36:26] VeryBewitching: Or Rack::Multipart::UploadedFile rather?
[17:30:11] VeryBewitching: Ping timeout: 240 seconds
[17:34:09] VeryBewitching: has joined #ruby-offtopic
[17:34:09] VeryBewitching: has joined #ruby
[17:34:09] VeryBewitching: has joined #RubyOnRails
[18:55:50] VeryBewitching: Anyone have experience with file uploads in JSON using Dragonfly/Trailblazer/Roar?

2016-06-29

[18:04:04] VeryBewitching: /= require jquery-ui/draggable
[18:04:13] VeryBewitching: Err... //= require jquery-ui/draggable
[18:07:53] VeryBewitching: jim__: No, it doesn't. You have supplied any code, you just say "It's not working"
[18:10:57] VeryBewitching: jim__: I just looked at it.
[18:11:05] VeryBewitching: If you want fast responses during the work day, get out your wallet
[18:12:03] VeryBewitching: jim__: You haven't used the gem properly
[18:12:13] VeryBewitching: Read this page: https://github.com/joliss/jquery-ui-rails
[18:14:31] VeryBewitching: jim__: Is //= require jquery.ui.datepicker correct?
[18:15:00] VeryBewitching: Or should it be //= require jquery-ui/datepicker ?
[18:17:08] VeryBewitching: jim__: OK, if you think it's OK then you don't need any further assistance.
[18:18:04] VeryBewitching: jim__: You're going to have to learn something during this process.
[18:21:06] VeryBewitching: jim__: Last time I'm going to post this link https://github.com/joliss/jquery-ui-rails
[18:21:19] VeryBewitching: Read that, all the way through, then implement it in your application.js as they suggest
[18:22:27] VeryBewitching: It's been the same link each time.
[18:22:37] VeryBewitching: I count three times pasted in my log.
[21:30:20] VeryBewitching: Quit: Konversation terminated!