marz_d`ghostman

Activity Graph

Page 1 of 3 | Next »

2019-06-18

[09:59:49] marz_d`ghostman: has joined #ruby
[13:30:19] marz_d`ghostman: Ping timeout: 256 seconds

2019-06-15

[08:38:44] marz_d`ghostman: has joined #ruby
[08:42:50] marz_d`ghostman: In ActiveRecords association, say I have a table BookType that contains a few values that will be referenced in a :book_type of another table say Book. Will the relationship be `Book has_one book_type or book_type has_and_belongs_to_many Book?
[18:59:17] marz_d`ghostman: Ping timeout: 256 seconds

2019-06-14

[14:45:32] marz_d`ghostman: has joined #ruby
[19:51:31] marz_d`ghostman: Ping timeout: 256 seconds

2019-06-13

[12:06:09] marz_d`ghostman: has joined #ruby
[12:06:36] marz_d`ghostman: Anyone using the country_select gem? How do validate that the value passed to the attribute of a model is within the values defined in the gem?
[15:03:11] marz_d`ghostman: Ping timeout: 256 seconds

2019-06-09

[07:04:45] marz_d`ghostman: Ping timeout: 256 seconds

2019-06-08

[08:57:20] marz_d`ghostman: In rails model, say I only ask for password when the user is_admin?, where should I declare it? in the migration? and just do a `has_a_secure_password if: :is_admin?`?

2019-06-07

[06:53:04] marz_d`ghostman: has joined #ruby
[06:53:41] marz_d`ghostman: I'm storing a set in redis and wants to add/remove a value from the set every now and then. The set is quite big, is set.delete() the best way to pop a value/element from the set? or is there a more efficient way to do it?
[07:24:27] marz_d`ghostman: dminuoso: echo $GEM_PATH
[07:24:41] marz_d`ghostman: It may contain multiple paths separated by ':'
[07:40:36] marz_d`ghostman: havenwood: Is there a way for me to define a Set that doesn't get garbage collected? I want it to exist as long as my app is running.
[07:43:47] marz_d`ghostman: I'm playing around redis, instead of a database(postgres, mysql, etc.). I'm trying to store my data as hashes in redis. But I have to manually keep an index for all data like having a set "Customers" "#{comma separated ids}".
[07:44:24] marz_d`ghostman: So I want to have a persistent set to add and remove the ids instead of invoking redis each time an id gets added or removed.
[07:50:51] marz_d`ghostman: use path --path
[07:51:36] marz_d`ghostman: dminuoso: If it helps, I use `bundle install --path .bundle` to install all app specific gems under the same directory of the app
[07:52:43] marz_d`ghostman: havenwood: thanks, now I just need to think of the best place to define this set.
[09:10:39] marz_d`ghostman: With inheritance, how do I force all subclasses to set a value to inherited attributes?
[09:14:20] marz_d`ghostman: dminuoso: Say I have a class named Animal. Then I have a subclass Dog. Dog inherits from Animal. Animal has an attribute :name, which will be inherited by Dog. I want force Dog to set a value to :name or raise an error when it doesn't
[09:17:25] marz_d`ghostman: dminuoso: hmm, say when an instance of Dog is created, but the inherited :name attribute isn't set.
[09:18:33] marz_d`ghostman: In Java, there's this mechanism where at compile time, it throws an error because an inherited method or attribute isn't defined.
[09:21:54] marz_d`ghostman: dminuoso: I see. It's a bit of work to require everything inside initialize() when there's a couple of subclasses already. Hmmm, should look into Mixins, perhaps I could set it there with: https://gist.github.com/marzdgzmn/5e6771bcf4f44451c854ed3ada018bca
[10:42:31] marz_d`ghostman: What minitest hook does a code get triggered after every test, not after every suite? def after; code end doesn't seem to be invoked every after test

2019-06-02

[07:17:55] marz_d`ghostman: Ping timeout: 256 seconds

2019-05-31

[07:56:25] marz_d`ghostman: has joined #ruby
[07:56:52] marz_d`ghostman: In minitest, is there a like after(:all) testwide function? like I want to invoke a method after all tests/* is run
[12:01:52] marz_d`ghostman: havenwood: yeah thanks, I just needed to place it under test_helper. I was using it but was placing it under a specific test file, silly me. :)

2019-05-29

