ule

Activity Graph

Page 1 of 8 | Next »

2018-11-11

[02:31:39] ule: havenwood: thank you

2018-11-08

[20:24:21] ule: Do you guys, can I use merge() here:
[20:24:23] ule: {:filters=>[{"name"=>"foo", "value"=>"123"}, {"name"=>"Company", "value"=>"17"}, {"name"=>"bar", "value"=>"123"}], :foo_id=>"434"}
[20:25:07] ule: To override that {"name"=>"Company", "value"=>"17"} with {"name"=>"Company", "value"=>"111"} ?
[20:26:06] ule: or the best way is just iterating on each element of that hash and compare if name == Company && value == 17?

2018-10-20

[13:33:15] ule: Quit: WeeChat 1.9.1
[15:13:31] ule: has joined #RubyOnRails
[15:13:31] ule: has joined #ruby

2018-09-07

[18:23:41] ule: I did a while ago.. I was planning to help out in the project but never got a chance
[18:23:47] ule: phatcat: are you planning to?
[18:28:18] ule: I didn't run the project in Prod mode. As far as I remember there is a Docker somewhere

2018-08-29

[01:19:20] ule: *.net *.split
[13:31:52] ule: has joined #RubyOnRails
[13:31:57] ule: has joined #ruby
[19:25:41] ule: ivanskie: sure, whats up?
[19:26:23] ule: ivanskie: which region are you connecting to? No problems here
[19:27:10] ule: ivanskie: https://status.aws.amazon.com
[19:27:57] ule: ivanskie: Something is wrong there
[19:28:08] ule: ivanskie: 30/40 seconds sounds too much
[19:28:56] ule: ivanskie: try calling aws via aws-cli and see if it is fast
[19:29:06] ule: same method, describeInstance
[19:36:14] ule: ivanskie: looks like you're calling "eb.describe_environments" 2 times inside your before block

2018-08-20

