Aces1up

Activity Graph

Page 1 of 1

2019-01-27

[12:53:40] Aces1up: has joined #RubyOnRails

2018-12-12

[00:34:09] Aces1up: has joined #RubyOnRails
[00:34:20] Aces1up: is there a way to see what files rails has autoloaded?
[00:34:37] Aces1up: i have a couple files in app/lib but only 1 of them seems to autoload.
[00:34:56] Aces1up: as any other file added to that directory rails cannot see any modules or classes I put into it.
[01:08:04] Aces1up: Ping timeout: 272 seconds

2018-11-19

[16:47:52] Aces1up: has joined #RubyOnRails
[16:49:07] Aces1up: hey all i have been searching around but can not find an answer to this. when i save a datetime to column in rails I know it saves it as utc.. How can I later do a query on that datetime to see if it has passed a certain time in another timezone?
[16:49:47] Aces1up: it is as simple as querying the database using a datetime object set with a different timezone and AR knows what to do from there?
[17:12:57] Aces1up: has joined #ruby
[17:13:18] Aces1up: just asking here this ROR question as you guys seem more active
[17:13:19] Aces1up: <aces1up> it is as simple as querying the database using a datetime object set with a different timezone and AR knows what to do from there?
[17:13:19] Aces1up: hey all i have been searching around but can not find an answer to this. when i save a datetime to column in rails I know it saves it as utc.. How can I later do a query on that datetime to see if it has passed a certain time in another timezone?
[17:19:13] Aces1up: RougeR mysql
[17:19:26] Aces1up: RougeR shouldnt i be having AR do the checks?
[17:19:43] Aces1up: this is actually a standalone ruby project not rails
[17:19:52] Aces1up: but i use active record for dbase stuff
[17:21:41] Aces1up: yeh i use unicorn for web stuff
[17:22:16] Aces1up: but activ support has new timezone stuff i should be using in my queries
[17:23:20] Aces1up: right now i have an app where i was storing all things as unix timestamp, now i need to adapt it to retreieve stuff based on biz location / timezone
[17:23:33] Aces1up: from what i seeing i need to create new columns of datetime.
[17:23:56] Aces1up: and do comparisons with date time objects in AR instead of unix timestamps.
[17:24:25] Aces1up: RougeR as long as AR gets the queries right im good
[17:24:40] Aces1up: i understand it stored things as UTC.
[17:25:08] Aces1up: RougeR everything based off unix time stamp using Time.now.to_i
[17:25:18] Aces1up: i have column now for timezone..
[17:25:24] Aces1up: need to integrate it.
[17:25:38] Aces1up: but can i use my timestamps?
[17:26:10] Aces1up: or should i just switch over everything to date time object so AR can do queries against timezone of business?
[17:27:02] Aces1up: its polling businesses for new leads that come in.. so i have a cron job running every 30 secs.
[17:27:08] Aces1up: not too big a db now.
[17:29:12] Aces1up: sure let me know your thoughts if i can adapt just Timestamps to work with timezones.
[17:29:37] Aces1up: i guess i need to convert the timestamp to time object then convert to timezone but then how would I do a query with all those conversions.
[17:30:00] Aces1up: sure man will do
[17:30:19] Aces1up: thanks for the help

2018-11-12

[16:06:07] Aces1up: has joined #ruby
[16:06:59] Aces1up: hey all hope you guys can help this is kind of an active record / ror question but I can not get access to that channel
[16:07:01] Aces1up: Determine if Current time falls within time ranges.. If not find what the next open window is
[16:07:13] Aces1up: https://stackoverflow.com/questions/53265793/determine-if-current-time-falls-within-time-ranges-if-not-find-what-the-next-o
[16:07:22] Aces1up: posted it on stackexchange.
[16:07:26] Aces1up: maybe someone can help
[16:08:24] Aces1up: has joined #RubyOnRails
[16:08:38] Aces1up: lol weird wasnt working before
[16:09:00] Aces1up: hey all maybe someone can assist me here. have the following post on stack exchange https://stackoverflow.com/questions/53265793/determine-if-current-time-falls-within-time-ranges-if-not-find-what-the-next-o
[16:09:16] Aces1up: Determine if Current time falls within time ranges.. If not find what the next open window is
[16:09:26] Aces1up: not sure where to start
[16:14:38] Aces1up: TvL2386 yes thought of that.. but this is on a weekly time basis
[16:15:08] Aces1up: TvL2386 so the windows wouln't be based on current time
[16:15:21] Aces1up: just the message itself would be.

2018-10-23