[13:49:35] marz_d`ghostman: has joined #ruby
[13:54:05] marz_d`ghostman: Aside from Heroku, what other viable good options do you deploy ruby/ror apps?
[19:58:47] marz_d`ghostman: Ping timeout: 256 seconds

2019-05-27

[06:40:16] marz_d`ghostman: has joined #ruby
[06:40:30] marz_d`ghostman: Using minitest, is there a method to run a code before all tests in a test class?
[07:37:45] marz_d`ghostman: skarlso: I'm looking at something like the before(:all) of rpec. Those I think run before/after every test
[07:41:48] marz_d`ghostman: skarlso: thanks, I'll look into it. As for the after(:all), I'm currently using Minitest.after_run { } :)
[07:43:20] marz_d`ghostman: Ah, I need to run this with spec/describe
[10:40:15] marz_d`ghostman: Ping timeout: 256 seconds

2019-05-23

[12:59:29] marz_d`ghostman: Ping timeout: 256 seconds

2019-05-22

[09:23:11] marz_d`ghostman: How do I remove characters like "\xe2\x80\x8b" in strings?
[10:16:43] marz_d`ghostman: '@gmail.com<U+200B>'.encode(Encoding.find('ASCII'), {:invalid => :replace, :replace => ''}) doesn't seem to remove the <U+200B> unicode, how do I remove it?

2019-05-21

[08:20:45] marz_d`ghostman: has joined #ruby
[08:21:12] marz_d`ghostman: Is there some sort of abstract class in Ruby like the one I'm trying to implement: https://gist.github.com/marzdgzmn/b0891dbb77722e46ec99ea9b1e37a9af
[08:21:17] marz_d`ghostman: Is it a good practice though?
[08:43:44] marz_d`ghostman: jhass: I see, so I'll have the module inheret the first class then use it as a Mixin?
[09:02:15] marz_d`ghostman: jhass: Hmmm. I was meaning to inherit podio::item's methods but also PodioAbstractItem's.
[09:14:00] marz_d`ghostman: jhass: It'a gem my app is dependent on. Makes it tricky to test since my class depends on it
[09:15:13] marz_d`ghostman: I can't see an isolated way to test PodioAbstractItem's fetch_all_items method given it class Podio::Item's method. Hmmm, maybe mock/stub Podio and expect that it is invoked.

2019-05-20

[01:04:27] marz_d`ghostman: has joined #ruby
[01:05:00] marz_d`ghostman: In rails, instead of defining a global variable under initializers/, is there a different mechanism perhaps a constant that I can do so I can initialize once and use it anywhere?
[09:11:43] marz_d`ghostman: Quit: Page closed

2019-05-16

[10:32:28] marz_d`ghostman: has joined #ruby
[10:34:56] marz_d`ghostman: In rails, I'm trying to initialize a variable: config.podio_client_id = ENV['PODIO_CLIENT_ID'] in environments/development.rb. When I run rails s -e development, it appears to be initialized but when I run rails console, the variable doesn't seem to be initialized even if I run rails console -e development. Am I missing something here?
[10:36:50] marz_d`ghostman: Nvm, it seems to be a spring issue
[18:23:45] marz_d`ghostman: Ping timeout: 256 seconds

2019-05-14