[16:29:05] ule: has joined #ruby
[16:29:26] ule: Hey guys. I'm using OpenStruct to dimanically convert a hash like: ':foo => "bar"' into something like: MyOpenStruct.foo
[16:30:02] ule: My question is how would you convert nested hashes as well? When I do OpenStruct.new(my_hash) it only converts the top level keys
[16:30:28] ule: apeiros: (: thanks
[16:30:52] ule: I'm creating a wrapper to the SpaceX Api
[16:32:15] ule: apeiros: I'm wondering if there is a kind of ruby magic oneline method that digs into all nested hash keys "Dynamically"
[16:32:32] ule: RedNifre: it will display launches data, it is really cool
[16:32:50] ule: RedNifre: https://api.spacexdata.com/v2/launches/latest
[16:33:25] ule: Ohh. I know Hashie gem. I didn't know I could do that with it
[16:33:34] ule: apeiros: thanks
[16:33:51] ule: Criten: exactly what I need. Thanks!
[16:33:57] ule: Criten: so cool eh?
[16:36:14] ule: Hi new, I'm ule
[16:40:28] ule: man this Hashie gem has a lot of cool stuff
[16:41:00] ule: wtf is that? a chatbot?
[16:45:05] ule: Hashie::Mash.new(foo = {a: 123, b: { c: 456 } }).b.c
[16:45:16] ule: a w e s o m e
[17:29:02] ule: oh yeah my bad, I don't need to "foo ="
[17:29:32] ule: al2o3-cr: just using json lib eh, nice
[17:30:05] ule: RedNifre: I use vim as well. Love it

2018-08-03

[00:01:33] ule: I'm working to translate something here. What do you understand by this term: "probably will have to crank their libraries"
[00:58:30] ule: Zarthus: thanks!

2018-08-01

[00:52:45] ule: Hey guys, what would you use to paginate a hash? Lets say I have a list with 100 items and want to paginate this into 5 groups
[00:53:04] ule: Not sure if there is a magic enumerable method that does this out of the box
[00:53:25] ule: a kind of group_by(n elements)
[01:22:47] ule: havenwood: thanks!

2018-07-20

[00:07:03] ule: *.net *.split
[00:15:26] ule: has joined #RubyOnRails
[00:15:41] ule: has joined #ruby

2018-07-17

[15:28:54] ule: Hey guys, I just finish upgrading rails from 4.2.10 to 5.0.7. I'm wondering if I should upgrade to 5.1 or 5.2 now. I just want to understand better what these numbers means
[15:29:25] ule: Is odd versions a kind of short version just for tests? Any specific rule for Long Term Support versions based on these numbers?
[15:31:22] ule: This channel is usually more active then Rails. If you don't mind asking here, do you know what's the difference between 5.0.7, 5.1.6, 5.2.0 in terms of stability? Is the Long Terms Support related with these numbers? I just upgraded from 4.2.10 to 5.0.7, so now I'm trying to figure out if it worth upgrading to 5.1 or 5.2. I'm not sure which version makes more sense though. Any thoughts?
[15:31:45] ule: sorry in advance, I know this is a #ruby channel, but anyways.. :)
[15:36:01] ule: havenwood: I just read here: http://guides.rubyonrails.org/maintenance_policy.html
[15:36:16] ule: that there is only security fixes to 5.2 and 5.1
[15:36:30] ule: havenwood: ok, thank you very much
[15:37:24] ule: got the answer from there, thanks guys!

2018-07-14

[12:55:43] ule: What's the best way to track something wrong if you have a chain of callbacks over multiple models?
[14:43:20] ule: s2013: Maybe it is your browser cache?
[14:43:35] ule: s2013: try: https://www.ssllabs.com/ssltest/
[14:46:16] ule: Yes it does, your main certificate must be configured accordingly
[14:46:35] ule: Sometimes, wildcard certificate, sometimes one extra entry when you generate the whole thing
[14:47:49] ule: I'm not sure about Heroku though. Are you using something provided by them or you create your own certificate?
[14:48:35] ule: Oh I see.
[14:48:50] ule: 25 bucks month? thats expensive
[14:49:07] ule: Let me see details of this plan.. I'm curious now
[14:51:25] ule: that make sense
[15:22:03] ule: Milenials are switching to JavaScript

2018-07-10

[02:19:23] ule: Ping timeout: 240 seconds
[17:36:44] ule: has joined #ruby
[17:36:44] ule: Changing host
[17:36:52] ule: has joined #RubyOnRails

2018-07-06

[01:56:44] ule: Hey guys. After I upgraded to Rails 5, if I pass an empty value like this it doesn't show up on my params insite my controller:
[01:57:12] ule: post :update, params: { foo: []}
[01:57:23] ule: If I pass: post :update, params: { foo: ['']} # it works
[01:57:33] ule: or post :update, params: { foo: []}, as: :json # it also works
[01:57:58] ule: so my question is: How to make that pass without as: :json? Just passing foo: []?

2018-06-11

[17:41:21] ule: chouhoulis: try restarting your console
[17:41:38] ule: looks like you created after your console session was initialized
[17:47:40] ule: xco: I don't believe you can use unless that way
[17:48:28] ule: xco: try replacing for a normal IF block with - unless "something"
[17:49:04] ule: drale2k_: oh yeah, just add a "before_action
[17:49:15] ule: in your controller while you load that car
[17:50:10] ule: for me, in that case, make sense inside your album controller. You have a method like: "def load_car" right?
[17:50:18] ule: or "load_album" ?
[17:50:52] ule: xco: I would just removing that "unless" from that inline sintax
[17:51:27] ule: drale2k_: oh I see, so in that case, you need to intercept before Rails tries to load that car
[17:51:46] ule: I'm not familiar with what this "default rest" is doing though
[17:55:22] ule: Oh so, in that case, you got a controller with default actions

2018-05-29

[02:46:58] ule: *.net *.split
[02:47:47] ule: has joined #RubyOnRails
[02:48:04] ule: has joined #ruby
[02:50:12] ule: *.net *.split
[02:51:07] ule: has joined #RubyOnRails
[02:51:08] ule: has joined #ruby

2018-05-13

[18:22:57] ule: Ping timeout: 248 seconds
[18:26:17] ule: has joined #ruby
[18:26:19] ule: has joined #RubyOnRails

2018-05-07

[13:11:09] ule: *.net *.split
[13:26:48] ule: has joined #ruby
[13:26:48] ule: Changing host
[13:27:16] ule: has joined #RubyOnRails

2018-05-02

[17:05:19] ule: I don't use this stupid location param
[17:05:30] ule: always giving headache
[17:11:46] ule: Anyone here using Capistrano? I have a setup with multiservers and adding a custom rake tast to "after 'deploy:finished' is actually running this task on all my servers. I just want to run this task on one server
[17:12:09] ule: Like capistrano handles migration. Anyone have any example or tip for accomplish this?
[17:19:11] ule: Added to migrations block like here: https://github.com/capistrano/rails/blob/master/lib/capistrano/tasks/migrations.rake#L22
[17:19:32] ule: I'm running a test deploy to see if it works. Thanks nzst

2018-04-28

[02:29:46] ule: Hey folks
[02:29:53] ule: What do you use for rate-limit your APIs?
[02:37:54] ule: lupine: thanks. Added to my to do (study) list

2018-04-25

[12:26:04] ule: *.net *.split
[12:27:14] ule: has joined #ruby
[12:27:32] ule: has joined #RubyOnRails
[15:01:35] ule: *.net *.split
[15:03:08] ule: has joined #RubyOnRails
[15:03:31] ule: has joined #ruby

2018-04-24

[19:04:12] ule: I'm following the official Rails guide to upgrade here from Rails 4.2 to 5
[19:05:16] ule: I'm kind of confused with the steps. When should I change my Gemfile? When should I run rails app:update?
[19:05:54] ule: Anyone did this upgrade before and could share some thoughts?
[19:09:52] ule: You have requested: rails >= 5.0.7, ~> 5.0 -- The bundle currently has rails locked at 4.2.10. Try running `bundle update rails`
[19:10:08] ule: Sure Intii http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html
[19:11:33] ule: Just going to the step that explains 4.2 to 5 you mean?
[19:12:02] ule: Those 21 sub-steps are fine. I'm just stuck on this part where I update my gemfile and run: rails app:update
[19:12:34] ule: it is failing here saying I have to run bundle rails update. I run that it also complains I need to install a different version fo activesomething
[19:13:47] ule: exactly, so that means I need to update this activewhatever manually?
[19:15:03] ule: I have some private gems I would need to clean up a bit
[19:15:23] ule: but anyways. Lets say I'm gonna start this upgrade from scratch
[19:15:49] ule: 1) Update my Gemfile and replace: rails 4.2.10 to rails 5.0.7
[19:15:56] ule: 2) rails app:update
[19:15:58] ule: thats it?
[19:16:39] ule: yeah yeah. All those changes are done. ApplicationRecord, Job, configs and so on
[19:16:45] ule: ok Let me try here again
[19:17:53] ule: Last time I did the upgrade from 4.0 to 4.2 was a pain in the a**
[19:19:48] ule: activerecord-session_store (~> 1.1.1) was resolved to 1.1.1, which depends on actionpack (>= 4.0)
[19:20:35] ule: Would be nice to have a flag like "bundle rails update --UPDATE_ALL_MY_DEPENDENCIES_DOEST_MATTER_WHAT_HAPPENS"
[19:22:02] ule: KucukMubasir: git grep -n 'aws' .
[19:35:07] ule: Intii: I removed my Gemfile.lock and now I'm trying to solve one by one
[19:35:57] ule: yeah :/ not just one but maybe 10 issues from what I can see here
[19:37:55] ule: crazy how many crappy Gems I usually find on these upgrades :P
[19:38:08] ule: I bet 20% of them is not even being used anymore
[19:43:55] ule: Dammit, still not working
[19:44:26] ule: now it complains the dependencies depends on Rails 5.0.7 but I can't install Rails 5.0.7 because it depends on dependencies
[19:44:46] ule: awwesome
[19:45:07] ule: let me try gem install rails -v 5.0.7
[19:45:28] ule: I'm at 4.2.10 (Latest)
[19:45:39] ule: you mean 5.0.0 ?
[19:45:45] ule: Let me try
[20:00:19] ule: nothing
[20:00:45] ule: I don't understand why even after updating my Gemfile to the suggested version it still doesn't execute bundle update/install
[20:00:53] ule: even using --force or removing Gemfile.lock