[14:57:40] Aces1up: has joined #RubyOnRails
[14:58:06] Aces1up: can someone help me with some association model issues I am having? have posted code here : https://paste.ofcode.org/XuBbAx3Jq2g6RQxCQkFY6E
[14:58:30] Aces1up: trying to create a has_many association but keep getting errros.
[15:02:17] Aces1up: has joined #ruby
[15:02:45] Aces1up: i know this isnt an active record channel but not getting a response on those chnnels for the issue im having maybe someone here can help https://paste.ofcode.org/XuBbAx3Jq2g6RQxCQkFY6E
[15:02:48] Aces1up: is my code.
[15:02:58] Aces1up: trying to get a has_many association to work
[15:08:09] Aces1up: hrmm yes could be let me check
[15:09:41] Aces1up: hrmm didnt notice it was referencing my framework.. just assumed it was coming from AR
[15:09:53] Aces1up: thanks i will fix that up and see what happens.
[15:12:25] Aces1up: yep that fixed it man
[15:12:35] Aces1up: was looking at it so long didnt see that lol

2018-02-04

[00:17:39] Aces1up: has joined #RubyOnRails
[00:20:57] Aces1up: hello can someone here help me with my query?
[00:20:58] Aces1up: https://pastebin.com/Z3VSa6Mn
[00:21:07] Aces1up: i am trying to do an AND function on an array of values
[00:21:13] Aces1up: not quite sure how to do it.
[00:23:32] Aces1up: year/month/day
[00:23:49] Aces1up: dates = [ 20180202, 20180203, 20180204 ]
[00:24:07] Aces1up: so i would have a search array like that I want to make sure all those entries have availability > 0
[00:24:59] Aces1up: actually no return value needed, just checking to make sure that there is availability
[00:25:12] Aces1up: so true / false
[00:25:17] Aces1up: return value
[00:27:27] Aces1up: &:avail? assumes > 0 ?
[00:28:03] Aces1up: how would i add in the rate and room_type to make sure it only compares dates with those columns matching rate and room_type ?

2017-11-19

[09:16:04] Aces1up: has joined #ruby
[09:16:37] Aces1up: what is the best way to build json reply as per this spec
[09:16:38] Aces1up: http://docs.chatfuel.com/plugins/plugin-documentation/json-api
[09:16:54] Aces1up: looking for the correct ruby pattern to build up json structures
[09:22:15] Aces1up: dminuoso cool so it will allow you to build up custom json structures likes this?
[10:25:25] Aces1up: has joined #ruby
[10:25:39] Aces1up: how can i have a meothod on my class using equal sign?
[10:25:54] Aces1up: just def =(var) end ??

2017-11-12

[10:22:17] Aces1up: has joined #ruby
[10:22:49] Aces1up: anyone know of a cool math gem that can parse language math statements? ex. two plus 5 times six

2016-04-24

[01:04:35] Aces1up: has joined #ruby
[01:09:19] Aces1up: Ping timeout: 252 seconds

2016-04-23

[13:37:03] Aces1up: has joined #ruby
[13:40:41] Aces1up: how can i split a do block into 1 or more files? I have a gui library that makes me put all my layout code in 1 block..
[13:40:49] Aces1up: is there anyway to break up a block?

2016-04-17

[01:41:51] Aces1up: has joined #ruby
[01:42:35] Aces1up: I have a strange question, I am parsing some javascript from a website.. I am putting a java associative array string into a string using a regex.. anyway I can convert that into a ruby hash?
[01:42:41] Aces1up: similar to parsing json?
[01:46:28] Aces1up: yeh its not valid json
[01:46:40] Aces1up: http://stackoverflow.com/questions/9580064/convert-javascript-object-to-a-ruby-hash
[01:46:40] Aces1up: looking at this now
[01:47:45] Aces1up: im scraping this from a website, I have no control over input.

2016-03-31

[04:04:46] Aces1up: has joined #ruby
[04:05:09] Aces1up: Client Quit

2016-02-28

[11:27:21] Aces1up: has joined #ruby
[11:28:29] Aces1up: hey, i ususally develop on cloud9 ide.. I was wondering for a ruby standalone what would be a good package/system i can use along with git to auto push my app/gems/etc to my deployment server?
[11:28:47] Aces1up: and update etc..

2016-02-12

[06:08:10] Aces1up: has joined #ruby
[06:08:36] Aces1up: i cannot seem to find a simple answer to this, just want to get current time, in timezone pacific.. in date and timestamp format.

2016-01-02

[02:25:10] Aces1up: has joined #ruby
[02:25:19] Aces1up: has anyone here ever used ruby and cloud9?

2015-09-26

[04:18:22] Aces1up: has joined #ruby
[04:19:04] Aces1up: hello i have a long string with multiple newlines i am writing to a socket, what should i use to make sure I send the whole string? puts, and gets on the server cut the string at the first newline
[04:19:28] Aces1up: what io method should i use both to write the string and read the string on the server side?
[04:37:42] Aces1up: eam how can i do sysread on server end if I do not know how many bytes were sent?

2015-09-20

