Activity Graph

Page 1 of 3 | Next »


[00:56:33] IGnorAND: *.net *.split
[01:13:39] IGnorAND: has joined #ruby


[22:21:23] IGnorAND: Ping timeout: 244 seconds
[22:58:29] IGnorAND: has joined #ruby


[14:52:18] IGnorAND: I have several rules I want to check on. I made different classes (check_if_starts_with_dash, check_if_ends_in_dash, check_minimum_length, check_maximum_length etc) Would it make sense to make these self functions so I dont instantiate the objects
[14:54:21] IGnorAND: havenwood: yeah, trying to apply ruby logic to php. php has no modules.
[14:54:29] IGnorAND: well, not in the same sense
[15:00:10] IGnorAND: havenwood: thanks


[12:27:02] IGnorAND: Quit: ZNC 1.7.3 - https://znc.in
[12:28:23] IGnorAND: has joined #ruby
[16:55:20] IGnorAND: Quit: ZNC 1.7.3 - https://znc.in
[17:33:53] IGnorAND: has joined #ruby
[22:51:53] IGnorAND: Quit: ZNC 1.7.3 - https://znc.in
[23:28:21] IGnorAND: has joined #ruby




[17:55:11] IGnorAND: anyone try lambda @ aws? I get Ignoring nokogiri-1.10.3 because its extensions are not built. Try: gem pristine nokogiri --version 1.10.3
[19:53:27] IGnorAND: havenwood: guess I'll download sam then
[19:54:52] IGnorAND: I did bundle install --path vendor/bundle && zip -r $1.zip $1.rb vendor && aws-v3.rb lambda update-function-code --function-name $1 --zip-file fileb://$1.zip
[20:41:34] IGnorAND: havenwood: did you install sam etc?
[21:37:53] IGnorAND: havenwood: removed python2, 3 and installed pyenv, installed the aws bundle. so much change


[11:08:57] IGnorAND: What does & mean in to_xml(options={}, &block)
[11:11:39] IGnorAND: do you mean foo.to_xml(options, &block)?
[11:12:47] IGnorAND: what happens if I do @someblock = "" foo.to_xml({option1: true, option2: false}, @someblock)
[11:13:05] IGnorAND: if I were to implement the function to_xml, how do I get ""?
[11:20:33] IGnorAND: ytti: foo.to_xml(options) is a statement. I don't understand what {some_code} is. Is it part of the statement.
[11:21:09] IGnorAND: ytti: is there a term for the & sign in this case
[11:21:41] IGnorAND: it differs from (true && false) and from foo.(&:map)
[11:22:06] IGnorAND: foo.map(&:somemethod)*
[11:26:09] IGnorAND: ytti: its not a second argument that is expected?
[11:26:25] IGnorAND: have you ever implemented a function with such a signature?
[11:26:35] IGnorAND: can I pass this to the next method?
[11:27:17] IGnorAND: def to_xml(options, &block) someobject.you_do_the_work(options, &block)
[11:28:23] IGnorAND: I want to not run .call on the block, but send it to a different method to push it
[11:28:37] IGnorAND: def to_xml(options, &block)
[11:28:40] IGnorAND: someobject.you_do_the_work(options, &block)
[11:30:12] IGnorAND: def to_xml(options, &block)
[11:30:17] IGnorAND: someobject.you_do_the_work(options, block)
[11:30:22] IGnorAND: like this then?


[11:48:29] IGnorAND: I am able to do MyObject.first.to_xml, but not MyObject.all.to_xml How do I go about making that possible?
[12:05:57] IGnorAND: NL3limin4t0r: I am using tilt
[12:07:36] IGnorAND: NL3limin4t0r: no dice.
[17:44:07] IGnorAND: nope, everyone left


[12:21:25] IGnorAND: MrCrackPot: and what happens if the user logs in twice a day? :)
[12:21:53] IGnorAND: MrCrackPot: I find that optimizing for speed like this just complicates stuff
[12:22:06] IGnorAND: also the db is faster at finding than a cronjob is
[12:23:07] IGnorAND: Easist thing to do is create a view where expires <= today and run the cron on the view
[12:23:50] IGnorAND: also expires is datetime, you are comparing it with date which means today and HH=00, MM=00, SS=00
[21:21:12] IGnorAND: jarr0dsz: would your application break if it was availble?
[21:32:39] IGnorAND: you mean 'rails console'?