2018-04-21

[14:20:47] ule: Quit: WeeChat 1.9.1
[14:53:20] ule: has joined #RubyOnRails
[14:53:20] ule: has joined #ruby

2018-04-14

[04:13:02] ule: Radar: thank you

2018-04-13

[22:23:06] ule: Hey guys.. what's the best practice to storing password on Rails for prod? Environment Variable always?

2018-04-04

[10:15:58] ule: *.net *.split
[13:39:23] ule: has joined #ruby
[13:39:23] ule: Changing host
[13:39:36] ule: has joined #RubyOnRails

2018-03-25

[19:08:48] ule: Anyone here running Rails on FreeBSD?
[19:09:06] ule: Such a headache configuring this passenger on it
[19:09:40] ule: I'm almost giving up. I'm wondering if configuring my Nginx with Puma would be less painfull

2018-03-20

[23:40:47] ule: Ping timeout: 252 seconds
[23:41:41] ule: has joined #ruby
[23:41:43] ule: has joined #RubyOnRails

2018-03-15

[17:46:01] ule: https://www.serverless-ruby.org/
[17:46:08] ule: phaul: I use ctags
[17:47:00] ule: phaul: map <Leader>ct :<C-U>!=/usr/local/bin/ctags -R --languages=ruby --exclude=.git --exclude=log . $(bundle list --paths)<CR>
[17:47:12] ule: when I type: ,ct
[17:47:18] ule: it updates all ctags
[17:54:04] ule: Yeah, in my case there I'm creating ctags based on all installed gems. "bundle --list"