[08:29:03] Aces1up: has joined #ruby
[08:29:09] Aces1up: anyone here good with nokogiri?
[08:29:27] Aces1up: i am trying to add a node right before the closing </body> tag of an html document
[08:29:34] Aces1up: example here : http://pastebin.com/w0uHHWzi
[08:53:22] Aces1up: apeiros I looked through that, doesn't seeem to show what I want.
[08:55:45] Aces1up: nothing but from reading, i do not see any functions that would do what i want, sorry if i'm not seeing it, i will read through it again.
[08:57:18] Aces1up: add child would add from opening tag of whatever node i select correct?
[09:01:41] Aces1up: so i would have to traverse the whole document to detect the node right before the closing <body> so i can add a child to that node?
[09:10:55] Aces1up: thanks apeiros that cleared up siblings / child relationship for me

2015-09-14

[12:04:19] Aces1up: has joined #ruby
[12:05:38] Aces1up: anyone know a decent proxy server gem that can handle http and https, I would also like to have hooks if possible to modify content on the fly
[12:20:45] Aces1up: jhass just want to have stats on an app i am debugging yes
[12:21:06] Aces1up: i want to build in some custom stats count requests, types of requests, where they are going etc.
[12:21:21] Aces1up: change data based on stats
[12:22:11] Aces1up: jhass what do you mean interactive?

2015-09-13

[08:48:47] Aces1up: has joined #ruby
[12:38:02] Aces1up: has joined #ruby
[12:38:42] Aces1up: what is something i can use to comapare a string against an array of strings for the closest match case insensetive?
[12:41:59] Aces1up: hrmm just looking for maybe a gem or something?
[12:43:02] Aces1up: checking it out now
[12:46:03] Aces1up: hey i have a few scripts i want to make into executables is there any recent good ruby to exe gems?
[12:47:14] Aces1up: i have used orca in the past, thought there might be some new and shiny now

2015-06-11

[17:27:26] Aces1up: has joined #ruby
[17:27:46] Aces1up: anyone here have experience doing bitcoin transaction with bitcoin-ruby gem?
[17:28:19] Aces1up: trying to understand, if I generate a bitcoin address, how can I load test funds to it with the bitcoin test net

2014-12-12

[10:19:25] Aces1up: if i needed to insert 100k rows into a remote AR DB with validations what would be the quickest way to do it? i am using activerecord-import now and it is still pretty slow.
[10:19:49] Aces1up: yes i will be.
[10:20:29] Aces1up: rvanlieshout i was thinking about generating a .csv and then uploading it to the server and executing remote commands to import it.. wondering if it would be faster..
[10:20:32] Aces1up: rvanlieshout mysql.
[10:21:07] Aces1up: rvanlieshout InnoDB
[10:22:05] Aces1up: workmad3 just verify no other md5 hash exists.. on particular column.
[10:22:23] Aces1up: it is primary key..
[10:22:44] Aces1up: yes hash exists in data.
[10:24:29] Aces1up: workmad3 yes something like that, i'm using activerecord-import gem to send say 100-1000 records at a time and perform validations.
[10:24:49] Aces1up: workmad3 sorry I do not know how to profile that..
[10:24:54] Aces1up: and docs on how to do it?
[10:25:55] Aces1up: rvanlieshout hrmm nice idea.
[10:26:45] Aces1up: rvanlieshout its basically an incremental update.. eventually the rows that would need to be fetched might grow to big.
[10:27:33] Aces1up: rvanlieshout what about a csv upload / ssh remote load somehow?
[10:28:32] Aces1up: hrmmm ok.. yeh maybe i can just remote it then and pipe back the errors etc on my local machine.
[10:31:35] Aces1up: rvanlieshout when i generate this data.. It typically takes around 1-2 houts to generate those 100k rows.. could I have a threadpool that just pushes work and saves the records as they are made?
[10:32:31] Aces1up: rvanlieshout ok think that might be the best route.

2014-12-11

[19:02:10] Aces1up: is the .count a heavy operation on say 1mil records if I did like a Product.count? is it single query or it pull all records?

2014-11-27

[06:20:59] Aces1up: if you had to delete a mass amount of file remotely.. could I script this with say perhaps sftp? possibly slow, or can I script via ssh connection somehow?
[06:21:26] Aces1up: i'm thinking of scripting a ssh client somehow.
[07:36:58] Aces1up: if i have an integer of say 10000 how could i loop through it and get a per batch of 1000
[07:37:27] Aces1up: so for instance it would be something like 10000.each( 1000 ) do | start, end |
[07:37:45] Aces1up: so i can get the start and end indexes of that batch.
[07:40:24] Aces1up: twistedpixels what would that look like? was looking to batch it and create a range that i could do work on,.
[07:42:03] Aces1up: bummer could use a good answer. no worrie.s
[07:50:55] Aces1up: dts i've been using eventmachine awhile, kicks ass for scraping.
[07:51:18] Aces1up: got it scaled pretty good across multiple server i scrape a couple mil pages a day.
[07:51:37] Aces1up: yeh mostly financial info. and real estate data for clients.
[07:52:45] Aces1up: twisted is just asynch IO library right?
[07:53:33] Aces1up: dts hrmm well eventmachine is the same thing in ruby.. I think it has been around longer too.