[03:51:10] marz_d`ghostman: has joined #ruby
[03:52:37] marz_d`ghostman: I have model say Customer, with initialize() parameters of (id, first_name, last_name, email, organization, phone, notes) but rubocop is saying I shouldn't have more than 5 parameters. What's the best way to refactor this?
[03:53:17] marz_d`ghostman: Calls to the initialize/.new() gives the ABC error from rubocop
[05:41:00] marz_d`ghostman: havenwood: I'm using keyword arguments, hence: item_id: name:, etc., but it's more than 5 parameters, is there an idiomatic way for it in ruby?
[05:42:19] marz_d`ghostman: havenwood: Ah I see, thanks I'll just ignore it then, including the ABC warning hehe
[05:43:31] marz_d`ghostman: Out of topic, I've stumbled upon this language: Elixir, which is very ruby-like. Are you into that as well?
[05:45:20] marz_d`ghostman: havenwood: Ah, nice. You're trying to integrate Elixir's power into Ruby, hehe
[05:46:19] marz_d`ghostman: I'm not that very efficient with Ruby, but I've tried it and it's a bit challenging to think in a functional paradigm. I haven't delved deep into it, but I already like it as well haha
[06:21:35] marz_d`ghostman: Is there a different scope for controllers in Rails? I have something initialized during bootup, but it appears it isn't when it comes to the controller.
[06:22:41] marz_d`ghostman: I have it initialized under config/initializers/ https://gist.github.com/marzdgzmn/e1b979f19cf6b1b4f66f04cf31c354fe. My models can access it, but it's nil when accessing via controllers.
[06:30:27] marz_d`ghostman: havenwood: So in initializer I have that code. Then under controller I tried to `puts` to test it's connection via Podio.connection.nil? and it is nil. I did the same thing under initializer where I `puts` the same thing and it isn't in there
[06:49:50] marz_d`ghostman: havenwood: I don't think so, I just have this on my controller: https://gist.github.com/marzdgzmn/b96ec27971e789da60a55e2ce48b5f29
[06:52:44] marz_d`ghostman: havenwood: Ah, yeah, I'm using Puma
[06:53:24] marz_d`ghostman: havenwood: Is there a way for me to cascade that initialized Podio to every thread created to handle requests?
[06:53:38] marz_d`ghostman: havenwood: I just got it, so Puma creates a different thread for every request received.
[06:55:29] marz_d`ghostman: havenwood: Is there a way to cascade the initialized Podio out to the threads?
[06:58:36] marz_d`ghostman: havenwood: Wouldn't that be slow, given multiple requests. It will always try setting up the connection each time a request is received
[06:59:15] marz_d`ghostman: havenwood: fiber-local, now that's a new term for me. Have to search for that :)
[08:01:56] marz_d`ghostman: havenwood: thanks, I'll try that.
[10:17:41] marz_d`ghostman: What's the best architecture for an app to constantly receive updates from another app? Does redis pub/sub a good fit?
[15:04:57] marz_d`ghostman: z64: Ah kafka seems nice. I'm not that familiar with unix sockets though
[18:43:47] marz_d`ghostman: Ping timeout: 256 seconds

2019-05-07

[06:14:08] marz_d`ghostman: has joined #ruby
[07:43:43] marz_d`ghostman: What's the best way to mock a object that is connected to an external service that will be my source of data for the app?
[07:44:03] marz_d`ghostman: Is it good practice to place it in spec_helper?
[17:56:19] marz_d`ghostman: Ping timeout: 256 seconds

2019-04-18

[09:13:54] marz_d`ghostman: has joined #ruby
[09:14:10] marz_d`ghostman: I have a string with \n in it. How do I get erb to parse that and display a new line?
[13:23:23] marz_d`ghostman: Ping timeout: 256 seconds

2019-04-11

[08:06:48] marz_d`ghostman: has joined #ruby
[08:07:48] marz_d`ghostman: In rails, it doesn't seem that running rails credentials:edit and saving it doesn't seem to be included when dockerizing it.
[08:08:02] marz_d`ghostman: How do I find the file so I can save it along in docker?
[09:52:09] marz_d`ghostman: Ping timeout: 256 seconds

2019-04-08

[18:49:04] marz_d`ghostman: has joined #ruby
[18:49:24] marz_d`ghostman: If I'm running rails with puma, which is the default, will I need nginx or apache?
[18:51:12] marz_d`ghostman: havenwood: so having rails server -e production would suffice?
[18:52:01] marz_d`ghostman: havenwood: Ah, I see what your saying now.
[18:59:13] marz_d`ghostman: havenwood: I agree, I'm currently running my rails app inside docker and setup nginx on this server
[18:59:33] marz_d`ghostman: havenwood: A real pain setting it up :)
[20:58:17] marz_d`ghostman: Quit: Page closed

2019-04-04

[08:38:02] marz_d`ghostman: has joined #ruby
[08:42:35] marz_d`ghostman: Ping timeout: 256 seconds

2019-03-29

[05:31:27] marz_d`ghostman: Quit: Page closed
[06:34:53] marz_d`ghostman: has joined #ruby
[06:35:24] marz_d`ghostman: Has anyone tried developing a video streaming web app via RTSP? WHat tech stack did you use?
[08:15:25] marz_d`ghostman: Ping timeout: 256 seconds

2019-03-28

[14:47:07] marz_d`ghostman: has joined #ruby

2019-03-26

[13:55:39] marz_d`ghostman: Quit: Page closed

2019-03-25