[01:25:08] IGnorAND: ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::InvalidMessage Caused by: ArgumentError: key must be 16 bytes <- I cant find any posts about this for ruby 2.5.3 and rails 5.2.3


[01:36:43] IGnorAND: ACTION is going crazy with these rails deps. 
[01:36:45] IGnorAND: I keep getting uninitialized constant
[01:36:57] IGnorAND: The gems exist
[01:42:54] IGnorAND: sevenseacat: well, I'm still troubleshooting what's wrong here
[01:43:04] IGnorAND: just needed to rant
[01:43:25] IGnorAND: NameError: uninitialized constant FactoryBot
[01:43:51] IGnorAND: Just then it was my shouldamatchers. I commented those out and then this appears
[01:43:59] IGnorAND: there must be something wrong
[01:44:39] IGnorAND: and I do a bundle install --with development test and yet :S
[01:45:33] IGnorAND: I think the gems arent including their dependancies
[01:50:38] IGnorAND: added a require 'factory_bot' and its gone, now I have a undefined local variable or method `shouldaDatabaseCleaner'. sigh



[09:43:14] IGnorAND: MrCrackPotBuilde: its not a self signed cert. its actually a public signed one. Chrome gives me no output
[09:45:19] IGnorAND: MrCrackPotBuilde: btw, if you do bundle install --with test it does not run the development. Just thought I'd correct you on that
[10:03:28] IGnorAND: MrCrackPotBuilde: I'll have to update my puma to generate it. lemme check
[10:10:26] IGnorAND: MrCrackPotBuilde: https://i.postimg.cc/qRWnRQxj/Screen-Shot-2019-06-24-at-7-08-46-AM.png
[10:11:31] IGnorAND: MrCrackPotBuilde: this is what I get in my console: SSL error, peer:, peer cert: , #<Puma::MiniSSL::SSLError: OpenSSL error: error:141F7065:SSL routines:final_key_share:no suitable key share - 337604709
[10:12:13] IGnorAND: I now use gem 'puma', '~> 3.12', ref: '27a09c4e7c0e04bc25a515388b6b8a55fa332ad5'
[10:25:54] IGnorAND: MrCrackPotBuilde: bind "ssl://#{ip_addr}:#{port}?key=#{ssl_key}&cert=#{ssl_cert}"
[10:26:05] IGnorAND: ssl_key = '/etc/letsencrypt/live/privkey.pem'
[10:26:08] IGnorAND: ssl_cert = '/etc/letsencrypt/live/fullchain.pem'
[10:27:19] IGnorAND: MrCrackPotBuilde: seems like its the same
[10:28:42] IGnorAND: MrCrackPotBuilde: https://pastebin.com/RcVgVt6z
[10:29:54] IGnorAND: MrCrackPotBuilde: it has no issues in FF
[10:29:55] IGnorAND: just chrome
[10:30:09] IGnorAND: It's NOT self signed
[10:30:24] IGnorAND: its a letsencrypt ssl cert
[10:31:37] IGnorAND: MrCrackPotBuilde: it *is* that issue
[10:31:49] IGnorAND: I think I already mentioned that
[10:32:36] IGnorAND: read the last part of the link you just sent :)
[10:32:52] IGnorAND: 'not working even with the master branch.'
[10:33:19] IGnorAND: the gem is cut without the solution
[10:34:12] IGnorAND: MrCrackPotBuilde: nope, gem 'puma', git: 'https://github.com/eric-norcross/puma.git', branch: 'chrome_70_ssl_curve_compatiblity' still has the issue
[10:34:18] IGnorAND: gem 'puma', '~> 3.12', ref: '27a09c4e7c0e04bc25a515388b6b8a55fa332ad5' solves it
[10:34:46] IGnorAND: or was it the other way around
[10:35:23] IGnorAND: I am *NOT* using a self signed cert
[10:35:45] IGnorAND: with a valid domain name
[10:37:08] IGnorAND: MrCrackPotBuilde: ? It works in production with the correct ref...
[10:45:27] IGnorAND: Ping timeout: 264 seconds
[11:59:00] IGnorAND: has joined #RubyOnRails
[11:59:34] IGnorAND: has joined #ruby


[10:08:53] IGnorAND: MrCrackPotBuilde: I have access to a db which restricts on ip. I'd like to run my test on my ci, but that means I eaither need access to the db from my ci or I need to somehow mock the db
[16:54:55] IGnorAND: ZAJDAN: well, I currently have some issues with puma and chrome
[16:55:52] IGnorAND: https://github.com/puma/puma/issues/1670
[17:43:38] IGnorAND: @ZAJDAN I ussually dont have an issue with puma. this just seems to affect chrome thuogh
[19:18:06] IGnorAND: ZAJDAN: I believe almost everyone uses nodejs these days
[19:18:16] IGnorAND: you can check google to compare popularity


[16:02:31] IGnorAND: When running bundle install --jobs 20 --retry 5 --without development, why do I get "Gems in the groups development and test were not installed."
[16:02:47] IGnorAND: it should install test right?
[23:54:41] IGnorAND: how do you test something that depends on a db you have read access to from specific ip? do you copy the db or at least some entires into your test env?


[11:42:11] IGnorAND: if one changes the master.key, can one just create a new rails credentials:new? or is it lost forever? also do we use the same master.key for dev and production?


[20:36:08] IGnorAND: Sigh, I have uninitialized constant RSpec in my docker. I'm quite sure rspec-rails is installed. which has the rspec gem as a dependancy


[14:37:40] IGnorAND: is there a way to get all set variables?
[14:38:00] IGnorAND: I'm trying to figure out the params I can set in capistrano without going through the whole library
[14:38:29] IGnorAND: something like .methods
[14:39:37] IGnorAND: @havenwood I figured out I could do a #{fetch(:stage)} to figure out if its production or acceptance or testing
[14:39:46] IGnorAND: I now want the release_name
[14:40:08] IGnorAND: havenwood: yeah
[14:41:11] IGnorAND: local_variables seems to give me the vars of my capistrano task
[14:48:57] IGnorAND: havenwood: like I said, it seems to give me the values of my lib/capistrano/tasks/custom_tasks.rb and not of the parent object
[14:52:27] IGnorAND: havenwood: lemme check with a variable I know
[14:52:40] IGnorAND: It seems to return expression
[14:52:54] IGnorAND: puts defined? :stage
[14:53:50] IGnorAND: havenwood: release_name doesnt exist. I am looking for the variable
[14:54:20] IGnorAND: fetch(:stage) returns production/testing/acceptance, fetch(:release_name) returns nil
[14:54:36] IGnorAND: havenwood: that's the problem. I dont know. I am trying to look for the variables :)
[14:57:10] IGnorAND: havenwood: https://github.com/capistrano/capistrano/blob/220db8fabab15b9d5cd5c9ab1f2744e0aa346eb0/lib/capistrano/setup.rb#L22 This is where I found stage
[14:59:00] IGnorAND: havenwood: I am trying to make a custom capistrano task.
[14:59:34] IGnorAND: Capistrano does some magic, and I can make a task by adding a file to lib/capistrano/tasks/task_name.rb
[15:00:27] IGnorAND: I want the value of the release_name: https://capistranorb.com/documentation/getting-started/structure/
[15:05:27] IGnorAND: havenwood: there is no mention of :stage either. But yes, it is formed by a unix timestamp. https://www.freelancingdigest.com/articles/capistrano-variables/ here you see examples of supposed variables that should exist
[15:10:46] IGnorAND: xco: they are. you need to chose one
[15:11:01] IGnorAND: xco: A discussion on the merits of both alternative styles can be found here.
[15:11:22] IGnorAND: xco: Adopt a consistent multi-line method chaining style. There are two popular styles in the Ruby community, both of which are considered good - leading . and trailing
[15:14:03] IGnorAND: xco: they state "adopt one, and stick with it" and then continue to explain both.
[15:14:29] IGnorAND: xco: and make a .rubocop.yml to change the opinion :P
[15:15:15] IGnorAND: xco: with what do you agree?
[15:15:57] IGnorAND: xco: everyone makes their own style guide. This guide is to help you create one


[03:48:59] IGnorAND: Quit: ZNC 1.7.3 - https://znc.in
[03:54:15] IGnorAND: has joined #ruby
[16:49:27] IGnorAND: has joined #RubyOnRails
[16:50:24] IGnorAND: Anyone know which puma I can use to circumvent this? https://github.com/puma/puma/issues/1670 I'm trying gem 'puma', '~> 3.12', :ref => '27a09c4e7c0e04bc25a515388b6b8a55fa332ad5'


[16:00:13] IGnorAND: has joined #ruby


[21:50:19] IGnorAND: Ping timeout: 264 seconds


[13:17:20] IGnorAND: anyone try http://jsonapi-rb.org/ has_many :comments data seems to yield no attributes for the comments.


[14:11:47] IGnorAND: Can one add two keys in one line to a hash?


[19:28:43] IGnorAND: my capistrano hates me
[20:49:20] IGnorAND: carbone5: whats the issue?
[20:49:34] IGnorAND: Anyone know why I get the following: Mysql2::Error: Unsupported charset: '"unicode"'
[20:49:44] IGnorAND: Didn't do anything special on the mysql side
[20:49:55] IGnorAND: but I can't believe it doesnt support unicode out of the box
[20:53:31] IGnorAND: nevermind, pgsql supposrts unicode, mysql supports utf16
[21:09:39] IGnorAND: I don't see how receipt matters.
[21:09:52] IGnorAND: are you sure its receipt's validations that are your problem?


[12:30:15] IGnorAND: MrCrackPotBuilde: did you solve it?
[15:14:45] IGnorAND: @MrCrackPotBuilde I am trying uilding with api as well
[15:16:06] IGnorAND: @MrCrackPotBuilde I think you're confused


[01:38:57] IGnorAND: doesn't master become in the next stable release? so in your case 6.1?
[16:13:45] IGnorAND: Is there an environment variable available in the database.yml which I can use to name a db?
[16:37:49] IGnorAND: I found Rails.env Caerus, thanks anyway
[22:57:50] IGnorAND: MrCrackPotBuilde: you only have an address migration, there is no actual 'addressable table'
[22:59:29] IGnorAND: MrCrackPotBuilde: also the address table has a addressable_type and addresseable_id (indicating if its a person/company etc and its id)


[00:47:14] IGnorAND: Anyone know why we need to run spring stop? https://teamtreehouse.com/community/unable-to-generate-rspec-using-this-command-rails-generate-rspecinstall I'm on ruby 2.5.3p105 and I have this issue with a new project (rails 5)
[03:11:58] IGnorAND: I have a Class Room which has a certain amount of beds. I want to keep track when beds get added/removed. Do I make a Table room with column name and a Table BedTransactions with bed:references count:integer?


[18:49:53] IGnorAND: I have an array of Hashes. I want to do a .map on the array, but I need to add something to each hash beforehand.
[18:50:15] IGnorAND: Writing this down makes me think maybe I should just split it in several lines of code instead of making one complex line of code


[11:39:42] IGnorAND: When assigning an int we use _ to make the integer readable. If I have money in cents, would it make sense to write 10K as 10_000_00 or do I need to write it as 1_000_000?
[17:13:32] IGnorAND: How do I write a method to accept 2 parameters although I will only use 1 parameter in that method
[18:18:16] IGnorAND: jettrevolver: nah, I get a warning from rubocopy that I'm not using the parameter eventhough I ask for it
[18:18:41] IGnorAND: jhass: yeah, but rubocop doesn't like that :)
[18:18:58] IGnorAND: havenwood: I use a hash
[18:19:11] IGnorAND: def self.cap(taxable: 0, payment_frequency: 12)
[18:19:26] IGnorAND: in one object I use taxable to calculate something
[18:19:34] IGnorAND: in the other I use payment_frequency
[18:19:46] IGnorAND: they should be ducktypes of each other
[18:20:50] IGnorAND: TaxDisk1.cap(a: 'value' b: 'value2') { do something with a} TaxDisk2.cap(a: 'value' b: 'value2') { do something with b}
[18:29:30] IGnorAND: havenwood: https://pastebin.com/WAU7Dvnp


[10:11:15] IGnorAND: @weaksauce I want an API app. However not all my data comes from a database. I have an external app with clients. I want to use this list of clients in my app. So when I do a GET /clients I want to call the index method in the controller which should perform an request on the other app instead of on the db.
[10:38:03] IGnorAND: My api however currently gives me a response with a data and meta hash. In the data I have an array of clients. I have been able to do the api request, however I want to output my code as JSON too, so I was thinking of using something like jsonapi. And I am somewhat succesful, but I feel I am doing something wrong
[10:38:05] IGnorAND: https://gist.github.com/nuheluxulu/7de68bd8968b96d970b5cc83c7edac48#file-clients_controller-rb-L9


[00:41:52] IGnorAND: figured it out, my require needs small letters, the code needs capitalized letters
[21:28:58] IGnorAND: sigh, I feel like I'm driving myself crazy
[21:30:34] IGnorAND: An app has an api which returns a JSON response. I made a gem to send a request to the app and get the response. Now I want to use this gem to return a JSON response in a different app. Does my model do the call to the gem? Do I then convert it to JSON in my controller?


[17:31:05] IGnorAND: What does one need to do to not write FactoryBot.build in my spec, but write build? I thought the rails_helper should've 'solved' that
[19:00:25] IGnorAND: I have a class with a lot of attributes. Is there a way to shorten my initializer. I do @account_key = opts[:account_key] for every attribute (where account_key is the first of many attributes)
[23:45:53] IGnorAND: I made my first ever gem, my tests work, but when I add it to another app, I get missing gem which is in my gemspec
[23:53:05] IGnorAND: Looks like this, but am missing an external dep https://stackoverflow.com/questions/27790712/making-a-ruby-gem-cannot-load-such-file


[19:17:24] IGnorAND: havenwood: :) Long time no see
[19:17:35] IGnorAND: I have a question you might be able to answer :)
[19:18:40] IGnorAND: I'm trying to cut a gem and created another class. I however now get a message uninitialized constant Gemname::Gemname::ClassICreated
[19:18:47] IGnorAND: I'd like to read about what this means
[19:18:53] IGnorAND: been searching for ruby and ::
[19:19:52] IGnorAND: much better keywords than ruby gem cutting class which gives me lectures on how to cut stones
[22:32:37] IGnorAND: @asat thanks
[22:32:51] IGnorAND: @havenwood Thanks


[18:04:50] IGnorAND: Does everyone run the db on their local pc when developping?
[20:50:38] IGnorAND: hahuang65: so no db on your pc, just on the docker?
[20:52:10] IGnorAND: does docker run on your pc?
[20:52:31] IGnorAND: or is that a vm that runs docker?



[01:02:24] IGnorAND: https://gist.github.com/nuheluxulu/7c425025a503c50b991bab75659d64be Anyone understand why Node doesn't see the **opts in the initialize?
[01:08:18] IGnorAND: I have a weird hash though: {"node"=>"my_node", "mem"=>65118486528, "cpu"=>0.0878811061129038, "maxcpu"=>16, "id"=>"node/my_node", "status"=>"online", "type"=>"node", "level"=>"", "maxmem"=>84452896768, "disk"=>4445147136, "uptime"=>27682668, "maxdisk"=>38836535296, "ssl_fingerprint"=>"0E:C1:C1:ED:54:33:CD:8D:D0:31:FF:42:DF:21:8A:4D:9E:CB:1D:22:FE:CD:4C:E9:F7:77:0B:EB:60:5E:A5:83"}


[02:27:11] IGnorAND: I seriously need to go read up on rspec with context/describe and let. I'm getting errors because my let isn't being executed :(


[10:14:11] IGnorAND: I am using a namespace in my class, and am using Rails.application.credentials. but it seems to prefix it with my custom namespace.
[10:14:44] IGnorAND: Is there a way to tell it not to use my namespace?
[10:15:07] IGnorAND: I get uninitialized constant Mynamespace::Rails
[10:33:47] IGnorAND: want the source code?
[10:34:49] IGnorAND: leftylink: https://gist.github.com/nuheluxulu/4f9422c7d7953436aa60f992fa78bd19
[21:15:22] IGnorAND: anyone know how to get the values of bin/rails credentials:view in a poro? Rails.application.credentials.foo will access the value of foo in rails
[21:15:54] IGnorAND: has joined #RubyOnRails
[21:16:00] IGnorAND: anyone know how to get the values of bin/rails credentials:view in a poro? Rails.application.credentials.foo will access the value of foo in rails


[21:50:31] IGnorAND: is !empty? considered better than .length > 0
[22:16:32] IGnorAND: phaul: thanks, rubocop told me to change it so I did, but thought it was more efficient to do a comparison on length. expressive and allowing objects to figure it out seem like good arguments.
[22:16:57] IGnorAND: Anyone know how to refactor this: https://gist.github.com/nuheluxulu/dd89a5551b2071795b663137ae3a8f10 I did the rescue to place default values
[22:18:23] IGnorAND: would I have to write a private attr_writer for the arguments?
[22:23:18] IGnorAND: phaul: typo.
[22:23:38] IGnorAND: 14-18 can be deleted
[22:24:01] IGnorAND: @page = opts[:page].is_a? Integer ? Integer(opts[:page]) : 1 <- this would be a one liner, but doesn't really make it more expressive
[22:27:13] IGnorAND: meh, that doesnt even work :(
[22:28:31] IGnorAND: phaul: that's the code I had before
[22:28:49] IGnorAND: &>> @page = Integer(opts[:page]) rescue 1
[22:30:14] IGnorAND: phaul: Integer("seven") would fail
[22:31:49] IGnorAND: can I do set_page(opts[:page]) and do a def set_page(page_number) with the begin rescue etc there?
[22:45:47] IGnorAND: I was thinking of doing that as well, but then again stop errors as soon as possible?
[22:49:43] IGnorAND: @shalok "".method(:is_a?).arity
[22:51:57] IGnorAND: &ri Method#arity might be what interesting
[22:52:18] IGnorAND: phaul: I suppose



[17:06:11] IGnorAND: has joined #ruby


[01:00:11] IGnorAND: http://rubymoney.github.io/money/ Why would one use money-rails instead of plain money? I can't see why rails would need more than just money
[12:05:25] IGnorAND: @leftylink I decided to use money so I don't have integers anymore :)
[12:05:28] IGnorAND: &>> puts "test"


[16:46:30] IGnorAND: ryouba: so we make mistakes together :)
[16:54:32] IGnorAND: which gem are you using?
[17:52:37] IGnorAND: Would you do a raise 'domain name too long' unless @domain_name <=70 for https://www.namecheap.com/support/api/methods/domains/get-info.aspx
[18:12:00] IGnorAND: @baweaver law would be a string word. I'd think of guidelines
[18:12:43] IGnorAND: but I have weird questions coming from static typed langues
[18:13:43] IGnorAND: @baweaver I'm somewhere with a bycicle with spare parts, I think about halfway through
[18:14:19] IGnorAND: I'm trying to initialize all my classes with a hash
[18:14:42] IGnorAND: trying to do the post_initialize_hook for subclasses
[18:15:02] IGnorAND: but I'm writing rails, or at least I think I was, but I somehow got all the way too plain ruby
[18:15:38] IGnorAND: Russ Olsen?
[21:55:57] IGnorAND: barg: there is something called sockets. I think rails does this with cable or something
[21:56:30] IGnorAND: don't think it matters
[21:56:36] IGnorAND: a socket is a socket
[21:57:14] IGnorAND: require 'socket'
[21:58:54] IGnorAND: https://www.tutorialspoint.com/ruby/ruby_socket_programming.htm looks like it explains
[22:04:29] IGnorAND: I have a person has_many :organizations, through: :employments and organization has_many :employees, through: :employments. This results in Organization.first.employees.first being a person. It seems to make more sense to call Organization.first.employments.first and add functions such as wages etc there. My naming is screwed I think
[23:41:10] IGnorAND: how do I force ruby to divide but give me a double instead of an integer
[23:42:17] IGnorAND: all I see is .to_f