« Back to channel list

#RubyOnRails - 09 August 2017

« Back 1 day Forward 1 day »
[00:01:01] Psy-Q: has joined #RubyOnRails
[00:03:37] ocpysh: sounds good.
[00:03:55] ocpysh: until I mess up...
[00:06:16] ocpysh: sounds like there is potential for a forge clone.
[00:06:47] ocpysh: mrbubbles : hmm, I installed slim-rails, and changed the tpls to .slim & markup..
[00:07:10] ocpysh: err: ProjectsController#new is missing a template for this request format and variant.
[00:07:31] ocpysh: any idea where I have to tell rails to look for .slim and not .erb?
[00:07:33] jhfisc: has joined #RubyOnRails
[00:08:07] ocpysh: oh right, restart server 'tm
[00:09:45] eelster: has joined #RubyOnRails
[00:12:38] eelster: has joined #RubyOnRails
[00:17:20] Rodya_: has joined #RubyOnRails
[00:18:20] bronson: has joined #RubyOnRails
[00:18:21] jphase: has joined #RubyOnRails
[00:20:17] jhfisc: has joined #RubyOnRails
[00:26:01] ascarter: has joined #RubyOnRails
[00:38:51] jhfisc: has joined #RubyOnRails
[00:41:16] ocpysh: has joined #RubyOnRails
[00:42:13] cnk: has joined #RubyOnRails
[00:50:13] jhfisc: has joined #RubyOnRails
[00:55:38] hahuang65: has joined #RubyOnRails
[00:56:40] sevenseacat: has joined #RubyOnRails
[01:05:59] jhfisc: has joined #RubyOnRails
[01:10:31] funburn: has joined #RubyOnRails
[01:11:14] jhfisc: has joined #RubyOnRails
[01:15:12] lessless: has joined #RubyOnRails
[01:16:39] jhfisc: has joined #RubyOnRails
[01:18:33] logicscience: I will look forward to tomorrow
[01:22:00] jhfisc: has joined #RubyOnRails
[01:22:03] funburn: has joined #RubyOnRails
[01:23:46] jphase: has joined #RubyOnRails
[01:26:46] jphase: has joined #RubyOnRails
[01:27:14] azlev: has joined #RubyOnRails
[01:27:17] rakm: has joined #RubyOnRails
[01:28:27] cagomez: has joined #RubyOnRails
[01:28:48] azlev: Hi all. How can I write database-specific code in rails. I inherited a legacy application using MySQL and I want to use postgresql. There are parts of the code that uses MySQL functions that differs from PostgreSQL functions
[01:29:32] azlev: actually the "How can I..." is a question :-P
[01:32:15] cnk: azlev: do you want to use 2 databases in the same app - or do you want to migrate from MySQL to Postgres?
[01:32:34] azlev: cnk: migrate
[01:33:23] cnk: Can you give an example of code that uses a MySQL function? I feel like ‘just replace that bit with the pg equivalent” is missing something or you wouldn’t have asked
[01:34:23] azlev: cnk: in a model: " has_many :ips, :order => 'INET_ATON(name)'"
[01:35:10] jhfisc: has joined #RubyOnRails
[01:35:20] ascarter: has joined #RubyOnRails
[01:35:38] azlev: name is a string. But in PostgreSQL it should be a cidr
[01:36:00] azlev: ops, inet
[01:36:29] cnk: OK and then you could just order by name without the function, yes? (I don’t do much w ip addresses)
[01:37:26] azlev: well, it will return a different order, I need to check if it's ok to use that order
[01:38:16] cnk: Looks like PG has lots of functions for that type - but I am not sure what is closest to INET_ATON https://www.postgresql.org/docs/current/static/functions-net.html
[01:39:16] cnk: I guess my strategy would be 1) review all models for field types and note what needs to change
[01:39:38] cnk: 2) write a data migration (in SQL) that moves the data from MySQL to PG
[01:39:53] cnk: 3) try running your app + tests and see what breaks. Change as needed
[01:40:28] cnk: Not super sophisticated but if the app is small to medium size it could work
[01:40:35] azlev: cnk: pg has '>', '=' and '<' operator to inet, so no need to call a function
[01:41:40] azlev: I can map and work on every issue, but, if I want to support multiple databases, can't I? Just use generic SQL code?
[01:44:21] jhfisc: has joined #RubyOnRails
[01:47:47] cnk: If you want to support multiple databases you either have to not use any db-specific functions - or you need to wrap them in something that checks the database driver and calls the correct one
[01:49:10] jphase: has joined #RubyOnRails
[01:49:52] azlev: cnk: yes, the second one, how do I check the database driver and call a specific code?
[01:51:21] cnk: http://api.rubyonrails.org/classes/ActiveRecord/ConnectionHandling.html#method-i-connection_config
[01:51:43] cnk: the adapter has the db type. There may be other ways to find it
[01:52:15] jhfisc: has joined #RubyOnRails
[01:53:57] azlev: cnk: cool, thanks. Probably I'll do the big rewrite (a lot of wrong SQL code that MySQL returns something), but I need to know the path if someone ask me to support both
[01:58:23] jhfisc: has joined #RubyOnRails
[01:59:35] cagomez: has joined #RubyOnRails
[02:02:20] quazimodo: has joined #RubyOnRails
[02:06:48] jhfisc: has joined #RubyOnRails
[02:07:34] irishfromua: has joined #RubyOnRails
[02:08:25] dnyy: has joined #RubyOnRails
[02:12:15] Jameser: has joined #RubyOnRails
[02:15:25] cagomez: has joined #RubyOnRails
[02:41:18] lessless: has joined #RubyOnRails
[02:42:00] ascarter: has joined #RubyOnRails
[02:42:30] sevenseacat: has joined #RubyOnRails
[02:46:29] fcser_: has joined #RubyOnRails
[02:47:35] gusrub: has joined #RubyOnRails
[02:49:45] kies: has joined #RubyOnRails
[02:55:56] RahulT: has joined #RubyOnRails
[02:56:39] hahuang65: has joined #RubyOnRails
[03:07:13] Jameser: has joined #RubyOnRails
[03:13:24] quazimodo: has joined #RubyOnRails
[03:20:25] kies: has joined #RubyOnRails
[03:20:45] elcontrastador: has joined #RubyOnRails
[03:26:35] Jameser: has joined #RubyOnRails
[03:26:49] Rodya_: has joined #RubyOnRails
[03:35:25] emers2n: has joined #RubyOnRails
[03:35:48] emers2n: Can the ruby gem Crono be used with Heroku, or do I need to use the Heroku scheduler?
[03:38:10] gusrub: has joined #RubyOnRails
[03:49:24] ascarter: has joined #RubyOnRails
[03:51:18] sevenseacat: has joined #RubyOnRails
[04:01:19] kies: has joined #RubyOnRails
[04:06:13] RahulT: has joined #RubyOnRails
[04:06:27] sevenseacat: has joined #RubyOnRails
[04:07:53] brendan-: has joined #RubyOnRails
[04:08:25] banisterfiend: has joined #RubyOnRails
[04:11:18] srinidhi: has joined #RubyOnRails
[04:18:58] emers2n: Just got my 3rd free rails app finished and on Heroku!!!!
[04:19:17] emers2n: I made an Amazon price checker. Check it out: http://www.pastpricing.com/
[04:19:57] quirkycoders: has joined #RubyOnRails
[04:20:02] bronson: has joined #RubyOnRails
[04:20:15] emers2n: Shout out to havenwood for helping with the graph date mapping
[04:21:01] Radar: hooray :)
[04:21:06] Radar: Well done emers2n
[04:21:23] emers2n: Thank you kindly Radar!
[04:22:39] ascarter: has joined #RubyOnRails
[04:25:09] cam27: has joined #RubyOnRails
[04:29:16] Rodya_: has joined #RubyOnRails
[04:46:25] lessless: has joined #RubyOnRails
[04:55:57] ascarter: has joined #RubyOnRails
[04:56:48] emers2n: Thanks sevenseacat. What do you think about the design?
[04:57:31] hahuang65: has joined #RubyOnRails
[04:58:08] sevenseacat: its better than I could do!
[05:00:48] quirkycoders: has joined #RubyOnRails
[05:17:17] ascarter: has joined #RubyOnRails
[05:21:47] quirkycoders: has joined #RubyOnRails
[05:21:55] bronson: has joined #RubyOnRails
[05:30:12] Rodya_: has joined #RubyOnRails
[05:33:07] sevenseacat: has joined #RubyOnRails
[05:34:42] cam27: not sure why the unless part is not working <%= link_to "Checkout", new_transaction_path, class: "btn btn-primary pull-right" unless current_order.blank? %>
[05:35:25] cam27: When there are 0 items in cart
[05:35:50] sevenseacat: what is the unless applying to?
[05:36:33] sevenseacat: I think youre missing some parentheses
[05:48:59] cam27: it’s a controller helper method
[05:49:18] sevenseacat: not what I asked
[05:50:14] sevenseacat: the code is likely being interpreted like this class: ("btn btn-primary pull-right" unless current_order.blank?)
[05:50:25] sevenseacat: meh, bye then
[05:51:06] cam27: I’m going off of this link_to_unless(condition, name, options = {}, html_options = {}, &block) public I’ve tried it with and without parenthesis
[05:51:46] cam27: has left #RubyOnRails: ()
[05:58:04] irishfromua: has joined #RubyOnRails
[05:59:58] RahulT: has joined #RubyOnRails
[06:02:38] quirkycoders: has joined #RubyOnRails
[06:03:10] ascarter_: has joined #RubyOnRails
[06:04:55] ur5us: has joined #RubyOnRails
[06:07:29] jhfisc: has joined #RubyOnRails
[06:09:29] jphase_: has joined #RubyOnRails
[06:16:46] Inoperable: has joined #RubyOnRails
[06:17:15] jhfisc: has joined #RubyOnRails
[06:22:52] bronson: has joined #RubyOnRails
[06:23:04] emers2n: If I had the following code: if(!first_matching_item_hash["ItemAttributes"]["ListPrice"]["FormattedPrice"].nil?)
[06:23:15] dionysus69: has joined #RubyOnRails
[06:23:24] emers2n: And ListPrice is defined but FormattedPrice isn't, it works fine. But if ListPrice isn't defined it breaks.
[06:23:50] emers2n: Is it possible to include the parent elements in the .nil check easily?
[06:28:16] netzfisch: has joined #RubyOnRails
[06:30:02] quazimodo: has joined #RubyOnRails
[06:31:06] Rodya_: has joined #RubyOnRails
[06:38:01] gamblor3: has joined #RubyOnRails
[06:41:03] hadricus: has joined #RubyOnRails
[06:41:11] srinidhi: has joined #RubyOnRails
[06:47:23] jhfisc: has joined #RubyOnRails
[06:53:00] jhfisc: has joined #RubyOnRails
[06:58:24] hahuang65: has joined #RubyOnRails
[07:01:09] conta: has joined #RubyOnRails
[07:05:07] jhfisc: has joined #RubyOnRails
[07:10:00] ascarter_: has joined #RubyOnRails
[07:10:12] jhfisc: has joined #RubyOnRails
[07:17:22] high_fiver: has joined #RubyOnRails
[07:17:37] emers2n: Has anyone here used a Procfile w/ Heroku?
[07:23:37] bronson: has joined #RubyOnRails
[07:25:13] arBmind: has joined #RubyOnRails
[07:31:42] Rodya_: has joined #RubyOnRails
[07:38:15] ascarter_: has joined #RubyOnRails
[07:39:08] sevenseacat: has joined #RubyOnRails
[07:44:01] defsdoor: has joined #RubyOnRails
[07:48:29] dionysus69: this is rendered as just property.address, is it a bug? https://gist.github.com/anonymous/dc3c22fe489e42f9426d8e1f09020eba
[07:48:55] dionysus69: anchor tag is not wrapped around td
[07:57:25] jhfisc: has joined #RubyOnRails
[08:05:46] nahtnam: has joined #RubyOnRails
[08:06:37] muzik: has joined #RubyOnRails
[08:08:04] ams__: has joined #RubyOnRails
[08:09:30] jhfisc: has joined #RubyOnRails
[08:09:36] Ergo: has joined #RubyOnRails
[08:13:58] jhfisc: has joined #RubyOnRails
[08:17:36] foreman-n00b: has joined #RubyOnRails
[08:20:14] sevenseacat: anchor tags don't wrap around tds
[08:20:23] sevenseacat: thats not valid HTML
[08:25:11] bronson: has joined #RubyOnRails
[08:32:45] Rodya_: has joined #RubyOnRails
[08:39:18] dionysus69: ok thanks I wrapped content in extra div :)
[08:40:59] ascarter_: has joined #RubyOnRails
[08:41:26] Oog: has joined #RubyOnRails
[08:43:53] marr: has joined #RubyOnRails
[08:44:57] Oog: serious problems locally getting invalid authe token in chrom but not safari - ideas?
[08:45:48] DTZUZO: has joined #RubyOnRails
[08:48:14] DoubleMalt: has joined #RubyOnRails
[08:52:27] Psy-Q: has joined #RubyOnRails
[08:52:41] mtkd: has joined #RubyOnRails
[08:53:15] quirkycoders: has joined #RubyOnRails
[08:59:30] hahuang65: has joined #RubyOnRails
[09:03:27] jhfisc: has joined #RubyOnRails
[09:09:42] jhfisc: has joined #RubyOnRails
[09:13:11] arBmind: has joined #RubyOnRails
[09:13:20] cagomez: has joined #RubyOnRails
[09:15:40] dionysus69: which one is a more conventional approach? have a hidden field in form keeping current user id ? or merging current_user id with a strong params before create action?
[09:17:10] tbuehlmann_: you should only use the latter, because the user might change the form inputs
[09:20:23] jhfisc: has joined #RubyOnRails
[09:23:05] lessless: has joined #RubyOnRails
[09:26:03] bronson: has joined #RubyOnRails
[09:29:10] quirkycoders: has joined #RubyOnRails
[09:29:19] dionysus69: ok that's what I thought too, but still double checked in case latter had some "hidden" vulnerability :P
[09:29:29] DTZUZO: has joined #RubyOnRails
[09:30:40] jhfisc: has joined #RubyOnRails
[09:31:16] veloutin: has joined #RubyOnRails
[09:31:16] arathald: has joined #RubyOnRails
[09:31:20] jhass: has joined #RubyOnRails
[09:31:23] IsoLinCHiP: has joined #RubyOnRails
[09:31:24] planigan: has joined #RubyOnRails
[09:31:35] richardjohn: has joined #RubyOnRails
[09:31:37] djgraham: has joined #RubyOnRails
[09:31:48] codelahoma: has joined #RubyOnRails
[09:31:51] danman: has joined #RubyOnRails
[09:31:56] rapha: has joined #RubyOnRails
[09:33:24] irishfromua: has joined #RubyOnRails
[09:33:28] Rodya_: has joined #RubyOnRails
[09:33:47] michael_mbp: has joined #RubyOnRails
[09:35:15] jhfisc: has joined #RubyOnRails
[09:35:40] bodie_: has joined #RubyOnRails
[09:37:45] Cork: has joined #RubyOnRails
[09:41:11] jhfisc: has joined #RubyOnRails
[09:44:24] cagomez: has joined #RubyOnRails
[09:46:25] jhfisc: has joined #RubyOnRails
[09:46:44] nekomune: has joined #RubyOnRails
[09:47:46] one_zero: has joined #RubyOnRails
[09:48:40] ascarter: has joined #RubyOnRails
[09:50:12] Chernobuk: has joined #RubyOnRails
[09:55:15] jhfisc: has joined #RubyOnRails
[09:58:44] jarr0dsz: has joined #RubyOnRails
[09:59:10] jarr0dsz: hello everyone, what would be the best option to have a 'dynamic rails model' with something like mongodb/mongoid
[09:59:45] tbuehlmann_: jarr0dsz: what does a dynamic model does?
[09:59:47] jarr0dsz: basically im looking for an example like activeadmin where you would be able to setup the model attributes in a simple admin ui
[10:00:18] cagomez: has joined #RubyOnRails
[10:00:26] jarr0dsz: tbuehlmann_ well basically just an 'admin panel' where you can build the attributes dynamically like say a animal with integer field, textfield etc.. i know activeadmin can do this i think but looking for a schemaless datastorage
[10:01:12] tbuehlmann_: you could use serialized columns or hstore with postgres for some datastructures, or build an EAV model with AR classes yourself
[10:05:14] quirkycoders: has joined #RubyOnRails
[10:07:43] jhfisc: has joined #RubyOnRails
[10:26:54] bronson: has joined #RubyOnRails
[10:29:41] Papierkorb: has joined #RubyOnRails
[10:29:58] jhfisc: has joined #RubyOnRails
[10:40:04] jhfisc: has joined #RubyOnRails
[10:40:49] quirkycoders: has joined #RubyOnRails
[10:45:43] jhfisc: has joined #RubyOnRails
[10:51:26] jhfisc: has joined #RubyOnRails
[10:51:53] MasterAsia: has joined #RubyOnRails
[10:52:04] MasterAsia: Is it wise to unroll partials to reduce complexity?
[10:55:31] ascarter: has joined #RubyOnRails
[10:58:09] mikecmpbll: has joined #RubyOnRails
[11:00:20] hahuang65: has joined #RubyOnRails
[11:02:01] ma5ter: has joined #RubyOnRails
[11:02:39] lugray: has joined #RubyOnRails
[11:03:14] ma5ter: Hi can anyone please explain ruby/gems wrappers ? , why they are used in nginx passenger setup ?
[11:05:02] nickjj: has joined #RubyOnRails
[11:20:39] xall: has joined #RubyOnRails
[11:27:29] bronson: has joined #RubyOnRails
[11:33:28] ahrs: has joined #RubyOnRails
[11:42:49] vedu: Hello. Any ideas on this one: https://stackoverflow.com/questions/45561040/how-to-globally-include-ruby-modules-in-js-erb-files-using-webpack
[11:53:08] quirkycoders: has joined #RubyOnRails
[11:55:13] beilabs: has joined #RubyOnRails
[12:01:23] ascarter: has joined #RubyOnRails
[12:12:43] mercwithamouth: has joined #RubyOnRails
[12:25:52] lessless: has joined #RubyOnRails
[12:26:57] AntiSpamMeta: has joined #RubyOnRails
[12:28:19] bronson: has joined #RubyOnRails
[12:30:57] ndr0s: has joined #RubyOnRails
[12:34:11] beilabs: has joined #RubyOnRails
[12:35:54] arBmind: has joined #RubyOnRails
[12:36:57] quazimodo: has joined #RubyOnRails
[12:41:03] ocpysh: has joined #RubyOnRails
[12:43:48] lessless: has joined #RubyOnRails
[12:47:13] ocpysh: has joined #RubyOnRails
[12:47:24] conta: has joined #RubyOnRails
[12:48:33] quirkycoders: has joined #RubyOnRails
[12:51:37] conta: has joined #RubyOnRails
[12:52:40] jphase: has joined #RubyOnRails
[13:01:06] hahuang65: has joined #RubyOnRails
[13:07:43] cpruitt: has joined #RubyOnRails
[13:10:07] ascarter: has joined #RubyOnRails
[13:10:43] beilabs: has joined #RubyOnRails
[13:13:29] mercwithamouth: has joined #RubyOnRails
[13:16:43] funburn: has joined #RubyOnRails
[13:20:41] beilabs: has joined #RubyOnRails
[13:20:46] funburn: has joined #RubyOnRails
[13:23:47] sebg: has joined #RubyOnRails
[13:26:13] funburn: has joined #RubyOnRails
[13:27:34] ocpysh: has joined #RubyOnRails
[13:28:29] funburn: has joined #RubyOnRails
[13:29:16] bronson: has joined #RubyOnRails
[13:33:47] funburn: has joined #RubyOnRails
[13:39:10] Jameser: has joined #RubyOnRails
[13:42:46] quirkycoders: has joined #RubyOnRails
[13:49:51] jhfisc: has joined #RubyOnRails
[13:52:19] ocpysh: has joined #RubyOnRails
[14:02:31] chouhoulis: has joined #RubyOnRails
[14:03:16] chouhoulis: has joined #RubyOnRails
[14:05:31] truenito: has joined #RubyOnRails
[14:05:42] mikecmpb_: has joined #RubyOnRails
[14:05:53] jhfisc: has joined #RubyOnRails
[14:08:54] beilabs: has joined #RubyOnRails
[14:09:20] Rodya_: has joined #RubyOnRails
[14:10:15] jhfisc: has joined #RubyOnRails
[14:13:44] truenito: has joined #RubyOnRails
[14:14:15] mercwithamouth: has joined #RubyOnRails
[14:15:57] ascarter: has joined #RubyOnRails
[14:16:05] ResidentBiscuit: has joined #RubyOnRails
[14:16:30] jhfisc: has joined #RubyOnRails
[14:21:27] quirkycoders: has joined #RubyOnRails
[14:21:43] quirkycoders: has joined #RubyOnRails
[14:22:34] TvL2386: hey guys, I followed this howto to the letter: https://gorails.com/deploy/ubuntu/16.04
[14:23:00] GodFather: has joined #RubyOnRails
[14:23:15] jhfisc: has joined #RubyOnRails
[14:23:31] TvL2386: I deployed on 16.04 as user "deploy". Got nginx installed and passenger as it states. I'm using rbenv as they recommend (and which I like), but when deploying with capistrano (i'm a noob with that), I get an error that phusion passenger is not running
[14:23:53] TvL2386: passenger-config stderr: *** ERROR: Phusion Passenger doesn't seem to be running.
[14:24:14] TvL2386: and that's true! I never started it, I was thinking nginx would do it automatically?
[14:24:48] TvL2386: so I'm kinda stuck as I don't know how I should manage passenger
[14:25:43] apparition47: has joined #RubyOnRails
[14:26:42] jhfisc: has joined #RubyOnRails
[14:26:55] quirkycoders: has joined #RubyOnRails
[14:27:11] cam27: has joined #RubyOnRails
[14:27:24] Jameser: has joined #RubyOnRails
[14:29:00] mikecmpbll: has joined #RubyOnRails
[14:30:13] quirkycoders: has joined #RubyOnRails
[14:30:25] bronson: has joined #RubyOnRails
[14:30:49] cam27: has left #RubyOnRails: ()
[14:32:18] banisterfiend: has joined #RubyOnRails
[14:38:22] jhfisc: has joined #RubyOnRails
[14:52:09] jhfisc: has joined #RubyOnRails
[14:53:12] basmoura: has joined #RubyOnRails
[14:54:14] basmoura: has left #RubyOnRails: ()
[14:54:22] basmoura: has joined #RubyOnRails
[14:57:35] jhfisc: has joined #RubyOnRails
[15:02:59] hahuang65: has joined #RubyOnRails
[15:03:30] jhfisc: has joined #RubyOnRails
[15:04:17] NoGodDamnIdea: has joined #RubyOnRails
[15:04:20] Rodya_: has joined #RubyOnRails
[15:05:50] truenito: has joined #RubyOnRails
[15:08:37] chouhoulis: has joined #RubyOnRails
[15:10:15] TvL2386: argh.... missed something :)
[15:12:20] Jameser: has joined #RubyOnRails
[15:12:22] TvL2386: forgot to uncomment the "# include passenger.conf" in nginx.conf -_-
[15:12:40] jhfisc: has joined #RubyOnRails
[15:15:00] mercwithamouth: has joined #RubyOnRails
[15:17:46] jhfisc: has joined #RubyOnRails
[15:22:29] ascarter: has joined #RubyOnRails
[15:23:50] jhfisc: has joined #RubyOnRails
[15:26:03] cagomez: has joined #RubyOnRails
[15:26:25] cagomez: has joined #RubyOnRails
[15:31:15] bronson: has joined #RubyOnRails
[15:33:06] Jameser: has joined #RubyOnRails
[15:35:01] dionysus69: has joined #RubyOnRails
[15:37:16] jhfisc: has joined #RubyOnRails
[15:37:59] truenito: has joined #RubyOnRails
[15:43:14] jhfisc: has joined #RubyOnRails
[15:43:18] brent__: has joined #RubyOnRails
[15:43:38] brent__: has joined #RubyOnRails
[15:45:29] ahrs: has joined #RubyOnRails
[15:49:14] jhfisc: has joined #RubyOnRails
[15:50:42] Jameser: has joined #RubyOnRails
[15:54:39] baweaver: By the power of Grayskull
[15:54:41] ChanServ: +o baweaver
[15:54:46] baweaver: I HAVE THE POWER
[15:54:46] [Butch]: has joined #RubyOnRails
[15:55:05] baweaver: ...to change the topic and tell you all Rails 5.1.3 is out.
[15:55:13] ChanServ: -o baweaver
[15:55:14] jhfisc: has joined #RubyOnRails
[15:56:27] matthewd: So's 5.0.5, in fact
[15:56:48] DoubleMalt: has joined #RubyOnRails
[15:57:18] npgm: has joined #RubyOnRails
[15:58:04] jhfisc: has joined #RubyOnRails
[16:04:45] jphase: has joined #RubyOnRails
[16:05:13] Rodya_: has joined #RubyOnRails
[16:05:56] gusrub: has joined #RubyOnRails
[16:07:33] tycoon177: i really need to start making the push on my boss to upgrade our rails version
[16:07:36] tycoon177: it's WAY out of date
[16:07:58] tycoon177: like 3.2.13 out of date
[16:09:27] tycoon177: are there any guides for making the upgrade? any time i've tried in development, specs start failing before i even bump it up to 4.x.x
[16:09:58] truenito: has joined #RubyOnRails
[16:11:09] ocpysh: has joined #RubyOnRails
[16:11:42] matthewd: > before i even bump it
[16:11:51] matthewd: tycoon177: Are you sure your specs aren't already failing? ;)
[16:12:22] tycoon177: matthewd: when i bump up to the latest 3.2.x, rspec starts throwing a hissy fit
[16:13:08] matthewd: I'd guess that's because you (are|are not) updating rspec at the same time
[16:13:46] tycoon177: alright, after i finish the feature i'm working on, i'll try again and see if i can give more useful info :)
[16:14:02] matthewd: The general answer to your question is http://guides.rubyonrails.org/upgrading_ruby_on_rails.html
[16:14:14] jhfisc: has joined #RubyOnRails
[16:14:37] tycoon177: i hate our db..that's one thing holding us back. we have to use mssql, so we're stuck with a 3rd party adapter that has to be managed as well :(
[16:14:51] matthewd: (It doesn't really speak to the complexities of the version dance to keep all the gems in sync at compatible versions as you move though)
[16:14:54] tycoon177: ACTION really wishes he worked here when this project was new
[16:15:14] tycoon177: matthewd: is that pretty much just trial and error?
[16:17:00] matthewd: For unimportant/uninteresting things I'll start by trying for no-change or very-latest; otherwise it can be worth checking rubygems.org release dates to find what was the latest at the relevant time
[16:17:27] tycoon177: alrighty :) i'm sure i'll be back in an hour or two after this feature is done
[16:17:46] tycoon177: well, the feature and lunch
[16:19:14] Or1on: has joined #RubyOnRails
[16:19:50] ocpysh: has joined #RubyOnRails
[16:24:41] Sylario: has joined #RubyOnRails
[16:25:27] matthewd: tycoon177: Also note that as that guide implies but probably doesn't explicitly say, you should upgrade to 3.2.latest, then 4.0.latest, 4.1.latest, etc -- don't skip any minors, or you'll miss deprecations.
[16:26:11] tycoon177: alright, where do i see deprecations appear? will they be in my specs output or?
[16:26:34] jhfisc: has joined #RubyOnRails
[16:27:07] beilabs: has joined #RubyOnRails
[16:27:36] matthewd: Yeah, they should be on stdout (or stderr?) by default. They're hard to miss :)
[16:28:57] brent__: has joined #RubyOnRails
[16:29:56] brent__: Having issuess w/ specs failing when runnign the larger suite( saying it can't find the route), and passing when running the the individual files
[16:30:12] ascarter: has joined #RubyOnRails
[16:30:15] tycoon177: thanks matthewd
[16:30:44] matthewd: brent__: --bisect
[16:31:45] brent__: When running a larger group of files, 2 files throw no route matches, and says its tryign to go to controller: 'abstracts', when it should be 'admin/abstracts'
[16:32:07] bronson: has joined #RubyOnRails
[16:32:23] brent__: matthewd: --bisect?
[16:33:19] matthewd: brent__: rspec --bisect should identify which other spec is running first and thereby causing the failure
[16:34:04] brent__: So should I do a rspec spec/controllers --bisect --failfast
[16:35:40] matthewd: Maybe? I'm more familiar with minitest-bisect; my knowledge of rspec's is limited to the fact it exists, sorry
[16:36:59] S1kx: has joined #RubyOnRails
[16:37:03] mercwithamouth: has joined #RubyOnRails
[16:37:33] jhfisc: has joined #RubyOnRails
[16:38:08] dionysus69: has joined #RubyOnRails
[16:38:23] brent__: No worries, thanks
[16:39:04] ocpysh: has joined #RubyOnRails
[16:42:03] truenito: has joined #RubyOnRails
[16:43:26] brent__: The minimal reproduction command is:
[16:43:26] brent__: rspec './spec/controllers/abstracts_controller_spec.rb[1:2:4:2:3]' './spec/controllers/admin/abstracts_controller_spec.rb[1:1:1:1]' --fail-fast
[16:43:32] brent__: matthewd: I got the following from the bisect command
[16:46:06] matthewd: Ah, do you have both an AbstractsController and an Admin::AbstractsController ?
[16:46:47] matthewd: Yeah, you're gonna have a bad time
[16:46:49] brent__: and the failure when running both is that the admin::AbstractsController test are pointing to 'abstracts' instead of 'admin/abstracts'
[16:46:49] matthewd: http://guides.rubyonrails.org/autoloading_and_reloading_constants.html#when-constants-aren-t-missed
[16:47:16] brent__: so it can't find the actions defined
[16:48:08] matthewd: In short: If AbstractsController is already loaded, when it first encounters Admin::AbstractsController, that will resolve to the existing AbstractsController instead of triggering a load for the nested one
[16:48:49] brent__: indeed soudsn like what's happening
[16:48:53] brent__: anyway around it?
[16:49:05] brent__: like unloading the abstracts controller at the ned of the file?
[16:49:14] jhfisc: has joined #RubyOnRails
[16:50:40] matthewd: You'll have the same behaviour in development, so no.
[16:51:05] ChanServ: +o baweaver
[16:51:05] matthewd: Per the links docs, the most practical solution is to use require_dependency to load the admin controller when the root controller gets loaded
[16:51:32] ChanServ: -o baweaver
[16:52:47] quirkycoders: has joined #RubyOnRails
[16:59:00] conta: has joined #RubyOnRails
[17:00:28] ocpysh: has joined #RubyOnRails
[17:03:32] jhfisc: has joined #RubyOnRails
[17:03:42] alfiemax: has joined #RubyOnRails
[17:03:50] hahuang65: has joined #RubyOnRails
[17:05:29] TvL2386: hey guys, I've puth fontawesome-webfont.woff2 in app/assets/fonts. This works great in development, but in production I get a 404
[17:06:02] Rodya_: has joined #RubyOnRails
[17:06:08] TvL2386: the browser tries to retrieve: /assets/fontawesome-webfont.woff?v=4.7.0
[17:07:17] TvL2386: I do have this: fontawesome-webfont-2adefcbc041e7d18fcf2d417879dc5a09997aa64d675b7a3c4b6ce33da13f3fe.woff2 in my production public/assets
[17:09:22] jhfisc: has joined #RubyOnRails
[17:09:38] cagomez: has joined #RubyOnRails
[17:13:28] cagomez: has joined #RubyOnRails
[17:14:40] jhfisc: has joined #RubyOnRails
[17:15:42] srinidhi: has joined #RubyOnRails
[17:15:52] rakm: has joined #RubyOnRails
[17:17:56] one_zero: has joined #RubyOnRails
[17:18:41] dviola: has joined #RubyOnRails
[17:25:16] jhfisc: has joined #RubyOnRails
[17:26:32] mercwithamouth: has joined #RubyOnRails
[17:26:34] jphase: has joined #RubyOnRails
[17:27:11] kies: has joined #RubyOnRails
[17:31:46] agent_white: has joined #RubyOnRails
[17:31:52] ascarter: has joined #RubyOnRails
[17:32:50] bronson: has joined #RubyOnRails
[17:33:14] jhfisc: has joined #RubyOnRails
[17:34:19] mikecmpbll: has joined #RubyOnRails
[17:36:17] DoubleMalt: has joined #RubyOnRails
[17:37:31] beilabs: has joined #RubyOnRails
[17:37:33] ascarter: has joined #RubyOnRails
[17:39:33] jhfisc: has joined #RubyOnRails
[17:40:24] TvL2386: issue of hardcoded stuff... gonna fix it
[17:40:52] brent__: matthewd: I put require_dependency 'app/controllers/admin/abstracts_controller' at the top o fmy admin::AbstractsController file yet get the same error
[17:45:48] ur5us: has joined #RubyOnRails
[17:54:54] ascarter: has joined #RubyOnRails
[17:55:53] jhfisc: has joined #RubyOnRails
[17:56:52] kies: has joined #RubyOnRails
[17:59:05] Ryzokuken: has joined #RubyOnRails
[17:59:37] Frem: has joined #RubyOnRails
[18:06:22] gthank: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[18:09:43] jhfisc: has joined #RubyOnRails
[18:09:54] Rodya_: has joined #RubyOnRails
[18:11:14] HelloCode: has joined #RubyOnRails
[18:14:20] s2013: has joined #RubyOnRails
[18:15:15] jhfisc: has joined #RubyOnRails
[18:16:35] bronson: has joined #RubyOnRails
[18:25:51] jhfisc: has joined #RubyOnRails
[18:30:10] agent_white: has joined #RubyOnRails
[18:31:30] lxsameer: has joined #RubyOnRails
[18:31:54] jhfisc: has joined #RubyOnRails
[18:33:01] MrPunkin: has joined #RubyOnRails
[18:35:33] conta: has joined #RubyOnRails
[18:37:15] jhfisc: has joined #RubyOnRails
[18:39:25] cjk101010: has joined #RubyOnRails
[18:40:42] Rodya_: has joined #RubyOnRails
[18:48:58] jhfisc: has joined #RubyOnRails
[18:54:19] jhfisc: has joined #RubyOnRails
[18:56:48] conta: has joined #RubyOnRails
[19:00:07] gambl0re: has joined #RubyOnRails
[19:00:24] ascarter: has joined #RubyOnRails
[19:02:23] marr: has joined #RubyOnRails
[19:05:27] cjk101010: has left #RubyOnRails: ("Textual IRC Client: www.textualapp.com")
[19:05:39] chouhoulis: has joined #RubyOnRails
[19:06:43] jhfisc: has joined #RubyOnRails
[19:07:59] high_fiver: has joined #RubyOnRails
[19:11:35] chouhoulis: has joined #RubyOnRails
[19:16:26] jhfisc: has joined #RubyOnRails
[19:22:58] planigan: has joined #RubyOnRails
[19:30:00] jhfisc: has joined #RubyOnRails
[19:33:12] guacamole: has joined #RubyOnRails
[19:36:38] jhfisc: has joined #RubyOnRails
[19:37:59] cagomez: has joined #RubyOnRails
[19:41:35] netzfisch: has joined #RubyOnRails
[19:50:21] mostlybadfly: has joined #RubyOnRails
[19:51:12] jhfisc: has joined #RubyOnRails
[19:52:23] jphase: has joined #RubyOnRails
[19:58:09] dminuoso: has left #RubyOnRails: ("Leaving")
[20:00:02] jhfisc: has joined #RubyOnRails
[20:00:15] s2013: has joined #RubyOnRails
[20:01:35] FastJack: has joined #RubyOnRails
[20:05:20] ascarter: has joined #RubyOnRails
[20:06:42] FastJack: has joined #RubyOnRails
[20:08:49] netzfisch: has joined #RubyOnRails
[20:11:49] rakm: has joined #RubyOnRails
[20:13:25] jhfisc: has joined #RubyOnRails
[20:13:28] Rodya_: has joined #RubyOnRails
[20:18:59] s2013: has joined #RubyOnRails
[20:28:52] armando: has joined #RubyOnRails
[20:32:34] funburn: why is my migration typed :string ending up as a MYSQL typed TEXT? https://gist.github.com/mtuckerb/415747e5d8bdca3a3f7ace87ad95c5ac
[20:33:20] jphase: has joined #RubyOnRails
[20:33:25] netzfisch: has joined #RubyOnRails
[20:35:39] hahuang65: has joined #RubyOnRails
[20:41:36] srinidhi: has joined #RubyOnRails
[20:42:43] arup_r: has joined #RubyOnRails
[20:59:39] ur5us: has joined #RubyOnRails
[21:06:23] gost: has joined #RubyOnRails
[21:12:12] ascarter: has joined #RubyOnRails
[21:16:54] arBmind: has joined #RubyOnRails
[21:20:22] cpruitt: has joined #RubyOnRails
[21:20:43] Rodya_: has joined #RubyOnRails
[21:26:04] gost: has joined #RubyOnRails
[21:27:07] cpruitt: has joined #RubyOnRails
[21:29:05] alfiemax: has joined #RubyOnRails
[21:30:26] netzfisch: has joined #RubyOnRails
[21:31:22] GodFather: has joined #RubyOnRails
[21:32:37] rgr: has joined #RubyOnRails
[21:33:43] hahuang65: has joined #RubyOnRails
[21:37:07] GodFather: has joined #RubyOnRails
[21:40:11] GodFather: has joined #RubyOnRails
[21:49:19] desnudopenguino: has joined #RubyOnRails
[21:51:30] GodFather: has joined #RubyOnRails
[21:53:16] desnudopenguino: i'm trying to use the whenever gem to have cron/timed things happening in my project. I have it set up, and it is trying to execute. I have it set to execute 'runner "MailManager.import"', but I am getting "undefined method `get_mail' for MailManager:Class
[21:53:20] desnudopenguino: Please specify a valid ruby command or the path of a script to run.
[21:53:22] desnudopenguino: Run 'bin/rails runner -h' for help.
[21:57:09] workmad3: has joined #RubyOnRails
[21:59:38] jphase: has joined #RubyOnRails
[22:00:53] jhfisc: has joined #RubyOnRails
[22:01:02] guacamole: has joined #RubyOnRails
[22:17:22] ascarter: has joined #RubyOnRails
[22:18:06] segy_: has joined #RubyOnRails
[22:29:54] jarr0dsz: has joined #RubyOnRails
[22:30:18] jarr0dsz: hi everyone, is it possible somehow to change the key from a rails form params hash?
[22:31:37] jarr0dsz: for example "organisation"=>{"email"=>"r", ... i want that "organisation" to be renamed to something else but havent found out how to do so
[22:34:35] jarr0dsz: i expected params.update(:email => 'bla') to work also for example
[22:35:07] jarr0dsz: but in this case i need a 'key' rename and cannot find , probably searching wrong anything on how to approach
[22:39:11] jarr0dsz: also this fails params["user"] = params.delete("organisation")
[22:41:37] creature: has joined #RubyOnRails
[22:43:47] jhfisc: has joined #RubyOnRails
[22:44:36] Radar: jarr0dsz: Why does the key need to be renamed?
[22:45:14] jarr0dsz: i had some refersh/better errors gem issue it seems the parameter hash is renamed after all
[22:45:40] jarr0dsz: actually im trying to modify devise for an hour now, very simple question one would say. no solution so far. have devise accept multiple models with a single form
[22:46:33] jarr0dsz: now its a bit hackish what i have comeup with so far: https://gist.github.com/jordanlance/f24dc35b09995e66fc55c52bcc2aa0f0
[22:47:06] jarr0dsz: i have found 3 forum topics/google groups in devise 2 stackoverflow posts 3 old gists (2012 area ) and no solution anywhere
[22:47:12] segy_: has joined #RubyOnRails
[22:47:40] jarr0dsz: so i thought i was smart just checking if the email is in any of the models then just rewriting the parma hashes and modifying the scope but it still does not work
[22:48:18] jarr0dsz: my test case, login as a regular user , the default devise scope = :organisation and all scopes are assigned to route / ( root ) which is my login form
[22:48:31] Radar: params[:user] = params[:organisation]
[22:48:34] helpa: Next question, please!
[22:48:34] jarr0dsz: perhaps another lonely soul ad 0:48 my local time has an idea on how this could be resolved
[22:48:51] Radar: https://gist.github.com/jordanlance/f24dc35b09995e66fc55c52bcc2aa0f0#file-devise_session_controller-rb-L5
[22:48:52] Radar: Seems wrong
[22:49:02] Radar: Any particular reason to use where + first instead of find_by?
[22:50:04] jarr0dsz: Radar correct typo , no find_by would be faster i assume
[22:50:52] Radar: what if I told you that it was the same database query.
[22:52:05] jarr0dsz: Radar so find_by is just a 'wrapper' alias, i red somewhere that find was faster then a where(:id => params[:id]) recently
[22:52:19] Radar: [citation needed]
[22:52:21] jarr0dsz: the strange thing with my code it is still trying to authenticate as :organisation even while it detects my ifelse block
[22:52:35] jhfisc: has joined #RubyOnRails
[22:53:01] jarr0dsz: i don't have that link anymore probably not true then overlooked, find is not faster than where?
[22:53:04] Radar: https://gist.github.com/jordanlance/f24dc35b09995e66fc55c52bcc2aa0f0#file-devise_session_controller-rb-L12
[22:53:07] Radar: Hm could this be returning true
[22:53:24] jphase: has joined #RubyOnRails
[22:53:37] Radar: jarr0dsz: find_by runs the SAME query as where + first.
[22:53:48] Radar: So if it's the same DB query, do you think it would be faster, slower, or the same?
[22:53:51] Radar: Keyword: SAME.
[22:54:06] ocpysh: has joined #RubyOnRails
[22:54:09] jarr0dsz: Radar point made sir just an alias / syntahx then
[22:54:16] jarr0dsz: yes it does return a true Radar
[22:54:30] Radar: Post.where(title: "j").first
[22:54:30] Radar: Post Load (0.2ms) SELECT "posts".* FROM "posts" WHERE "posts"."title" = ? ORDER BY "posts"."id" ASC LIMIT ? [["title", "j"], ["LIMIT", 1]]
[22:54:41] Radar: Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."title" = ? LIMIT ? [["title", "j"], ["LIMIT", 1]]
[22:54:48] Radar: Second one is from find_by.
[22:54:54] Radar: Seems like that does not have the explicit order by clause.
[22:54:55] jarr0dsz: my thought was I just lookup the different Devise models then I know what entity im working with then rewrite the authentication params for devise so it logs in as that entity but this fails
[22:55:27] Radar: jarr0dsz: so if it's returning a record... and it's authenticating as an organisation... isn't that obvious why it would be authenticating as an organisation?
[22:55:39] Radar: Ruby does not enter an if clause like that if its condition isn't true. So it would seem that it's true?
[22:55:44] jarr0dsz: https://gist.github.com/jordanlance/c30866080f3fc2eb9f15142a1e784ad8 <= even after changing the typo, it says invalid password so my first thought was i have to rewrite the params hash so it uses params[:user][:password]
[22:56:29] jarr0dsz: Radar not I assume there are some other params that devise uses
[22:57:51] jarr0dsz: its still messy i have to rewrite the param hash to begin with but for now no idea how to prevent that, devise seems to really not support multiple models 1 login form
[22:58:17] jarr0dsz: jose even posted on the google groups in regard to a post on this subject with no real solution just some pointers using custom warden
[22:58:39] jarr0dsz: my thought was if i can rewrite the request to authenticate in a way that it thinks its a User instead of Organisation it should work
[23:00:03] jarr0dsz: env['warden'].authenticate!(:password, :scope => :publisher) # throws if it cannot authenticate, <= this is from warden.authenticate! a bit lost where that password comes from
[23:00:23] jarr0dsz: i assumed that would be lifted from the params[:my_model][:password]
[23:03:04] ocpysh: I have an enum, and I would like to create a select tag from it. I've tried select_tag :status, Project.statuses but that generate a select with one option with the json representation in it.
[23:03:12] ocpysh: (I'm new to Rails/Ruby)
[23:03:38] jphase: has joined #RubyOnRails
[23:03:48] ocpysh: this is Rails 5+
[23:09:51] jarr0dsz: running a debugger with breakpoint it seems https://gist.github.com/jordanlance/f28db287f323893df0f5583ae73543cb that user is nil
[23:10:05] jarr0dsz: anyone has an idea that could lead in right direction?
[23:10:08] jhfisc: has joined #RubyOnRails
[23:15:31] jhfisc: has joined #RubyOnRails
[23:24:04] ascarter: has joined #RubyOnRails
[23:25:27] RahulT: has joined #RubyOnRails
[23:30:41] jhfisc: has joined #RubyOnRails
[23:35:38] conta1: has joined #RubyOnRails
[23:42:42] jhfisc: has joined #RubyOnRails
[23:53:25] jhfisc: has joined #RubyOnRails
[23:59:41] jhfisc: has joined #RubyOnRails