[00:06:07] marz_d`ghostman: has joined #ruby
[00:06:27] marz_d`ghostman: Anyone using the redis-rb gem? How do you display the actual command after getting an error?
[04:12:24] marz_d`ghostman: I have a hash whose key value pairs corresponds to an instance variables. How do I instantiate an object by iterating through a hash? e.g. https://gist.github.com/marzdgzmn/085808bc45267a9beafc9b11b4e92f14

2019-03-20

[06:10:19] marz_d`ghostman: has joined #ruby
[06:11:37] marz_d`ghostman: I'm working on an old rails project. Regarding this snippet https://gist.github.com/marzdgzmn/6b13cb8147c857d30f58b44c7a25497c Is this a ruby thing or a rails thing? Cause I'm testing it on irb and I'm getting an undefined method error
[15:15:25] marz_d`ghostman: Quit: Page closed

2019-03-18

[04:42:54] marz_d`ghostman: has joined #ruby
[04:43:16] marz_d`ghostman: When your app uses secret keys and stuff for api calls, where's the best place to put it? as environment variable on the system?
[04:46:29] marz_d`ghostman: havenwood: I'll take a look at encrypted credentials, thanks, I'm currently using environment variable by the way, was just wondering if there is a more secure way to do it :)
[06:30:33] marz_d`ghostman: Ping timeout: 256 seconds

2019-03-12

[04:19:13] marz_d`ghostman: has joined #elixir-lang
[05:03:14] marz_d`ghostman: Quit: Page closed

2019-03-11

[13:51:22] marz_d`ghostman: has joined #ruby
[13:51:35] marz_d`ghostman: Has anyone tried uploading files to google drive via cli using ruby?
[14:01:43] marz_d`ghostman: Bish: care to elaborate?
[14:01:58] marz_d`ghostman: Bish: that's a bit of a strong negative answer, hehe
[14:18:19] marz_d`ghostman: Bish: Hahaha, Sorry didn't get that sarcasm, was just wondering though if you've done it how you handle tokens? I mean like if you do a cron job running the scripts how do you obtain the token since you'll have to interact with the webpage
[17:09:30] marz_d`ghostman: Quit: Page closed

2019-02-26

[06:34:49] marz_d`ghostman: Ping timeout: 256 seconds

2019-02-20

[06:07:05] marz_d`ghostman: Ping timeout: 256 seconds
[07:51:41] marz_d`ghostman: has joined #ruby
[07:51:51] marz_d`ghostman: I'm working with numbers like 3.9855141693e+07, does ruby support it?
[07:52:10] marz_d`ghostman: I mean what type should I use to properly handle it
[17:06:09] marz_d`ghostman: How do I convert a number with exponential notation from BigDecimal to its original form? e.g. BigDecimal.new('1.6703200934e+08')
[17:10:29] marz_d`ghostman: al2o3-cr: It doesn't seem to convert it back to its original: 1.6703200934e+08
[17:14:04] marz_d`ghostman: al2o3-cr: can you tell me what these numbers are and this conversion process
[17:18:04] marz_d`ghostman: al2o3-cr: thanks a lot

2019-02-19

[03:54:08] marz_d`ghostman: has joined #ruby
[03:55:09] marz_d`ghostman: Anyone using Nokogiri, how do I extract a part of an xml file using the value like <cf>AVERAGE</cf><pdp_per_row>6</pdp_per_row>? I'd like to extract everyhing under that xml tags?
[04:01:59] marz_d`ghostman: mozzarella: https://termbin.com/atf1 I want to extract all data under <cf>AVERAGE</cf><pdp_per_row>6</pdp_per_row>. Is there a way I can filter other than using xml attributes?
[04:02:29] marz_d`ghostman: mozzarella: wrong link, this is the one: https://termbin.com/37wm
[04:16:51] marz_d`ghostman: mozzarella: yep, currently trying to do it via NOkogiri
[04:23:22] marz_d`ghostman: al2o3-cr: everything under <cf>AVERAGE</cf><pdp_per_row>6</pdp_pepr_row>.
[04:26:47] marz_d`ghostman: I'm trying out Nokogiri::XML::Node, I don't know what argument it's requiring with this 'name' and document. I'm getting `new': wrong argument type String (expected Data) (TypeError) https://gist.github.com/marzdgzmn/f3172fc544b5d9158250b764ecef8699
[04:31:32] marz_d`ghostman: al2o3-cr: Wow. I'll work on this one. Thanks
[04:35:24] marz_d`ghostman: We're trying to sort out a graph from rrd :)
[04:35:47] marz_d`ghostman: parsing xml using other languages is a pain, good thing I found out about Nokogiri :)
[04:50:44] marz_d`ghostman: al2o3-cr: mozzarella thanks guys

2019-02-18

[09:33:46] marz_d`ghostman: has joined #ruby
[09:33:56] marz_d`ghostman: anyone using rrd-ffi? do you know how to extract rra data?
[11:13:52] marz_d`ghostman: Quit: Page closed

