maesitos

Activity Graph

Page 1 of 7 | Next »

2018-03-04

[15:19:50] maesitos: has joined #RubyOnRails
[15:20:09] maesitos: Hello could anybody help me monkeypatching 'render' from a controller?
[15:21:48] maesitos: I have this https://pastebin.com/raw/ZfGpAGFt
[15:22:07] maesitos: but it's breaking the app and I'm not sure why

2018-02-26

[00:04:28] maesitos: a ruby exe?
[00:05:46] maesitos: I can't help you there sorry
[00:07:23] maesitos: I know ruby but don't know anything about your particular issu
[00:12:34] maesitos: Remote host closed the connection
[00:17:37] maesitos: has joined #ruby
[00:22:26] maesitos: I'm not sure
[00:22:38] maesitos: run rake -T
[00:22:55] maesitos: and maybe there you get more info about the task you run
[00:23:21] maesitos: maybe the exe file was put somewhere in your system...
[00:26:12] maesitos: maybe it's better to read the documentation if you don't know ruby as they'll say what rake did exactly
[00:27:16] maesitos: rake is just an app to move things and run certain commands
[00:27:23] maesitos: it's a bundle for a set of commands
[00:28:55] maesitos: yeah it's he equivalent of C's make
[00:29:58] maesitos: maybe the mkvtoolnix documentation...
[00:31:38] maesitos: then open the rake file and inspect it
[00:32:22] maesitos: there should be a line that says "task :install

2018-02-25

[23:50:12] maesitos: has joined #ruby
[23:50:38] maesitos: Could anybody tell me what's wrong with this line?
[23:50:40] maesitos: super.create!(reason: "sale",payable_type: "Payment" , price: "200" , currency: "EUR",crypto: :bch)
[23:51:09] maesitos: I get: " syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' " and it's driving me nuts
[23:57:45] maesitos: https://pastebin.com/raw/sBX7UJfP
[23:58:10] maesitos: ruby[bot]: pastebin raw is ok man

2018-02-24

[18:39:36] maesitos: has joined #RubyOnRails
[18:40:16] maesitos: Hello I'm trying to run a code before initialisation in a Rails generator I'm developing, any help?
[18:45:45] maesitos: *initialising
[18:45:49] maesitos: no it's not
[18:46:20] maesitos: I tend to destroy the english language, I know
[18:47:57] maesitos: basically, what I need is to run a script after the configuration from my gem has been loaded
[18:49:41] maesitos: yes it's a generator
[18:50:19] maesitos: I'm pretty new to rails and the convention over configuration and the load process is a bit of a puzzle
[18:53:09] maesitos: Basically it's a gem that provides multiple adaptors for different APIs. So the gem users defines the adaptor he'd like to use in /config/initializers/gem_name.rb
[18:53:45] maesitos: and I'd like to have a singleton class that includes an instance for that generator, the one provided by the gem user
[18:54:23] maesitos: I did the generator by hand
[18:54:59] maesitos: I'm adding new code to an existing gem and they didn't include any generator
[18:58:07] maesitos: I've been reading there's a method "config.after_initialize"
[18:58:26] maesitos: that's pretty much what I'd need but I don't know how to reach it from my gem
[18:58:35] maesitos: and if I even should do it that way
[19:06:34] maesitos: that gem needs to post some things based on that configuration to a server just once
[19:07:03] maesitos: in fact it posts the URLs for a web-hook so I'd also need ActionDispatch loaded
[19:07:44] maesitos: once in the lifetime of the app
[19:17:49] maesitos: Remote host closed the connection

2017-09-25

