« Back to channel list

#RubyOnRails - 26 March 2019

« Back 1 day Forward 1 day »
[00:27:45] mangold: has joined #RubyOnRails
[01:02:30] cnsvc: has joined #RubyOnRails
[01:10:45] orbyt_: has joined #RubyOnRails
[01:17:25] hd1: has joined #RubyOnRails
[01:26:43] sevenseacat: has joined #RubyOnRails
[01:57:14] orbyt_: has joined #RubyOnRails
[01:57:18] xco: i’m having a weird problem
[01:57:46] xco: in my terminal doing ‘gem install activesupport’ works
[01:58:00] xco: if i do require active_support it comes out as “false”
[01:58:01] xco: any ideas?
[01:59:44] hd1: the return value of require in ruby is undefined
[02:00:09] hd1: as long as the code based on the gem works, don't worry about it
[02:06:19] sevenseacat: it can return faise if its already loaded
[02:09:23] cnsvc: has joined #RubyOnRails
[02:17:23] Radar: what sevenseacat said
[02:17:29] Radar: [12:59:44] <hd1> the return value of require in ruby is undefined
[02:17:41] cerberussg: has joined #RubyOnRails
[02:22:44] cerberussg: has joined #RubyOnRails
[02:23:32] xco: sevenseacat: thanks fixed
[02:23:58] cerberussg: Hello World!
[02:26:11] World: ACTION says hello back to Radar
[02:26:56] xco: is there a Rails method that can convert times in different time zones? Example given the current time in New York, it tells me what the local time in Berlin is?
[02:27:10] Radar: xco: in_time_zone
[02:27:17] xco: i’m trying ActiveSupports #in_time_zone
[02:27:22] Radar: yes that one
[02:27:31] xco: but that value is off bye one :/
[02:27:37] xco: bye one hour
[02:27:43] nones: has joined #RubyOnRails
[02:27:43] cerberussg: daylight savings time
[02:27:50] xco: yeah i know that, how do i fix that
[02:27:55] xco: tthis is wha ti have
[02:28:09] xco: time.in_time_zone("Berlin")
[02:28:13] cerberussg: you need to check if DST is in season
[02:28:17] cerberussg: if so add an hour
[02:28:29] xco: where time = Time in new york
[02:28:31] Radar: cerberussg: and how do we do that Mr. Smarty Pants?
[02:28:38] xco: but i can’t add 1 like that what if DST resets?
[02:28:58] cerberussg: I am looking sorry wasnt trying to be smart just staing what needs done had similar issue with something else
[02:29:29] sevenseacat: moral of the story - timezones are haaaaaard
[02:29:31] cerberussg: https://apidock.com/rails/ActiveSupport/TimeWithZone/dst%3F
[02:29:56] cerberussg: so you just conditional if dst returns true add hour if not no adding
[02:33:29] cerberussg: so looks like two lookups one getting your in_time_zone time then checking with Time.zone.parse(@time).dst?
[02:42:20] cerberussg: ^^ above just needs the date of the time lookup, as that determines if DST is active or not. I stated time but isnt factual just need the date for the check.
[02:45:12] Tempesta: has joined #RubyOnRails
[02:47:24] haxx0r: has joined #RubyOnRails
[02:48:23] haxx0r: https://pastebin.com/ZxmK4hhw
[02:48:27] mangold: has joined #RubyOnRails
[02:48:40] haxx0r: how can i get the last entries for each :coin within 1 query?
[02:48:52] haxx0r: CoinRate.buy.order(id: :desc).distinct(:coin)
[02:49:01] haxx0r: this somehow not giving me correct result
[02:49:27] haxx0r: i want the newest rate for each coin, but within 1 query for performance
[02:50:09] NeXTSUN: has joined #RubyOnRails
[02:52:13] haxx0r: so i need the rows 10799 10797 10795 10793
[03:06:25] Saukk: has joined #RubyOnRails
[03:39:15] hd1: haxx0r, what's your code?
[03:39:48] haxx0r: CoinRate.buy.order(id: :desc).distinct(:coin)
[03:59:17] cerberussg: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[03:59:19] cerberussg: has joined #RubyOnRails
[04:02:23] s00pcan: has joined #RubyOnRails
[04:09:03] hd1: Can you pastebin the failing test and the code it tests?
[04:09:18] haxx0r: i don't have a test for that
[04:10:36] haxx0r: i can write you pm, if you allow me :)
[04:10:44] braincrash: has joined #RubyOnRails
[04:14:34] kvda: has joined #RubyOnRails
[04:38:43] haxx0r: big heart for hd1
[04:39:00] hd1: happy to help
[04:44:27] sevenseacat: has joined #RubyOnRails
[04:50:23] xco: has joined #RubyOnRails
[05:35:18] ariedler: has joined #RubyOnRails
[05:57:25] srinidhi: has joined #RubyOnRails
[06:07:59] reber: has joined #RubyOnRails
[06:15:38] conta: has joined #RubyOnRails
[06:25:27] sf_starfox: has joined #RubyOnRails
[06:26:48] sf_starfox: quick question,if I have a big table (100M rows) and I want to run a migration that adds a column with the default to that table, will the rake db:migrate lock the entire DB or just that table? (I'm using Postgres 9.6)
[06:41:00] hd1: has joined #RubyOnRails
[06:41:21] MrCrackPotBuilde: has joined #RubyOnRails
[07:02:53] lankanmon: has joined #RubyOnRails
[07:17:13] kvda: has joined #RubyOnRails
[07:22:51] uks: has joined #RubyOnRails
[07:36:21] ariedler: has joined #RubyOnRails
[07:36:47] hahuang6-: has joined #RubyOnRails
[07:39:00] za1b1tsu: has joined #RubyOnRails
[07:45:12] fox_mulder_cp: has joined #RubyOnRails
[07:45:33] salasrod: has joined #RubyOnRails
[08:03:33] reactormonk: has joined #RubyOnRails
[08:18:53] kapil____: has joined #RubyOnRails
[08:30:01] lxsameer: has joined #RubyOnRails
[08:46:32] ur5us: has joined #RubyOnRails
[08:51:13] mikecmpbll: has joined #RubyOnRails
[08:59:14] conta: has joined #RubyOnRails
[09:30:51] za1b1tsu: has joined #RubyOnRails
[09:37:12] ariedler: has joined #RubyOnRails
[09:40:25] jottr: has joined #RubyOnRails
[09:46:40] v01d4lph4: has joined #RubyOnRails
[09:59:10] Ergo: has joined #RubyOnRails
[10:02:20] srinidhi: has joined #RubyOnRails
[10:10:51] reactormonk: has joined #RubyOnRails
[10:38:06] mangold: has joined #RubyOnRails
[10:41:11] za1b1tsu: has joined #RubyOnRails
[10:47:53] apparition: has joined #RubyOnRails
[10:48:44] lankanmon: has joined #RubyOnRails
[10:49:02] funkytwig: has joined #RubyOnRails
[10:50:42] funkytwig: Hi, got rails_admin working but config/initializers/rails_admin.rb missing. In fact I dont even have a initializers directory.
[11:06:42] jottr: has joined #RubyOnRails
[11:06:56] conta: has joined #RubyOnRails
[11:11:55] gb_away: has joined #RubyOnRails
[11:26:08] paul0: has joined #RubyOnRails
[11:28:31] crankharder: has joined #RubyOnRails
[11:35:39] xco: has joined #RubyOnRails
[12:15:02] cek: has joined #RubyOnRails
[12:15:51] cek: `javascript_include_tag 'application'` in `app/views/layouts/application.html.haml` , but instead of using `app/assets/javascripts/application.js`, it's using `app/assets/javascripts/a1/application.js`. Why is that?
[12:16:30] cek: I didn't ask it to look inside the subdirectory, I want the top file
[12:19:36] jottr_: has joined #RubyOnRails
[12:27:34] gb_away: has joined #RubyOnRails
[13:30:22] russt: has joined #RubyOnRails
[14:19:14] mostlybadfly: has joined #RubyOnRails
[14:19:16] crankharder: has joined #RubyOnRails
[14:39:56] crankharder: has joined #RubyOnRails
[14:55:06] mangold: has joined #RubyOnRails
[15:01:42] ss942: has joined #RubyOnRails
[15:04:05] cerberussg: has joined #RubyOnRails
[15:04:08] ss942: https://dpaste.de/vQE5 ← why that happen? I mean "CustomFieldsHelper.instance_methods.include? :show_value" returns true, but when i call it with CUstomFieldsHelper.show_value it returns undefined_method. Why?
[15:12:57] tdy: has joined #RubyOnRails
[15:23:30] crankharder: has joined #RubyOnRails
[15:26:25] mangold: has joined #RubyOnRails
[15:28:00] orbyt_: has joined #RubyOnRails
[15:29:14] crankharder: has joined #RubyOnRails
[15:59:57] hd1: has joined #RubyOnRails
[16:20:11] orbyt_: has joined #RubyOnRails
[16:20:25] conta: has joined #RubyOnRails
[16:25:48] orbyt_: has joined #RubyOnRails
[16:42:56] reactormonk: has joined #RubyOnRails
[16:56:22] cerberussg: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[16:56:25] cerberussg: has joined #RubyOnRails
[17:01:25] crankharder: has joined #RubyOnRails
[17:16:32] conta: has joined #RubyOnRails
[17:18:00] cnsvc: has joined #RubyOnRails
[17:22:50] defsdoor_: has joined #RubyOnRails
[17:28:06] hightower2: has joined #RubyOnRails
[17:29:40] za1b1tsu: has joined #RubyOnRails
[17:50:58] pLaTo0n: has joined #RubyOnRails
[17:58:36] crankharder: has joined #RubyOnRails
[18:08:23] reactormonk: has joined #RubyOnRails
[18:13:15] orbyt_: has joined #RubyOnRails
[18:20:30] GreyHame: has joined #RubyOnRails
[18:26:35] agent_white: has joined #RubyOnRails
[18:32:58] mikecmpbll: has joined #RubyOnRails
[18:36:17] agent_white: has joined #RubyOnRails
[18:41:52] Tempesta: has joined #RubyOnRails
[18:50:11] mostlybadfly: has joined #RubyOnRails
[18:57:22] brool: has joined #RubyOnRails
[19:06:34] ariedler: has joined #RubyOnRails
[19:13:38] reactormonk: has joined #RubyOnRails
[19:41:29] Scriptonaut: has joined #RubyOnRails
[19:43:45] Scriptonaut: hey all, I want to get some input from you guys. Every project I've ever worked on, we ran the staging server in a "staging" env, with RAILS_ENV='staging'. Someone I work with thinks that it will cause issues, and wants to run the staging server with RAILS_ENV='production'. What is the standard way to do it nowadays? Run staging in 'staging' or 'production'
[19:46:21] Scriptonaut: my reasoning is that we want different settings for staging, like the log level should be "debug", api's should point to sandboxes, it should read/write to staging buckets, etc. Running it in production would mean that it would run the risk of modifying customer data when we're testing things in staging. The alternative is that we use a single production.rb file for both staging and prod servers,
[19:46:28] Scriptonaut: and then use environment variables to load the various differences. I like the idea of just putting that stuff in staging.rb (or in the credentials.yml file if it's sensitive)
[20:07:18] uks: has joined #RubyOnRails
[20:07:26] orbyt_: has joined #RubyOnRails
[20:09:34] reber: has joined #RubyOnRails
[20:15:11] orbyt_: has joined #RubyOnRails
[20:17:34] Tempesta: has joined #RubyOnRails
[20:22:51] crankharder: has joined #RubyOnRails
[20:24:22] cgfbee: has joined #RubyOnRails
[20:38:50] ur5us: has joined #RubyOnRails
[21:10:20] orbyt_: has joined #RubyOnRails
[21:17:25] ariedler: has joined #RubyOnRails
[21:19:10] Fernando-Basso: has joined #RubyOnRails
[21:28:52] ellcs: has joined #RubyOnRails
[21:31:42] Radar: GOOD MORNING
[21:36:13] lato: has joined #RubyOnRails
[22:32:22] mostlybadfly: has joined #RubyOnRails
[22:37:47] tdy: has joined #RubyOnRails
[22:43:21] bambanx: has joined #RubyOnRails
[23:02:53] paul0: has joined #RubyOnRails
[23:05:49] ivanskie: has joined #RubyOnRails
[23:10:30] cgfbee: has joined #RubyOnRails
[23:56:35] FastJack: has joined #RubyOnRails
[23:59:41] kvda: has joined #RubyOnRails