2019-02-03

[02:43:05] marz_d`ghostman: Ping timeout: 256 seconds

2019-02-02

[12:26:09] marz_d`ghostman: has joined #ruby
[12:28:01] marz_d`ghostman: I'm running my ruby script via cron: scl enable rh-ruby24 /usr/bin/local/ruby_script. Is there a shortcut where it would read and use the ruby version and gemset of that script?
[12:28:14] marz_d`ghostman: Currently I'm getting an error running it unless I run it when i'm on the directory itself
[13:27:25] marz_d`ghostman: j416: it install in the directory itself, when the command to run the script is run via cron, it doesn't seem to use the gemset installed by bundler
[13:36:14] marz_d`ghostman: j416: Ah I just got that, let me try

2019-01-25

[14:50:29] marz_d`ghostman: Quit: Page closed

2019-01-24

[16:08:54] marz_d`ghostman: has joined #ruby
[16:08:59] marz_d`ghostman: anyone using concurrent-ruby gem here?
[16:09:24] marz_d`ghostman: How do you guys execute Futures in parallel? Concurrent::Promises.future(thread_pool) { Sync.run(mirror) }.rescue { |e| send_error_notification(mirror_name: mirror.name, error: e) }.result doesn't seem to work

2019-01-17

[05:59:26] marz_d`ghostman: has joined #ruby
[05:59:48] marz_d`ghostman: I have a script/app written in ruby running in a CentOS7 machine. Is there a utility where I can monitor the process and its subprocesses?
[06:00:31] marz_d`ghostman: The script/app creates a couple of rsync subprocess on a different thread via concurrent-ruby
[11:50:13] marz_d`ghostman: Quit: Page closed

2019-01-10

[09:41:53] marz_d`ghostman: has joined #ruby
[09:42:07] marz_d`ghostman: Why am I getting an error: mirror_manager.rb:74:in `block in <class:Manager>': undefined method `send_error_notification' for Rise::MirrorManager::Manager:Class (NoMethodError) for my code: https://termbin.com/denk
[09:42:54] marz_d`ghostman: I meant: https://termbin.com/xgp2
[09:54:20] marz_d`ghostman: phaul: It does, does it matter if it's private or not? I think I'm calling it inside the object context. Perhaps I'm wrong with this at_exit method
[10:01:03] marz_d`ghostman: I tried invoking the method directly via Rise::MirrorManager::Notification.send_slack_message, but it gives me the same error
[10:04:47] marz_d`ghostman: Ah, I made the module method as a class method via module_function so I can call it in class context
[17:15:19] marz_d`ghostman: Ping timeout: 256 seconds

2018-12-28

[07:04:05] marz_d`ghostman: Quit: Page closed
[09:48:27] marz_d`ghostman: has joined #ruby
[09:49:02] marz_d`ghostman: I've created a /config/initializers/production.rb & test.rb . . . to initialize things. However, how do I select which one should be included when I run it in production and test?
[10:08:34] marz_d`ghostman: Quit: Page closed

2018-12-27

[11:47:32] marz_d`ghostman: Quit: Page closed
[18:09:00] marz_d`ghostman: has joined #ruby
[18:09:30] marz_d`ghostman: I have my gems installed via bundle install --path .bundle on my project root directory. How do I run ruby so that it sees the gems?
[18:12:39] marz_d`ghostman: phaul: Ah, thanks. Also, how do I access instance methods inside at_exit blocks? I placed an at_exit block that I would like to email me if $ERROR_INFO
[18:17:23] marz_d`ghostman: phaul: https://gist.github.com/marzdgzmn/382217dc13aab3df2429d4fbf514eb66
[18:23:40] marz_d`ghostman: baweaver: What do you mean as a supervisor?
[18:42:50] marz_d`ghostman: phaul: It gets triggered via Manager.new.run though hence I'm inlcuding it to make it available as an intance method rather than a class metho
[18:43:18] marz_d`ghostman: phaul: thanks for the recommendation, I'll double check.

2018-12-26

[05:06:21] marz_d`ghostman: has joined #ruby
[06:27:49] marz_d`ghostman: How do I capture my thread's output and error? https://gist.github.com/marzdgzmn/dc6e8992a353ecf9ed2384b2cb987c3a When I manually run the class itself, the one that should be run on a different thread, it gives me errors. But if I run it on a different thread the errors/output doesn't come up
[12:59:56] marz_d`ghostman: What does catch(:halt) { yield } do? I know it catches the thrown :halt but what does the { yield } do? I don't see anywhere it's being used with a block passed to it
[13:00:03] marz_d`ghostman: https://github.com/sinatra/sinatra/blob/v1.4.6/lib/sinatra/base.rb#L1066
[14:05:13] marz_d`ghostman: tbuehlmann: Oh, I see, so the block is passed to invoke, thanks.
[15:04:13] marz_d`ghostman: Ping timeout: 256 seconds
[15:44:40] marz_d`ghostman: has joined #ruby
[15:44:53] marz_d`ghostman: Anyone using concurrent-ruby gem? How do I rescue exception from threads? thread_pool = Concurrent::FixedThreadPool.new(10, max_queue:50) until job_list.empty? job = job_list.shift Concurrent::Promises.future(executor: thread_pool) { MyJob.run(job) }. rescue{ |e| puts e }.result end
[15:45:05] marz_d`ghostman: Sorry, mispasted it, I meant: https://gist.github.com/marzdgzmn/37ef33a17716fae30db86446b4d8b769
[15:45:16] marz_d`ghostman: Doesn't seem to work
[15:56:03] marz_d`ghostman: I was missing the .result at the end though :)