[17:47:25] maesitos: has joined #ruby
[17:48:14] maesitos: I've just finished "the well grounded Rubyist", what book would your recommend next?
[17:50:17] maesitos: yeah I've been checking it
[17:51:00] maesitos: but I feel like reading more is kind of a lot, shouldn't I find a project or something?
[17:53:12] maesitos: so according to the list I should read now eloquent Ruby
[17:53:28] maesitos: I read by the way eloquent Javascript and I wound't say it's a good book
[17:53:50] maesitos: the examples are hard to follow
[18:09:26] maesitos: al2o3-cr: it's great
[18:10:28] maesitos: al2o3-cr: the last chapter was very gratifying
[18:12:38] maesitos: but I feel like I need to get my hands dirty now
[18:13:05] maesitos: baweaver: that's good to hear
[18:13:20] maesitos: Eloquent JS is very pedantic
[18:14:36] maesitos: yes EJS starts from the ground up
[18:15:08] maesitos: but that's why I say it's a bit pedant... the author tries to show off a bit imo
[18:16:15] maesitos: never mind it's a free book, I'd have to be grateful
[18:17:05] maesitos: baweaver: so you recommend me to stop reading and dig my head in some code right?
[18:20:06] maesitos: so you say I need to feel the pain first
[18:21:33] maesitos: the thing is I tend to lose motivation with dummy projects...
[18:21:45] maesitos: but I don't feel ready for something serious
[18:22:37] maesitos: Papierkorb: right
[18:22:54] maesitos: baweaver: just like watching a building right?
[18:23:46] maesitos: yeah well that happens to me in my own live, when I look back I cannot believe I did all that... But I feel stuck now
[18:25:50] maesitos: baweaver: I don't have any haha
[18:26:21] maesitos: baweaver: my hobby is my business and I've hired several Rails developers believe it or not
[18:26:40] maesitos: baweaver: not really... I like building stuff that's what I enjoy
[18:27:51] maesitos: teatime: I'd love to... but my business now is small to hire a full time sysadmin but I'm working at it!
[18:28:07] maesitos: Papierkorb: anything... lately my business, I consider it a stuff haha
[18:28:53] maesitos: Papierkorb: anything... lately my business, I consider it stuff haha
[18:29:12] maesitos: baweaver: what's your hobby by the way
[18:31:56] maesitos: Papierkorb: building a small Sass will be something that I'd enjoy doing
[18:32:14] maesitos: Papierkorb: if it ain't useful I get bored
[18:33:01] maesitos: Papierkorb: a Saas... it's how the hippies call online services now a days
[18:33:23] maesitos: https://www.google.es/search?client=safari&rls=en&q=nowadays&ie=UTF-8&oe=UTF-8&gfe_rd=cr&dcr=0&ei=70vJWYGgM8ap8weUuafYBg
[18:34:05] maesitos: Papierkorb: ideally you ask for 20 bucks a moth or so
[18:35:27] maesitos: baweaver: xD
[18:36:16] maesitos: baweaver: it depends
[18:36:33] maesitos: baweaver: now I see them getting more expensive
[18:37:24] maesitos: Papierkorb: that's the big question yes
[18:40:32] maesitos: You know the ugly part is JS
[18:40:48] maesitos: if I want to do web I need to interface with the user with JS and CSS
[18:41:04] maesitos: and it's a bit hostile
[19:23:14] maesitos: baweaver: The Ruby Way or Eloquent Ruby
[19:23:28] maesitos: what would you say

2017-09-24

[11:28:55] maesitos: has joined #ruby
[11:29:31] maesitos: What's the point of 'attr_reader :var' if I can do this https://pastebin.com/raw/x6p5PGkE
[11:31:04] maesitos: ruby[bot]: you are a Nazi are you going to ban be or what. By the way I'm posting the raw version of pastebin
[11:33:56] maesitos: still a Nazi
[11:36:53] maesitos: Remote host closed the connection
[12:32:29] maesitos: has joined #ruby
[15:08:01] maesitos: Read error: Connection reset by peer

2017-09-16

[11:07:09] maesitos: has joined #ruby
[11:09:06] maesitos: Hello I'm at the 14th chapter of The grounded Rubyist and there's something I don't understand. Could anybody take a look at this example and let me know why one works while the other doesn't? https://pastebin.com/raw/mh16Kspj
[11:09:59] maesitos: https://gist.github.com/anonymous/2144447fda0524e8615e89669c371db2

2017-07-07

[19:56:34] maesitos: has joined #ruby
[19:56:43] maesitos: Hello, quick question. How come I can use the private method Module#alias_method inside a class definition
[19:59:30] maesitos: Papierkorb: but it's private isn't it?
[20:04:09] maesitos: Papierkorb: but my question is: how is it possible that the method alias_method is available inside a class definition?
[20:05:02] maesitos: apeiros: got it
[20:05:59] maesitos: apeiros: that was the missing link for me, I didn't recall Class is a subclass of Module
[20:08:04] maesitos: apeiros: I'm almost finishing "grounded rubyist" and it's now clear to me that everything is an object and all that but I was missing the fact that Class is a subclass of Module
[20:08:36] maesitos: apeiros: Thanks!
[20:23:24] maesitos: Remote host closed the connection

2017-03-30

