« Back to channel list

#RubyOnRails - 22 January 2019

« Back 1 day Forward 1 day »
[00:04:47] quazimodo: has joined #RubyOnRails
[00:10:08] xall: has joined #RubyOnRails
[00:10:18] tdy1: has joined #RubyOnRails
[00:34:21] uplime: has joined #RubyOnRails
[00:40:58] lexileo: has joined #RubyOnRails
[00:46:56] thoraxe: has joined #RubyOnRails
[00:47:34] thoraxe: hmm... so i'm using devise, I have jquery vendored in, jquery is definitely working, but the sign_out delete method thing doesn't seem to be working. Chrome is just doing GETs when I click the link
[00:49:52] thoraxe: ohh i think i specifically need rails ujs
[01:00:10] DoctorMonocular: has joined #RubyOnRails
[01:01:46] DoctorMonocular: hey, I have an activerecord model I run a query for by doing some stuff like query = Model.where(...).etc , then return query.all
[01:02:10] DoctorMonocular: then I later take that result and run a result.each
[01:02:21] DoctorMonocular: and when I do that it runs the query again
[01:02:28] DoctorMonocular: why might that be?
[01:03:33] lupine: you've probably got an ActiveRecord::Relation to run `each` on
[01:03:46] lupine: normally this is good, but if it's bad, you can always explicitly `.to_a` at the right point
[01:05:36] DoctorMonocular: I do -- is the usual behavior for each to trigger a new query for a relation?
[01:07:46] tdy1: has joined #RubyOnRails
[01:20:15] Scriptonaut: has left #RubyOnRails: ()
[01:23:02] gambl0r3: has joined #RubyOnRails
[01:29:41] sevenseacat: has joined #RubyOnRails
[01:37:22] fcser__: has joined #RubyOnRails
[01:41:16] Croata: has joined #RubyOnRails
[01:52:33] Jervis_: has joined #RubyOnRails
[01:58:31] mr_roybot: has joined #RubyOnRails
[02:12:11] andrewray: does a gem's name have nothing to do with requiring it?
[02:25:28] sevenseacat: they should be the same, but its not required, no
[03:34:16] quazimodo: has joined #RubyOnRails
[03:47:17] tdy1: has joined #RubyOnRails
[04:01:11] za1b1tsu: has joined #RubyOnRails
[04:08:54] braincrash: has joined #RubyOnRails
[04:12:21] uplime: has joined #RubyOnRails
[04:15:48] chouhoulis: has joined #RubyOnRails
[04:21:48] darris_: has joined #RubyOnRails
[04:23:42] duderonomy: has joined #RubyOnRails
[04:58:51] segy: has joined #RubyOnRails
[05:15:59] mr_roybot: has joined #RubyOnRails
[05:35:08] Avinash: has joined #RubyOnRails
[05:50:02] phaul: has joined #RubyOnRails
[05:50:03] uks: has joined #RubyOnRails
[06:02:57] tdy1: has joined #RubyOnRails
[06:16:11] Avinash: has joined #RubyOnRails
[06:18:13] kapil____: has joined #RubyOnRails
[06:19:47] Xiti: has joined #RubyOnRails
[06:22:55] Dykam: has joined #RubyOnRails
[06:37:46] srinidhi: has joined #RubyOnRails
[06:38:23] crankharder: has joined #RubyOnRails
[06:44:28] Avinash: has joined #RubyOnRails
[06:49:07] tdy1: has joined #RubyOnRails
[06:50:04] srinidhi: has joined #RubyOnRails
[07:08:24] reber: has joined #RubyOnRails
[07:33:01] tdy1: has joined #RubyOnRails
[07:35:54] quazimodo: has joined #RubyOnRails
[07:41:44] Avinash: has joined #RubyOnRails
[07:48:30] crankharder: has joined #RubyOnRails
[07:52:46] srinidhi: has joined #RubyOnRails
[08:01:02] lubekpl: has joined #RubyOnRails
[08:03:19] conta: has joined #RubyOnRails
[08:35:35] egray: has joined #RubyOnRails
[08:51:50] Terens: has joined #RubyOnRails
[08:57:29] lubekpl: terens: hi
[09:03:56] paranoicsan: has joined #RubyOnRails
[09:18:45] mikecmpbll: has joined #RubyOnRails
[09:26:21] blackmesa1: has joined #RubyOnRails
[09:29:28] Ergo: has joined #RubyOnRails
[09:45:03] lxsameer: has joined #RubyOnRails
[09:45:20] fox_mulder_cp: thoraxe delete method must be button action, no get url
[09:47:06] Avinash: has joined #RubyOnRails
[09:49:26] srinidhi: has joined #RubyOnRails
[10:07:23] arooni: has joined #RubyOnRails
[10:13:18] dionysus69: has joined #RubyOnRails
[10:20:33] lxsameer: has joined #RubyOnRails
[10:40:35] lxsameer: has joined #RubyOnRails
[11:05:50] Linuus`: has joined #RubyOnRails
[11:13:27] lxsameer: has joined #RubyOnRails
[11:14:47] paranoicsan: has joined #RubyOnRails
[11:17:00] srinidhi: has joined #RubyOnRails
[11:20:28] snickers: has joined #RubyOnRails
[11:41:35] lxsameer: has joined #RubyOnRails
[11:42:58] Linuus`: has joined #RubyOnRails
[11:53:37] kapil____: has joined #RubyOnRails
[11:55:28] ariedler: has joined #RubyOnRails
[11:57:47] ariedler: has joined #RubyOnRails
[11:59:06] conta: has joined #RubyOnRails
[12:07:54] ams__: has joined #RubyOnRails
[12:35:28] RedNifre: has joined #RubyOnRails
[13:03:42] beholders_eye: has joined #RubyOnRails
[13:04:16] Avinash: has joined #RubyOnRails
[13:11:42] blackmesa1: Hi all. Ive been using active storage. I just checked that images are viewable by everyone via the direct image links. https://mydomain.com/rails/active_storage/disk/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/image?content_type=image%2Fpng&disposition=inline%3B+filename%3D"image"%3B+filename%2A%3DUTF-8%27%27image
[13:12:22] blackmesa1: can I policy this only for logged in users
[13:15:21] blackmesa1: https://stackoverflow.com/questions/49808950/secure-active-storage-with-devise
[13:23:31] akosednar: has joined #RubyOnRails
[13:25:13] Avinash: has joined #RubyOnRails
[13:42:50] tdy1: has joined #RubyOnRails
[13:51:50] kidPalooma: has joined #RubyOnRails
[13:52:18] kidPalooma: Hello, how do I find and perform an ActiveJob instance by jid?
[13:54:01] lexileo: has joined #RubyOnRails
[13:55:04] Linuus`: has joined #RubyOnRails
[14:00:11] mr_roybot: has joined #RubyOnRails
[14:04:32] phaul: has joined #RubyOnRails
[14:07:28] Avinash: has joined #RubyOnRails
[14:10:49] lxsameer: has joined #RubyOnRails
[14:12:27] alan_w: has joined #RubyOnRails
[14:29:57] MeXTuX: has joined #RubyOnRails
[14:30:29] MeXTuX: has left #RubyOnRails: ()
[14:30:55] Avinash: has joined #RubyOnRails
[14:39:00] cpruitt: has joined #RubyOnRails
[15:00:10] segy: has joined #RubyOnRails
[15:06:08] beholders_eye: has joined #RubyOnRails
[15:17:36] gambl0r3: has joined #RubyOnRails
[15:21:03] conta: has joined #RubyOnRails
[15:33:39] hive-mind: has joined #RubyOnRails
[15:37:44] DTZUZO_: has joined #RubyOnRails
[15:43:39] hive-mind: has joined #RubyOnRails
[15:50:31] lupine: has joined #RubyOnRails
[15:54:14] peterhil: has joined #RubyOnRails
[15:55:59] lupine: has joined #RubyOnRails
[15:59:16] srinidhi: has joined #RubyOnRails
[16:01:56] conta: has joined #RubyOnRails
[16:04:51] andrewray: has joined #RubyOnRails
[16:05:13] chouhoulis: has joined #RubyOnRails
[16:22:27] phaul: has joined #RubyOnRails
[16:22:38] srinidhi: has joined #RubyOnRails
[16:25:18] Linuus`: has joined #RubyOnRails
[16:28:06] conta: has joined #RubyOnRails
[16:38:45] beholders_eye: has joined #RubyOnRails
[16:42:21] gambl0r3: has joined #RubyOnRails
[16:45:11] paranoicsan: has joined #RubyOnRails
[16:49:24] rikkipitt: has joined #RubyOnRails
[16:50:13] beholders_eye: has joined #RubyOnRails
[16:52:03] Avinash: has joined #RubyOnRails
[16:57:59] orbyt_: has joined #RubyOnRails
[17:08:17] blackmesa: has joined #RubyOnRails
[17:20:19] blackcross: has joined #RubyOnRails
[17:20:30] krawchyk: has joined #RubyOnRails
[17:30:56] lxsameer: has joined #RubyOnRails
[17:40:32] srinidhi: has joined #RubyOnRails
[17:51:36] fragamus: has joined #RubyOnRails
[17:52:11] broman: has joined #RubyOnRails
[17:52:57] broman: can anyone please help me? I have a rails 3.2 application and I'm trying to run it locally using rails_env=production.. the database.yml is set but when I try to run the rails s, it gives me the "database configuration does not specify adapter" error
[17:54:02] fox_mulder_cp: broman: seems that is reaaly not specified ))
[17:54:42] beholders_eye: has joined #RubyOnRails
[17:56:30] broman: fox_mulder_cp, but it is on the database.yml file... if I do a rails s -e development it works
[17:56:37] broman: both of them are defined on that file
[17:56:42] tdy1: has joined #RubyOnRails
[17:58:07] broman: if a change the name from production to productions on database.yml and do a rails s -e productions, it works
[17:59:47] MrPunkin: has joined #RubyOnRails
[18:00:36] MrPunkin: Hey all. Given a class like this (https://github.com/miastologia/basecamp3-api-wrapper/blob/master/lib/basecamp3.rb) how can I extend it via concerns? The normal method doesn’t seem to be changing the dynamic subclasses of Basecamp3 at all.
[18:01:49] mr_roybot: has joined #RubyOnRails
[18:04:02] Dbugger: has joined #RubyOnRails
[18:09:12] havenwood: MrPunkin: The docs have good examples: https://api.rubyonrails.org/classes/ActiveSupport/Concern.html
[18:09:19] havenwood: MrPunkin: https://gist.github.com/havenwood/9bb854b2cdaa7d1ede2a0f168ccb0c2f
[18:10:17] MrPunkin: I need to extend that existing Basecamp3 ‘eigenclass’ so I can overwrite the connect method.
[18:18:00] mr_roybot: has joined #RubyOnRails
[18:23:50] mr_roybot: has joined #RubyOnRails
[18:32:52] fox_mulder_cp: broman your production database section can't contain adapter type line. check and compare development and production section. it's missmatched
[18:47:50] mikecmpbll: has joined #RubyOnRails
[18:56:42] Technodrome: has joined #RubyOnRails
[18:56:48] Linuus`: has joined #RubyOnRails
[19:10:31] srinidhi: has joined #RubyOnRails
[19:14:02] reber: has joined #RubyOnRails
[19:19:13] dviola: has joined #RubyOnRails
[19:36:21] lxsameer: has joined #RubyOnRails
[19:40:53] gambl0r3: has joined #RubyOnRails
[19:44:10] gambl0r3: has joined #RubyOnRails
[19:45:46] ravenous_: has joined #RubyOnRails
[19:52:20] quazimodo: has joined #RubyOnRails
[20:01:38] gambl0r3: has joined #RubyOnRails
[20:03:45] ivanskie: has joined #RubyOnRails
[20:04:31] ivanskie: hi, im running rails in docker. with compose.. and i specified bundle to install gems into ./vendor folder. im still getting this:
[20:04:32] ivanskie: core_1 | /app/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/version.rb:3: warning: already initialized constant Rake::VERSION
[20:04:32] ivanskie: core_1 | /usr/local/bundle/gems/rake-12.3.1/lib/rake/version.rb:3: warning: previous definition of VERSION was here
[20:04:33] ivanskie: core_1 | /app/vendor/ruby/2.3.0/gems/rake-12.3.1/lib/rake/version.rb:6: warning: already initialized constant Rake::Version::MAJOR
[20:04:34] ivanskie: core_1 | /usr/local/bundle/gems/rake-12.3.1/lib/rake/version.rb:6: warning: previous definition of MAJOR was here
[20:04:40] ivanskie: anyone seen that before?
[20:19:31] tpanarch1st: has joined #RubyOnRails
[20:19:35] tpanarch1st: good evening all!
[20:20:17] tpanarch1st: i'm a bit lost on how postgres sql comes into play with rails, whenever i've worked with a CMS, for example, it's use mysql and required that to be installed. The tutorials i've seen don't seem to require this
[20:20:30] hahuang6-: has joined #RubyOnRails
[20:22:29] gambl0r3: has joined #RubyOnRails
[20:29:53] ur5us: has joined #RubyOnRails
[20:32:29] chouhoulis: has joined #RubyOnRails
[20:33:35] quazimodo: has joined #RubyOnRails
[20:39:08] ^amra: has joined #RubyOnRails
[20:48:27] blackjid: has joined #RubyOnRails
[20:53:14] alan_w: has joined #RubyOnRails
[20:54:20] segy: has joined #RubyOnRails
[20:55:59] MrPunkin: tpanarch1st: That’s because Rails defaults to Postgres which is a different DB.
[20:56:14] ivanskie: has joined #RubyOnRails
[20:56:16] MrPunkin: tpanarch1st: You can install it, or you can opt to make your Rails project use MySQL instead, or any of the many DB clients available
[21:00:11] hammer065: has joined #RubyOnRails
[21:01:11] Linuus`: has joined #RubyOnRails
[21:01:38] tpanarch1st: thanks for this MrPunkin so i think, by installing ruby and also rails, postgres comes down with it?
[21:02:12] MrPunkin: I don’t believe it gets installed, I believe you still need to install it. I’ve never used it though, so I’m not the one to ask.
[21:02:53] MrPunkin: I believe it just expects it and installs the gem to interact with it, and you need to configure it with the port, host, username, password, etc to use it.
[21:02:57] MrPunkin: as you would with MySQL
[21:04:14] tpanarch1st: beanie@laptop ~ $ \curl -sSL https://get.rvm.io | bash -s stable --ruby Installing required packages:...sqlite3
[21:04:32] tpanarch1st: not sure what sqllite3 is :)
[21:05:31] tpanarch1st: so the same gem will deal with mysql or postgre etc
[21:05:57] MrPunkin: I do all MySQL and as such have to install the mysql2 gem
[21:06:16] tpanarch1st: ah awesome, i'm totally new as you probably guessed!
[21:06:34] tpanarch1st: what should be my thought process between postgres and mysql please
[21:06:35] MrPunkin: tpanarch1st: https://guides.rubyonrails.org/v2.3/getting_started.html
[21:07:22] tpanarch1st: thanks for this MrPunkin any objection to me having just done all this? https://github.com/coder-academy-students/rails-setup-for-linux
[21:07:53] MrPunkin: tpanarch1st: nope that seems like a good first step to get Ruby ready on your system before diving into rails.
[21:08:28] MrPunkin: That’s what I always do first on a new machine, get RVM installed with whatever ruby I want and the rails version I want
[21:09:01] tpanarch1st: ah sweet - so no issues there!
[21:09:11] MrPunkin: regarding Postgres / MySQL / SQLite… you’re going to need to do your research as to which to use. If you are familiar with MySQL I’d say just stick with that unless you wanna learn something new
[21:09:32] tpanarch1st: what is the most popular - is it still mysql
[21:12:23] blackmesa: has joined #RubyOnRails
[21:12:45] dtzuzu: has joined #RubyOnRails
[21:14:10] MrPunkin: tpanarch1st: I’m not really sure. SQLite is probably the most popular by installs, as they claim to be on most mobile phones and computers by default
[21:14:18] MrPunkin: but it doesn’t have a lot of the power features of the others I don’t think
[21:16:25] tpanarch1st: ah fairs, thanks MrPunkin - in terms of using atom as an IDE - is this OK?
[21:16:36] tpanarch1st: and is there much to using it with rails dev
[21:16:51] MrPunkin: I use Atom and am happy with it. I primarily just use it for writing code and then running my tests within the app
[21:17:40] tpanarch1st: i guess testing out the app just involves visiting a web address of some description locally - i think there's a way of telling rails to fire up a test server
[21:18:11] MrPunkin: yeah I believe it’s just `rails serve` or something along those lines
[21:19:03] tpanarch1st: ah sweet, is it possible/worth bothering to incorporate terminal for rails within atom
[21:19:30] MrPunkin: You can run any normal terminal commands within Atom I believe, but I tend to keep my Mac terminal open instead
[21:19:50] tpanarch1st: sweet, thanks ever so much for all of your advice, it's very much appreciated
[21:20:19] MrPunkin: Yeah no problem :)
[21:20:28] tpanarch1st: i wanted to create a vinyl database, i've watched the blog tutorials a few times, is there a good tutorial for that kind of application geared towards a newb like me?
[21:21:06] tfitts: has joined #RubyOnRails
[21:21:12] MrPunkin: You’d be best to start out learning about basic rails “scaffolding”
[21:21:36] MrPunkin: which is a part of that getting started guide I sent a link to
[21:24:17] tfitts: I'm wondering if anyone knows when using ActiveModelSerializers if there is a way to have a has many relationship return nil or even not have the key in the json response instead of having an empty array
[21:24:48] tpanarch1st: thanks MrPunkin i shall plug away at that - i guess my project will be explained to me through working on that
[21:26:16] sjmbach: has joined #RubyOnRails
[21:27:06] MrPunkin: tfitts: an easy way would be to simply hijack the as_json method on your model and override or delete the key in question based on your own criteria
[21:32:44] MrPunkin: Can anyone tell me how to add methods to a class defined in a gem? I’ve tried every example I can find online and none are making them available on instances of that class.
[21:35:46] conta: has joined #RubyOnRails
[21:40:05] eclm: has joined #RubyOnRails
[21:44:21] chouhoulis: has joined #RubyOnRails
[21:55:08] conta: has joined #RubyOnRails
[21:57:14] rikkipitt: has joined #RubyOnRails
[22:09:59] krawchyk: has joined #RubyOnRails
[22:10:46] conta: has joined #RubyOnRails
[22:14:22] fragamus: has joined #RubyOnRails
[22:34:33] fragamus: has joined #RubyOnRails
[22:52:24] dozzed: i need a dev for very simple site, pm me if someone wants a littl ebit of money, maybe you have account in fiverr
[22:52:36] dozzed: i have the design of the site ready ,just need coder
[23:03:11] conta: has joined #RubyOnRails
[23:16:28] istrasci: has joined #RubyOnRails
[23:21:00] istrasci: I have an association User has_many :address. How can I make a second association has_one :home_address by giving a condition of the Address (like type = 'home')?
[23:21:30] brandoncc: has joined #RubyOnRails
[23:27:55] blackmesa: I am using Minitest. when I use "Class.create!" in a controller test, the record isnt saved to the test database. Only fixtures are stored?
[23:36:26] chouhoulis: has joined #RubyOnRails
[23:43:24] fragamus: has joined #RubyOnRails
[23:50:03] Linuus`: has joined #RubyOnRails
[23:56:12] borodin: has joined #RubyOnRails
[23:57:22] orbyt_: has joined #RubyOnRails