2018-03-14

[09:16:15] ule: Ping timeout: 268 seconds
[09:19:03] ule: has joined #ruby
[09:19:05] ule: has joined #RubyOnRails

2018-03-05

[19:00:04] ule: Hey guys, I'm trying to create a breadcrumb from a hash
[19:00:22] ule: https://repl.it/repls/ModestShowyFinance
[19:12:58] ule: apeiros: ok
[19:20:28] ule: apeiros: at the first iteration it gives me A as key and the rest as value right
[19:20:48] ule: so, I guess after getting this A, I should imidialy start recursivelly looking at each key inside value
[19:21:12] ule: thats why I thought to call the recursion passing(v)
[19:22:24] ule: yes, thats what I have there.. h.each (first iteration), and recursion inside that
[19:25:16] ule: so if I understood well, I need v.each as well
[19:25:18] ule: let me try
[19:34:58] ule: apeiros: I guess now its time to call the recursion right?
[19:38:49] ule: apeiros: in your example, stack is the previous level?
[19:40:47] ule: thank you very much apeiros
[19:46:38] ule: baweaver: nice one as well. I didn't know about that reduce with 3 elements
[19:55:44] ule: I found this one googling here: https://gist.github.com/crwang/6a9d6ab3b248debb5131
[19:56:56] ule: actually, this one:
[19:56:58] ule: https://gist.github.com/dbrady/121ceecac3bef9cdd3b0
[20:22:10] ule: dminuoso: what do you mean?
[20:22:39] ule: oh in the reduce parameters there? gotcha
[20:28:33] ule: When using a recursive logic, how can I return the value instead of using "puts" in the middle of the method?
[20:29:44] ule: if I add an acumulator like foo << x, or foo += x it doesn't work because I need to declare foo = '' when I start the method
[20:34:52] ule: humm let me try
[20:55:36] ule: sweet, working with Ruby is like using Vim
[20:55:42] ule: learning courve never ends

2018-03-03

[16:50:22] ule: Hey guys
[16:50:42] ule: I'm trying to think a way to transoform this: ["A/B/C/", "A/B/D/", "A/B/E/", "A/F/G/"] to "A": {"B": {"C", "D", "E"}, "F": {"G"}}
[16:51:01] ule: basically, path to tree
[16:52:04] ule: The code I have so far makes some magic to create that: ["A/B/C/", "A/B/D/", "A/B/E/", "A/F/G/"]
[16:52:42] ule: I'm trying to think on this next step
[16:53:41] ule: lupine: exactly, assuming that my input will change dinamically
[16:54:15] ule: man, I feel so stupid for getting stuck at algorithms like this. It must be basic stuff from CC courses no?
[16:56:55] ule: apeiros: right, let me start easy
[16:57:04] ule: lupine: right
[16:57:52] ule: I guess I need to group by levels
[16:58:07] ule: using .split will give me this level, 0,1,2
[16:58:19] ule: then I need to create this hash based on levels
[17:02:49] ule: lupine: dammit, you were fast
[17:03:09] ule: let me study your code
[17:04:08] ule: lupine: why not?
[17:04:45] ule: apeiros lupine havenwood whats the secret to mastering on problems like this?
[17:05:12] ule: Can I get to your level or it is something just for people with IQ > 160
[17:06:07] ule: persiscense
[17:08:14] ule: this is awesome, thank you very much guys
[17:13:09] ule: tree data structure
[17:13:44] ule: I know there are some websites with some trick questions like that so people can solve
[17:13:58] ule: then they compare each algorithm based on efficiency
[17:14:17] ule: I don't remember which website though, but I remember seeing something like that
[17:26:03] ule: havenwood: O_o
[17:35:06] ule: tom__: https://repl.it/repls/StableCuddlySysadmin

2018-02-27

[19:35:19] ule: you can do this via varnish/nginx as well

2018-02-21

[14:03:22] ule: Hey guys, I have a situation here like this file:
[14:03:24] ule: https://github.com/lukkry/active_record_shards_test/blob/5feda3bd707a99e41d23272b4674fbad6e6a3651/db/migrate/20130929141909_create_accounts.rb#L2
[14:04:06] ule: How can I put this line on the ActiveRecord::Migration class in this way where I don't need to put this shard(:none) on all migration files?
[14:04:18] ule: A kind of MonkeyPatch on this Migration class
[14:04:55] ule: Whats the best way to do this? Creating my own "BaseMigration" and extend this from ActiveRecord::Migration?
[14:06:43] ule: How would you do?

2018-02-09

[16:15:52] ule: then the browser will think its a different image and will download again
[16:39:01] ule: that might be correct
[16:39:25] ule: so, save the cropped image with a different name