2018-12-24

[07:25:52] marz_d`ghostman: I'm using a gem that has this line: output = `#{cmd} 2>&1` . But in my script I have redirected $stderr to a logger instance and I'm getting a uninitialized stream error. How do I fix this one so the 2>&1 will also get redirected to the logger?
[07:50:48] marz_d`ghostman: Quit: Page closed

2018-12-21

[13:14:18] marz_d`ghostman: Does Logger automatically capture stderr and stdout if you set it to FATAL?
[16:34:00] marz_d`ghostman: If a thread raises an error like TypeError: no implicit converison of nil into String, how do I capture it for logging?
[16:59:05] marz_d`ghostman: How do I capture errors from a thread. I tried: https://gist.github.com/marzdgzmn/da9c0eb69a6fa9647531e8ffbeecf2eb/edit. But it does't seem to work
[17:20:22] marz_d`ghostman: Can someone suggest a good article or book about threads in ruby like how to capture its stdout and stderr.

2018-12-20

[08:09:15] marz_d`ghostman: has joined #ruby
[08:09:50] marz_d`ghostman: Why is the job I'm passing in to concurrent-ruby doesn't seem to be registered. Tried to output completed_task_count but it's zero: https://gist.github.com/marzdgzmn/e42976cfd10a45690d29e751104d0f7a
[16:17:21] marz_d`ghostman: Ping timeout: 256 seconds
[17:47:35] marz_d`ghostman: has joined #ruby
[17:48:02] marz_d`ghostman: Why am I getting a ruby_executable_hooks: end of file reached (EOFError) when sending emails? https://gist.github.com/marzdgzmn/614969af17f74b3f6fdc2422d7c4cfae
[18:12:47] marz_d`ghostman: I have created two ruby files under /config/initializers. How do I run one when I'm testing and the other when I'm not testing?
[18:30:09] marz_d`ghostman: jordanm: I'm not using Rails though
[18:32:15] marz_d`ghostman: under /lib I have my main ruby file say main.rb then I require the initializer file under project/config/initializers/production.rb via require File.join(__dir__, '../../config/initializers/production) in main.rb
[18:33:03] marz_d`ghostman: the production.rb has this require line for Foo::Bar::Configuration but it doesn't seem to be able to find it though
[18:33:22] marz_d`ghostman: it says cannot load such file -- foo/bar/configuration
[18:35:22] marz_d`ghostman: Ohhh, I may need to add it to load_path

2018-12-19