[13:31:33] maesitos: has joined #RubyOnRails
[13:32:52] maesitos: Hello Can anybody help me with a rails Monkey Patch? I'm not able to get it to work https://pastebin.com/raw/b2dkGze0
[13:33:25] maesitos: that file is being required in "initializers/corextension.rb"
[13:34:31] maesitos: dminuoso: if I just call it it's says I'm calling a private method, I'm using an old ruby
[13:34:50] maesitos: fryguy: what would I need then instead of prepend
[13:35:59] maesitos: dminuoso: then why ruby isn't using my monkepathed method
[13:39:12] maesitos: dminuoso: how can I make that to work, I'm a but puzzled
[13:47:10] maesitos: fryguy: I want the monkey patched method to take action but Rails doesn't use it
[13:51:53] maesitos: dminuoso: what I meant with get it to work is that if I call the monkey-patched method, rails doesn't use the new method
[13:54:28] maesitos: dminuoso: it's the same if I use include... it doesn't work either
[13:56:16] maesitos: dminuoso: but I'd like the monkey patch to take effect globally
[14:00:18] maesitos: ok I think I understood what you mean
[14:00:45] maesitos: not really ahah
[14:04:26] maesitos: dminuoso: Ok I see, so I used prepend in "initializers/corextension.rb" right after requiring the module file
[14:07:00] maesitos: dminuoso: but still, Rails is not using the new ActionController method
[14:38:12] maesitos: matthewd: I now understand you when you mean 'prepending into a module after it's been included elsewhere isn't going to work so well', how can I then make sure I prepend into the module before it's included
[14:51:00] maesitos: dminuoso: mmmm but I need to include into the module before it's included elsewhere
[14:54:13] maesitos: dminuoso: I don't think I'm trying to find an specific solution, in fact I just answered to a guy that had the exact same problem but I answered with a very basic response http://stackoverflow.com/questions/40356669/how-to-monkey-patch-an-actionview-module-via-prepend/43121344#43121344
[14:55:03] maesitos: dminuoso: the thing is I don't know how to solve that in Rails!
[14:56:13] maesitos: dminuoso: ActionSupport disagrees
[14:57:10] maesitos: I'm just trying to monkey patch ActionController::Redirecting.force_sll with no luck
[14:59:19] maesitos: if I force SSL without specifying the domain it uses APP::Application.config.action_controller.default_url_options[:host]
[14:59:48] maesitos: but my app is being served in two different domains
[15:00:18] maesitos: so if I force_ssl in domain2.com it goes to https//domain1.com
[15:03:45] maesitos: I need to think
[15:03:51] maesitos: the domain of the middle ware
[15:03:58] maesitos: dones't seem like a good place for me
[15:04:12] maesitos: as the middleware should know about the logic if my bussines
[15:04:23] maesitos: *shouldn't know
[15:04:54] maesitos: dminuoso: yeah I'd need to rewrite te app but that's going to take time
[15:06:36] maesitos: dminuoso: don't be that closed minded
[15:06:49] maesitos: dminuoso: it takes time to redo an app and that's money in my bussines
[15:07:26] maesitos: dminuoso: we'll keep that version for a while till it makes sense to stop and re-do the app
[15:09:18] maesitos: dminuoso: yeah but the monkey patching is probably the same for ruby 4
[15:10:58] maesitos: http://stackoverflow.com/questions/40356669/how-to-monkey-patch-an-actionview-module-via-prepend/43121344#43121344
[15:14:11] maesitos: dminuoso: read the last question, I think mine is a ruby question more than a rails one so It's not a question for an specific problem I have
[17:33:50] maesitos: has left #RubyOnRails: ()

2016-06-09

[13:28:43] maesitos: has joined #RubyOnRails
[13:29:07] maesitos: has joined #ruby
[13:29:11] maesitos: Hello I have a simple question
[13:29:21] maesitos: @shipment_country ||= params[:shipment_country]
[13:29:22] maesitos: @shipment_country ||= extract_country_from_ip
[13:29:22] maesitos: @shipment_country ||= cookies[:shipment_country]
[13:30:09] maesitos: will that 3rd line execute extract_country_from_ip if @shipment_country is 1 ?
[13:31:22] maesitos: lupine: but I need extract_country_from_ip to be executed only if @shipment_country is false or nill
[13:32:34] maesitos: lupine: I mean, extract_country_from_ip is looking up the country based on the IP and it's using a paid service. I want to call that function only if neccesary
[13:32:59] maesitos: so my question is will the function be evaluated?
[13:38:31] maesitos: jhass: thanks
[13:38:50] maesitos: jhass: a simple test in irb confirmed that!

2016-06-07

[20:34:48] maesitos: has joined #RubyOnRails
[20:36:01] maesitos: Hi is anybody outside of Spain that can help me out verifiying the output of geocoder just a moment?¿

2016-06-03

[11:49:54] maesitos: has joined #RubyOnRails

2016-05-04