[14:29:37] marz_d`ghostman: has joined #ruby
[14:29:58] marz_d`ghostman: Any good gem that would make testing concurrency easy? Currently using concurrent-ruby gem in my script
[22:05:23] marz_d`ghostman: Ping timeout: 256 seconds

2018-12-18

[09:08:40] marz_d`ghostman: has joined #ruby
[09:08:51] marz_d`ghostman: Is it possible to bundle a bin in your app not just gem?
[09:54:06] marz_d`ghostman: I've uninstalled a package from my OS and reinstalled it but it appears to have triggered something that causes a lot of warning now like /.bundle/ruby/2.4.0/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.so: warning: already initialized constant SQLite3::Constants::Open::READONLY
[09:54:09] marz_d`ghostman: How do I fix it?
[11:04:45] marz_d`ghostman: Ping timeout: 256 seconds

2018-12-17

[13:23:35] marz_d`ghostman: has joined #ruby
[13:57:25] marz_d`ghostman: I'm using the sqlite3 gem, Is it possible to like flush a statement so I could like create a table and then insert data in one SQLite3::Database.open?
[13:58:07] marz_d`ghostman: Like inside a SQLite3::Database.open(file) . .. I'm creating a table then pushing data. I'd like to push the creation of the table first. Is that possible though?
[14:01:41] marz_d`ghostman: darix: cause I when I do a get query, no records are returned, tried to manually query it via irb and sqlite3 on cli
[14:08:22] marz_d`ghostman: darix: So, I've created a initialize.rb to run first before my main script for database population: e21d499b15ddb9bf05e6030facdec7b8
[14:12:35] marz_d`ghostman: darix: what do you mean?
[14:17:28] marz_d`ghostman: darix: the INSERT line?
[14:18:07] marz_d`ghostman: darix: Oh I'm sorry: https://gist.github.com/marzdgzmn/e21d499b15ddb9bf05e6030facdec7b8
[14:19:14] marz_d`ghostman: darix: It doesn't trigger any error though
[14:20:12] marz_d`ghostman: darix: it run fine, but when my tests run it invokes an error because the inserted data aren't there. Tried to manually run a select query in `irb` and sqlite3 cli, and the records aren't there
[14:30:41] marz_d`ghostman: doesn't work on mine though, we have the same exact script. the tables are there but not the data
[15:01:34] marz_d`ghostman: darix: I'm not sure if it because of the versions, but db.commit semms to have fixed it
[15:01:41] marz_d`ghostman: db.commit before the inserts
[15:10:13] marz_d`ghostman: I'm using ruby 2.4 though, and I was wrong, it still isn't working lol
[15:35:05] marz_d`ghostman: darix: Tried running in in its own script, and it seems to work. But when I require it inside the spec_helper, it doesn't. Is there something in spec_helper or rspec that is conflicting with it?
[16:27:03] marz_d`ghostman: With sqlite3 gem, why does results_as_hash return {"pre_cmd_result"=>"Failed", 0=>"Failed"} two hashes for one result?
[16:45:57] marz_d`ghostman: Quit: Page closed

2018-12-14

[07:35:22] marz_d`ghostman: has joined #ruby
[07:37:00] marz_d`ghostman: Is using a class variable within a method a good practice? https://gist.github.com/marzdgzmn/da15a290e3ae436e69d18adf5f9bffd6
[08:07:51] marz_d`ghostman: havenwood: a constant inside a module? then I can refer to it in module methods included in an object . . . I'll try that
[08:11:37] marz_d`ghostman: havenwood: thanks
[08:17:41] marz_d`ghostman: is there a way I can refer to object on other modules in shorthand like I have two modules Foo::Bar::Configuration and Foo::Bar::Logging, I want to refer to the objects in COnfiguration from Logging.
[10:27:18] marz_d`ghostman: I'm testing a module and created a dummy class to include it. I'm getting an undefined method `update_result` method: https://gist.github.com/marzdgzmn/80c36df582ca10199a2b434cc343b676
[10:27:29] marz_d`ghostman: Tried printing the public_instance_methods, and it seems to be there though
[10:34:33] marz_d`ghostman: Ping timeout: 256 seconds

2018-12-13

[15:05:13] marz_d`ghostman: Iambchop: Even though @db will only be dealt with by the module methods?
[15:05:42] marz_d`ghostman: Iambchop: If so, can you recommend a good pattern on how to tackle this one.
[15:06:49] marz_d`ghostman: Please disregard my first question, I see that @db will not be reachable from the instance that included the module. :)
[16:34:29] marz_d`ghostman: Quit: Page closed