[00:07:31] maesitos: Remote host closed the connection
[02:08:41] maesitos: has joined #RubyOnRails
[02:13:48] maesitos: Ping timeout: 276 seconds
[04:09:29] maesitos: has joined #RubyOnRails
[04:14:22] maesitos: Ping timeout: 260 seconds
[06:10:24] maesitos: has joined #RubyOnRails
[06:15:36] maesitos: Ping timeout: 276 seconds
[08:11:16] maesitos: has joined #RubyOnRails
[08:15:34] maesitos: Ping timeout: 240 seconds
[08:41:41] maesitos: has joined #RubyOnRails

2016-05-03

[08:27:54] maesitos: has joined #RubyOnRails
[09:39:30] maesitos: Remote host closed the connection
[10:36:26] maesitos: has joined #RubyOnRails
[14:17:36] maesitos: Read error: Connection reset by peer
[14:17:58] maesitos: has joined #RubyOnRails
[19:26:06] maesitos: Read error: Connection reset by peer
[20:22:38] maesitos: has joined #RubyOnRails
[20:54:35] maesitos: Remote host closed the connection
[21:05:54] maesitos: has joined #RubyOnRails
[21:08:54] maesitos: Remote host closed the connection
[22:00:40] maesitos: has joined #RubyOnRails

2016-03-13

[00:17:07] maesitos: Remote host closed the connection
[12:09:19] maesitos: has joined #RubyOnRails
[12:35:56] maesitos: can anybody help me with capistrano? I think I'm having problems with manifest.yml I don't know if I should remove manifest.yml
[13:50:59] maesitos: Remote host closed the connection
[13:52:25] maesitos: has joined #RubyOnRails

2016-03-12

[17:12:45] maesitos: has joined #RubyOnRails
[17:18:16] maesitos: Could anybody help me with this? http://pastebin.com/raw/mkkgXrnN I'm a bit lost
[17:44:15] maesitos: arup_r: thanks! when you mean compiling it you mean running the code?
[17:44:28] maesitos: arup_r: it's working locally
[17:48:08] maesitos: arup_r: I'm going to try! The entire code was made by a developer I hired but I'm now on my own, a bit beginner in all these techniques.
[17:50:39] maesitos: arup_r: bundle exec rake assets:precompile is working :(
[17:57:48] maesitos: arup_r: http://pastebin.com/raw/SqUZ8Zvh
[22:01:36] maesitos: Remote host closed the connection
[23:00:56] maesitos: has joined #RubyOnRails

2016-03-02

[03:07:40] maesitos: Read error: Connection reset by peer
[03:08:14] maesitos: has joined #RubyOnRails
[03:09:36] maesitos: Read error: Connection reset by peer
[03:10:06] maesitos: has joined #RubyOnRails
[03:11:38] maesitos: Read error: No route to host
[03:12:01] maesitos: has joined #RubyOnRails
[03:13:23] maesitos: Read error: Connection reset by peer
[03:13:51] maesitos: has joined #RubyOnRails
[03:15:19] maesitos: Read error: Connection reset by peer
[03:15:48] maesitos: has joined #RubyOnRails
[03:17:15] maesitos: Read error: No route to host
[03:17:39] maesitos: has joined #RubyOnRails
[03:19:12] maesitos: Read error: No route to host
[03:19:38] maesitos: has joined #RubyOnRails
[03:21:01] maesitos: Read error: No route to host
[03:21:32] maesitos: has joined #RubyOnRails
[03:23:20] maesitos: Read error: Connection reset by peer
[03:25:16] maesitos: has joined #RubyOnRails
[03:27:11] maesitos: Read error: Connection reset by peer
[03:29:13] maesitos: has joined #RubyOnRails
[03:30:43] maesitos: Read error: Connection reset by peer
[03:30:59] maesitos: has joined #RubyOnRails
[03:35:51] maesitos: Ping timeout: 276 seconds
[05:32:03] maesitos: has joined #RubyOnRails
[05:36:39] maesitos: Ping timeout: 250 seconds
[07:32:53] maesitos: has joined #RubyOnRails
[07:37:34] maesitos: Ping timeout: 248 seconds
[09:33:41] maesitos: has joined #RubyOnRails
[09:37:54] maesitos: Ping timeout: 246 seconds
[11:07:26] maesitos: has joined #RubyOnRails
[11:12:03] maesitos: Ping timeout: 250 seconds
[11:15:31] maesitos: has joined #RubyOnRails
[11:19:45] maesitos: Ping timeout: 246 seconds
[12:01:56] maesitos: has joined #RubyOnRails
[12:06:18] maesitos: Ping timeout: 246 seconds
[12:14:17] maesitos: has joined #RubyOnRails
[12:19:04] maesitos: Ping timeout: 264 seconds
[12:47:59] maesitos: has joined #RubyOnRails
[13:32:45] maesitos: Read error: Connection reset by peer