« Back to channel list

#RubyOnRails - 20 March 2017

« Back 1 day Forward 1 day »
[00:03:55] dps: has joined #RubyOnRails
[00:05:05] Radar: roflmyeggo: steps to reproduce please
[00:07:26] roflmyeggo: Radar: 1. new rails 5.0.2 app, 2. add compass-rails 3.0.2 to Gemfile, 3. bundle install, 4. bundle exec compass init rails .
[00:07:55] Radar: https://github.com/Compass/compass-rails
[00:08:05] Radar: I don't see here what tells you to run "bundle exec compass init rails"
[00:08:49] roflmyeggo: Radar: the main reason i was attempting is that `bundle exec compass watch` isnt actually watching any files
[00:09:15] rgtk: has joined #RubyOnRails
[00:09:30] Radar: I don't have experience with compass so I can't help you there.
[00:09:51] djbkd: has joined #RubyOnRails
[00:09:51] roflmyeggo: Radar: no worries
[00:09:57] roflmyeggo: ill open an issue
[00:10:38] cschneid_: has joined #RubyOnRails
[00:19:13] jordansz: has joined #RubyOnRails
[00:20:45] jordansz: has joined #RubyOnRails
[00:21:24] gambl0re: has joined #RubyOnRails
[00:28:29] Technodrome: has joined #RubyOnRails
[00:33:57] roamingdog: has joined #RubyOnRails
[00:40:39] nOwz: has joined #RubyOnRails
[00:45:16] Duckily: has joined #RubyOnRails
[00:50:19] hakash: has joined #RubyOnRails
[00:58:11] r3vDev: has joined #RubyOnRails
[01:00:28] cschneid_: has joined #RubyOnRails
[01:02:19] cschneid_: has joined #RubyOnRails
[01:24:40] Technodrome: has joined #RubyOnRails
[01:25:00] rafaeldelucena: has joined #RubyOnRails
[01:30:09] Trynemjoel: has joined #RubyOnRails
[01:31:55] lightheaded: has joined #RubyOnRails
[01:34:21] knight33: has joined #RubyOnRails
[01:36:30] ElDoggo: has joined #RubyOnRails
[01:37:58] ElDoggo: I'm trying to set up multiple databases to use the same connection pool with ActiveRecord. https://gist.github.com/TomatoOmelette/0b0d15c38c72075b08a2b64826f9bf96
[01:38:19] ElDoggo: I'm getting an error on my first connection attempt, but a second query returns the expected result.
[01:40:23] HoierM: has joined #RubyOnRails
[01:40:49] ElDoggo: Has anyone seen this before? I have a base abstract class that inherits from ActiveRecord, and then have models inheriting from the base class.
[01:56:04] jstrong: has joined #RubyOnRails
[01:59:57] cschneid_: has joined #RubyOnRails
[02:01:32] Schoolmeister: has joined #RubyOnRails
[02:03:04] Shidash: has joined #RubyOnRails
[02:03:16] tomasm-: has joined #RubyOnRails
[02:03:52] pwntrik: has joined #RubyOnRails
[02:07:41] Schoolmeister: Hi, I've got a question. Say I have this piece of code to handle JSON requests: https://gist.github.com/schoolmeister/6841c7e791bf95a498df4fa065c2a778 . What would be the correct way of adding an extra attribute to the JSON response with a direct link to the resource?
[02:08:02] lightheaded: has joined #RubyOnRails
[02:09:32] Schoolmeister: E.g. I want it to return {"id":1,"title":" Nihil","description":"@ Sioux","url":"www.url.com/events/1"}
[02:10:27] Schoolmeister: instead of just the resource without the url
[02:11:24] pwntrik: Hi :) I'm trying to resurrect an old project. `build install` runs successfully. When I try to `rake db:migrate` it passes through most of the migrations then fails at this line: add_index :people, :name
[02:11:24] pwntrik: "NameError: uninitialized constant ActiveRecord::Core::LegacyYamlAdapter"
[02:11:24] pwntrik: Is that command now deprecated? I checked the rails API and it doesn't appear to be but for some reason it's wanting to use a "Legacy" helper class. Any help is much appreciated thanks :)
[02:11:47] cht: http://stackoverflow.com/questions/5129356/render-json-with-extra-data
[02:12:04] cht: Schoolmeister ^
[02:12:39] Schoolmeister: cht: Oh wow, didn't find that post. Thanks! :)
[02:15:16] _3dwardsharp: has joined #RubyOnRails
[02:22:56] pwntrik: anyone know what's up with this error "uninitialized constant ActiveRecord::Core::LegacyYamlAdapter" can't even find on google. ActiveRecord (the Constant's parent) is installed and my migration now runs but the server still gives this error when I refresh the public server
[02:29:21] pwntrik1: has joined #RubyOnRails
[02:30:56] pwntrik2: has joined #RubyOnRails
[02:33:33] gthank: has left #RubyOnRails: ()
[02:33:54] dps: has joined #RubyOnRails
[02:34:42] Jameser: has joined #RubyOnRails
[02:35:30] pwntrik: has joined #RubyOnRails
[02:35:40] pwntrik: hey I'm back... anyone know what's up with this error "uninitialized constant ActiveRecord::Core::LegacyYamlAdapter" can't even find on google. ActiveRecord (the Constant's parent) is installed and my migration now runs but the server still gives this error when I refresh the public server
[02:41:27] nOwz: has joined #RubyOnRails
[02:43:01] hahuang65: has joined #RubyOnRails
[02:46:16] shinnya: has joined #RubyOnRails
[02:47:11] Jasaka: has joined #RubyOnRails
[02:55:22] cschneid_: has joined #RubyOnRails
[02:56:41] Derperperd: has joined #RubyOnRails
[02:58:29] aajjbb: has joined #RubyOnRails
[03:03:40] xaviergmail: has joined #RubyOnRails
[03:04:42] libastral: has joined #RubyOnRails
[03:15:38] irishfromua: has joined #RubyOnRails
[03:19:35] Limix: has joined #RubyOnRails
[03:24:14] bywaterloo: has joined #RubyOnRails
[03:26:16] jenrzzz: has joined #RubyOnRails
[03:26:49] Trynemjoel: has joined #RubyOnRails
[03:27:14] Derperperd: has joined #RubyOnRails
[03:38:33] Trynemjoel: has joined #RubyOnRails
[03:39:20] xibalba: has joined #RubyOnRails
[03:42:30] xibalba: has joined #RubyOnRails
[03:43:49] pwnd_nsfw: has joined #RubyOnRails
[03:45:06] Blacink: has joined #RubyOnRails
[03:57:06] chouhoulis: has joined #RubyOnRails
[04:01:51] hahuang65: has joined #RubyOnRails
[04:05:16] doodlehaus: has joined #RubyOnRails
[04:06:21] roamingdog: has joined #RubyOnRails
[04:13:44] chagel: has joined #RubyOnRails
[04:16:29] roamingdog: has joined #RubyOnRails
[04:20:39] WinterBluFox: has joined #RubyOnRails
[04:22:23] keerthana: has joined #RubyOnRails
[04:29:06] jane_booty_doe: has joined #RubyOnRails
[04:35:55] jeyraof^mbpr: has joined #RubyOnRails
[04:37:03] irishfromua: has joined #RubyOnRails
[04:41:03] ahrs: has joined #RubyOnRails
[04:42:08] nOwz: has joined #RubyOnRails
[04:42:33] Derperperd: has joined #RubyOnRails
[04:43:35] pickle_: has joined #RubyOnRails
[04:51:27] pwnd_nsfw`: has joined #RubyOnRails
[04:51:50] hakash: has joined #RubyOnRails
[04:56:18] cschneid_: has joined #RubyOnRails
[05:01:25] Akuya: has joined #RubyOnRails
[05:06:15] roamingdog: has joined #RubyOnRails
[05:07:00] roamingdog: has joined #RubyOnRails
[05:07:50] roamingdog: has joined #RubyOnRails
[05:08:36] roamingdog: has joined #RubyOnRails
[05:29:17] dionysus69: has joined #RubyOnRails
[05:29:57] xaviergmail: has joined #RubyOnRails
[05:39:44] pickle_: has joined #RubyOnRails
[05:48:26] Akuya: I assume that means that I can chat
[05:56:51] Technodrome: has joined #RubyOnRails
[06:02:26] nahtnam: has joined #RubyOnRails
[06:15:13] Technodrome: has joined #RubyOnRails
[06:15:25] jgt: has joined #RubyOnRails
[06:18:45] dionysus69: has joined #RubyOnRails
[06:19:11] Derperperd: has joined #RubyOnRails
[06:20:16] gambl0re: has joined #RubyOnRails
[06:31:51] lightheaded: has joined #RubyOnRails
[06:36:09] darutoko: has joined #RubyOnRails
[06:37:49] zero1one0: has joined #RubyOnRails
[06:39:28] zero1one0: has joined #RubyOnRails
[06:42:54] nOwz: has joined #RubyOnRails
[06:55:27] lightheaded: has joined #RubyOnRails
[06:58:42] jnoob22: has joined #RubyOnRails
[07:05:25] pwntrik: has joined #RubyOnRails
[07:05:37] Technodrome: has joined #RubyOnRails
[07:10:58] pickle_: has joined #RubyOnRails
[07:11:03] dminuoso: That day when you use <div /> in full ignorance, and suddenly it actually breaks.
[07:11:15] dminuoso: And it's not the browser doing the naughty.
[07:12:08] dminuoso: (React actually kicks those elements out of the dom when it sees them.. sadly without a warning :S)
[07:12:14] hipertracker: has joined #RubyOnRails
[07:16:14] Pumukel: has joined #RubyOnRails
[07:16:17] willardg: has joined #RubyOnRails
[07:16:50] roamingdog: has joined #RubyOnRails
[07:17:37] roamingdog: has joined #RubyOnRails
[07:20:10] defsdoor: has joined #RubyOnRails
[07:20:52] Technodrome: bonjour dminuoso
[07:21:20] Technodrome: been digging through ruby source code a bit, you helped alot of it make sense
[07:29:51] srinidhi: has joined #RubyOnRails
[07:37:42] r3vDev: has joined #RubyOnRails
[07:40:32] cschneid_: has joined #RubyOnRails
[07:40:57] keerthana: has joined #RubyOnRails
[07:42:59] kernelPaniq: has joined #RubyOnRails
[07:43:19] conta: has joined #RubyOnRails
[07:48:09] dionysus69: has joined #RubyOnRails
[07:50:51] DrYockel: has joined #RubyOnRails
[07:52:55] Ayey_: has joined #RubyOnRails
[08:00:11] mark_66: has joined #RubyOnRails
[08:01:45] lightheaded: has joined #RubyOnRails
[08:06:40] doodlehaus: has joined #RubyOnRails
[08:09:34] eyck: has joined #RubyOnRails
[08:11:22] artto: has joined #RubyOnRails
[08:12:20] nOwz: has joined #RubyOnRails
[08:21:53] antgel: has joined #RubyOnRails
[08:27:37] pLaTo0n: has joined #RubyOnRails
[08:29:49] pLaTo0n: has joined #RubyOnRails
[08:31:56] itsgokul: has joined #RubyOnRails
[08:32:57] artto: has joined #RubyOnRails
[08:34:08] srinidhi: has joined #RubyOnRails
[08:34:57] aganov: has joined #RubyOnRails
[08:36:54] Andr3as: morning everyone.. i'm a little stuck with pundit right now.. my final gola is to dont allow oneself to remove an admin flag from himself.. i am using datatables and best_in_place and pundit here... here's a gist of the datatables piece (line 22 to 32 are the important ones) and my user_policy https://gist.github.com/awunder/d42fdf080596163df9bb8878515687d8
[08:37:20] Andr3as: the fun part starts with edit_admin and is jsut a simple test right now.
[08:37:40] arBmind: has joined #RubyOnRails
[08:38:10] Andr3as: the edit? method works like a charme but i am getting a "NameError (undefined local variable or method `current_user' for #<UserPolicy:0x007f47d319cf90>):" for the current_user method in edit_admin?
[08:38:46] Andr3as: it also has no access to @current_user (??) even though i can inspect it on the view and its there..?
[08:39:05] Andr3as: you guys have an idea what i am doing wrong?
[08:41:12] alaing: has joined #RubyOnRails
[08:41:25] tbuehlmann: Andr3as: the object you're testing against is @entry, not current_user
[08:41:47] tbuehlmann: Andr3as: your current_user is @user, the object you're testing against is @entry
[08:41:48] fox_mulder_cp: Andr3as: "allow oneself to remove an admin flag from himself."
[08:41:54] fox_mulder_cp: create a model validation
[08:42:18] alaing: I need to display the code i used to build a form on a documentation site I am working on
[08:42:22] alaing: https://gist.github.com/aliuk2012/5fc6219beb12a1a421460b311ae299c5
[08:42:31] alaing: this is the gist I have
[08:42:36] Andr3as: tbuehlmann: you've an idea why its working in edit? then?
[08:43:04] tbuehlmann: is the current_user an admin?
[08:43:16] alaing: i had a working example in haml but i'm now trying ot convert it to slim
[08:43:21] tbuehlmann: then the second condition is never reached
[08:43:50] Andr3as: however, thank you, tbuehlmann(as always) - works like a charm!
[08:45:38] alaing: I keep getting _example.html.slim:47: syntax error, unexpected keyword_ensure, expecting end-of-input
[08:45:41] Andr3as: fox_mulder_cp: like i said, i dont want the user to be able to remove it from itself, even on an admin-dashboard where all users get listed.. and i hate it when you click on it (it's a toggle switch) and it doesnt do anything or throws an error.. i find it better when you#re not even able to click it
[08:45:59] alaing: and I have narrowed it down to lines 27 - 31 causing the problem
[08:51:03] lightheaded: has joined #RubyOnRails
[09:05:37] zpe: has joined #RubyOnRails
[09:11:32] xaviergmail: has joined #RubyOnRails
[09:15:22] solars: has joined #RubyOnRails
[09:16:40] solars: quick question: in rspec, if I want to mock a method called .config on a particular Active Record instance (only one) - how would I do this?
[09:19:26] tbuehlmann: solars, something like this: allow(object).to receive(:config).and_return(42)
[09:20:23] pLaToOn: has joined #RubyOnRails
[09:22:33] artto: has joined #RubyOnRails
[09:22:35] solars: tbuehlmann: that's what I tried - however, the instance (object in your example) that I use is not directly used in the code called, it's fetched from the database - so it's basically two different instances of the same object I assume?
[09:23:39] tbuehlmann: likely, yes. what about setting the record up correctly in the first place so you don't need to stub the method call?
[09:24:14] pwntrik: has joined #RubyOnRails
[09:25:23] solars: tbuehlmann: the method I want to stub depends on some other models, it doesn't only check the record itself.
[09:26:27] solars: tbuehlmann: something like expect(Model.any_instance).to receive(:method) { return true if <instance>.id == 3 } would be handy
[09:26:41] solars: not sure if there is anything like that
[09:26:58] tbuehlmann: I wouldn't do that, I would rather setup the models correctly
[09:28:10] pwntrik: anyone know what's up with this error: "uninitialized constant ActiveRecord::Core::LegacyYamlAdapter" It's triggered when I run `rake db:migrate` if there are any calls to "add_index" I had to remove them to get migrate to run. However, I get this error when I run the server, too. I have libyaml and libyaml-dev installed, and `bundle install` runs, `rails s` runs. But this error comes up everywhere. Any suggestions would be greatly appreciated thank y
[09:28:58] solars: tbuehlmann: the reason I'm a bit against that is that I want to isolate this as a unit test, and not setup the whole structure, that's why I want to stub the method.
[09:29:50] solars: tbuehlmann: I will do it like this for now, but I think it's not optimal
[09:33:23] kies: has joined #RubyOnRails
[09:33:55] jsrn_: has joined #RubyOnRails
[09:34:44] srinidhi: has joined #RubyOnRails
[09:38:39] artto: has joined #RubyOnRails
[09:38:49] adgtl: has joined #RubyOnRails
[09:40:44] tens0r: has joined #RubyOnRails
[09:42:16] dionysus69: has joined #RubyOnRails
[09:43:57] Ergo: has joined #RubyOnRails
[09:50:40] marr: has joined #RubyOnRails
[09:51:23] dionysus69: has joined #RubyOnRails
[09:57:06] mark_66: has joined #RubyOnRails
[09:58:07] gregf_: has joined #RubyOnRails
[10:02:36] arBmind: has joined #RubyOnRails
[10:03:27] jordansz: has joined #RubyOnRails
[10:04:46] gloscombe: has joined #RubyOnRails
[10:06:21] DoubleMalt: has joined #RubyOnRails
[10:09:16] ReBa_: has joined #RubyOnRails
[10:11:59] dminuoso: pwntrik: Let's see some code and a full stack trace.
[10:14:15] tvw: has joined #RubyOnRails
[10:17:04] ferr1: has joined #RubyOnRails
[10:18:43] ReBa_: I'm not able to load my custom class in my controller: https://gist.github.com/RemiBa/94859045b3a1b4543d71c1b754d37c99 - it sais I need to add it to my lib folder, but I already did that?
[10:19:18] Andr3as: have you restarted your server?
[10:19:28] ReBa_: Andr3as: yes
[10:20:42] Andr3as: your classname is ExportInspectionsRenderer
[10:20:56] Andr3as: but your class file name suggests InspectionsExportRenderer
[10:21:05] Andr3as: might be a naming issue
[10:22:57] ReBa_: Andr3as: Ow damn. I feel so stupid now :s
[10:23:11] ReBa_: Thank you for pointing that out :P
[10:23:28] ReBa_: Sometimes you really don't see it anymore
[10:23:31] Andr3as: no worries.. happens.. :)
[10:26:37] itsgokul: has joined #RubyOnRails
[10:29:50] r3vDev: has joined #RubyOnRails
[10:32:55] mavik: has joined #RubyOnRails
[10:34:05] mavik: I have the following code for Doorkeeper: <%= f.select((:id), options_for_select(@user.... But I don't really want any column in the select tag because I won't save it to the database. I tried adding some field in my model with attr_accessor but that does not work. Any tips?
[10:35:02] pLaToOn: I want to specify ":de" as a default locale for i18n, but want to keep the english error messages of activerecord. is this possible?
[10:36:28] Andr3as: mavik post a gist of your model and your view
[10:37:03] mavik: @Andr3as I have class AppStore::Application < Doorkeeper::Application attr_accessor :external_users in my Model
[10:37:05] harfangk: has joined #RubyOnRails
[10:37:59] mavik: And <%= form_for @application %> in my view. But I get undefined method `app_store_applications_path' for ...
[10:38:25] mavik: But that's strange because my Model inherits from the Doorkeeper class itself
[10:39:10] Andr3as: that looks like a routing issue, no? i mean the error suggests you've referencing a path that doesnt exist
[10:39:19] Andr3as: is there such a path?
[10:39:28] nobitanobi: has joined #RubyOnRails
[10:39:42] mavik: No, but I thought it will just use the Doorkeeper path
[10:39:43] itarato: has joined #RubyOnRails
[10:39:46] ReBa_: mavik: Try to find your routes with rake routes
[10:40:28] Andr3as: app_store_applications_path doesnt exactly sound like a doorkeeper path
[10:40:32] nobitanobi: hello! Do you guys know why I would be getting this error: "NameError: uninitialized constant ActiveRecord::Associations::BelongsToPolymorphicAssociation" - it comes from paper trail trying to use that class, and it just happens _sometimes_. I don't know how that class can be not initialized
[10:40:35] mavik: app_store_applications_path is currently no path. How could I be able to fix this in my routes?
[10:40:53] mavik: @andr3as that's true, because I'm trying to overwrite it
[10:41:00] Andr3as: where is that supposed to point?
[10:41:20] chagel: has joined #RubyOnRails
[10:41:53] mavik: Well the thing is, I'm fine with the Doorkeeper form, but I just want an attr_accessor in class AppStore::Application < Doorkeeper::Application.
[10:42:13] adlerdias__: has joined #RubyOnRails
[10:42:34] mavik: But when I keep the standard Doorkeeper form, it says unknown attribute for the attr_accessor
[10:44:41] pickle_: has joined #RubyOnRails
[10:45:23] GodFather: has joined #RubyOnRails
[10:53:39] chagel: has joined #RubyOnRails
[11:00:28] NoGodDamnIdea: has joined #RubyOnRails
[11:01:50] pickle_: has joined #RubyOnRails
[11:04:47] larcara: has joined #RubyOnRails
[11:04:53] gloscombe: has joined #RubyOnRails
[11:05:20] disem: has joined #RubyOnRails
[11:06:01] coatezy: has joined #RubyOnRails
[11:07:43] Fernando-Basso: has joined #RubyOnRails
[11:09:27] Torrone: has joined #RubyOnRails
[11:11:54] Torrone: hello, I'm trying with rails 3 to truncate a post excerpt to 40 words. I am doing this: 1 - count the size in characters of the string of 40 words. 2 - pass the size to the trucate() method. I am having one problem though: if the string is below 40 words, I get the omission (...) preceded by a < minus sign at the end of my string. What is that and how do I get rid of it?
[11:13:18] chagel: has joined #RubyOnRails
[11:14:10] bbrowning: has joined #RubyOnRails
[11:14:46] lxsameer: has joined #RubyOnRails
[11:15:46] bbrowning: has joined #RubyOnRails
[11:19:25] ReBa_: Torrone: Can't you just check if the string is longer than 40 chars and only if it is longer truncate your string?
[11:19:57] Torrone: ReBa_, my problem is that I want to truncate at 40 Words, not characers
[11:20:29] artto: has joined #RubyOnRails
[11:20:36] Torrone: otherwise I wouldn't take the trouble of counting the string length
[11:21:29] ReBa_: Torrone: Sorry, my bad.
[11:22:12] tvw: has joined #RubyOnRails
[11:22:23] larcara: has joined #RubyOnRails
[11:23:08] doodlehaus: has joined #RubyOnRails
[11:23:09] Jameser: has joined #RubyOnRails
[11:23:11] ReBa_: Torrone: Still, you can check the word size?
[11:23:34] ReBa_: And if you count +40 words, don't truncate?
[11:23:55] ReBa_: I mean: if you count -40 words, don't truncate
[11:24:46] Torrone: ReBa_, let me rephrase: if I have a string of 40+ words, everything goes as expected, output: "My long string Lorem ipsum dolor sit amet, consecut..."
[11:25:11] Torrone: if my string is below 40 words, I'm getting " My short string. <..."
[11:26:32] ReBa_: And you don't truncate the string if it's below 40 words?
[11:26:44] ReBa_: Or do you still execute the function to truncate?
[11:26:50] Torrone: ReBa_, yeah but my code would get quite convoluted and I want to keep it as simple as I can
[11:27:26] Torrone: yes, but I would expect to leave the string as-is if it's below the size I pass in
[11:27:56] ReBa_: Torrone: And you use the http://apidock.com/rails/ActionView/Helpers/TextHelper/truncate function?
[11:29:08] ReBa_: So you first count the first 40 words and take the length of those, whereafter you truncate to the length of those 40 words, correct?
[11:29:52] Torrone: size = post.excerpt.split(' ').take(40).join(' ').size
[11:30:05] Torrone: and then output: raw post.excerpt.truncate(size, :escape => false)
[11:30:19] Torrone: nvm the 'escape'
[11:30:24] simmerz: has joined #RubyOnRails
[11:31:27] simmerz: how could I get a rails app (server side) to connect to a websocket and maintain that connection?
[11:32:33] drale2k_: has joined #RubyOnRails
[11:33:38] ReBa_: Torrone: I've tried to reproduce the problem, but in my app, it turns out nice...
[11:33:47] ReBa_: Maybe it's the raw that makes it like that
[11:34:23] Torrone: ReBa_, nope
[11:34:29] dps: has joined #RubyOnRails
[11:34:37] Torrone: ReBa_, same result without 'raw'
[11:35:09] adac: has joined #RubyOnRails
[11:35:31] adac: What is the best way to do a simple check if rails can connect to the db?
[11:35:38] adac: ActiveRecord::Base.connected?
[11:35:45] adac: would that be appropriate?
[11:36:15] ReBa_: Torrone: And if you remove the ":escape => false" option?
[11:36:24] Torrone: ReBa_, same
[11:38:27] pLaToOn: how can I fake / stub a controller function in minitest?
[11:38:45] ReBa_: Torrone: I don't know... some strange behaviour like you explain
[11:39:59] bbrowning: has joined #RubyOnRails
[11:40:43] ldnunes: has joined #RubyOnRails
[11:43:00] HoierM: has joined #RubyOnRails
[11:46:14] Jameser: has joined #RubyOnRails
[11:50:01] Torrone: ReBa_, indeed, I guess I'll just .gsub('<...', '')
[11:55:06] artto: has joined #RubyOnRails
[11:55:10] Jameser: has joined #RubyOnRails
[11:55:34] coatezy: has joined #RubyOnRails
[11:56:57] larcara: has joined #RubyOnRails
[11:57:43] adac: For some reasons I cannot start my rails console. rails server however works.
[11:57:47] adac: https://gist.github.com/anonymous/999bed5aba022c40e2152d78c9d17fb2
[11:57:50] adac: any ideas?
[11:58:53] dionysus69: has joined #RubyOnRails
[12:00:26] _3dwardsharp: adac: gem install nokogiri
[12:00:42] _3dwardsharp: (or run bundle install, like it tells you to :P)
[12:01:22] adac: _3dwardsharp, yes but nokogiri is already installed according to bundle show
[12:01:36] adac: bundle install does not solve it for some reasons
[12:01:52] adac: also tried to remove the rvm gemset and re-install all gems via bundle install
[12:02:03] adac: but no luck
[12:02:45] artto: has joined #RubyOnRails
[12:02:48] _3dwardsharp: do you really need rvm?
[12:02:59] artto: has joined #RubyOnRails
[12:04:38] artto: has joined #RubyOnRails
[12:07:19] Ergo: has joined #RubyOnRails
[12:10:08] artto: has joined #RubyOnRails
[12:10:23] dps: has joined #RubyOnRails
[12:10:41] Jameser: has joined #RubyOnRails
[12:12:12] Qchmqs: has joined #RubyOnRails
[12:21:42] artto: has joined #RubyOnRails
[12:23:38] Jameser: has joined #RubyOnRails
[12:24:59] killrt: has joined #RubyOnRails
[12:25:06] killrt: has left #RubyOnRails: ()
[12:28:00] lightheaded: has joined #RubyOnRails
[12:28:11] mirii: has joined #RubyOnRails
[12:29:17] Derperperd: has joined #RubyOnRails
[12:33:57] workmad3: adac: try `spring stop`
[12:34:18] workmad3: oh, nvm... that wouldn't cause that particular issue...
[12:34:32] adac: _3dwardsharp, actually I have a lot of projects so it is somewhat handy
[12:35:31] adac: workmad3, stopped spring now
[12:35:34] artto: has joined #RubyOnRails
[12:35:36] workmad3: adac: it looks like your `rails` command isn't the right one... check what you get with `rails --version` and whether it's what you expected
[12:35:50] adac: and tried to run "rails c" again but no luck, still the same error
[12:36:32] adac: rails --version
[12:36:32] adac: rake, version 12.0.0
[12:36:47] pwnd_nsfw`: has joined #RubyOnRails
[12:37:06] workmad3: adac: yeah, something is messed up there...
[12:37:13] adac: workmad3, totally
[12:37:34] _3dwardsharp: adac: have you started a rails console before?
[12:37:34] workmad3: adac: did you do something like create an RVM bin wrapper for rails for the gemset?
[12:38:05] adac: workmad3, actually I didn't do such a thing no
[12:38:16] keerthana: has joined #RubyOnRails
[12:38:17] workmad3: adac: also, does `./bin/rails c` do what you want?
[12:38:25] adac: _3dwardsharp, not in that project yet no
[12:38:49] xaviergmail: has joined #RubyOnRails
[12:38:50] adac: workmad3, no its the same error
[12:39:00] adac: can I somehow remove this ruby
[12:39:10] workmad3: adac: can you gist the content of `bin/rails` in your project quickly then please?
[12:39:12] _3dwardsharp: can you gist your Gemfile?
[12:39:28] Andr3as: workmad3: try bundle exec bin/rails
[12:39:46] Andr3as: or put your bin dir into $PATH
[12:39:51] workmad3: Andr3as: wrong highlight ;)
[12:40:13] Andr3as: workmad3: oops ;) - thx
[12:40:18] larcara: has joined #RubyOnRails
[12:40:22] Andr3as: adac: : try bundle exec bin/rails
[12:40:25] Andr3as: there we go
[12:40:49] adac: bundle exec bin/rails c
[12:40:49] adac: Could not find nokogiri-1.7.0.1 in any of the sources
[12:40:49] adac: Run `bundle install` to install missing gems.
[12:41:09] Andr3as: now thats funny
[12:42:17] adac: Can I somehow trash all the rvm stuff and re-setup the ruby and gemset?
[12:42:19] handicraftsman: has joined #RubyOnRails
[12:42:24] adac: You think that could help?
[12:43:12] _3dwardsharp: are you sure bundle install is running completely?
[12:43:20] fox_mulder_cp: adac: drop gems and ruby from system and reinstall it?
[12:43:24] artto: has joined #RubyOnRails
[12:43:27] workmad3: adac: if you're willing to trash rvm systemwide, you can do `rvm implode`, which will require you to reset up for everything... or you could consider dropping RVM and using chruby & ruby-install (as gemsets are pretty much obsolete in rails development since the creation of bundler)
[12:43:49] adac: _3dwardsharp, I think so yes. bundle show does show this very nokogiri
[12:44:01] _3dwardsharp: at that version?
[12:44:23] fox_mulder_cp: adac: i do this pariodically, but i have a ruby + rails installen in my home user dir, so i can delete two dirs recursively and istall rails via rbenv
[12:44:44] adac: _3dwardsharp, yes
[12:45:12] _3dwardsharp: does your Gemfile.lock have that version?
[12:45:38] fox_mulder_cp: handicraftsman: it's not rusnet. use english here
[12:46:43] doodlehaus: has joined #RubyOnRails
[12:47:43] adac: workmad3, kk I try to implode it
[12:47:56] _3dwardsharp: adac, that's gonna take a while :/
[12:48:17] adac: _3dwardsharp, yep in Gemflie.lock its there
[12:48:53] p8m: has joined #RubyOnRails
[12:48:59] _3dwardsharp: okay, are you using a specific ruby version?
[12:49:47] _3dwardsharp: also, plz post your Gemfile on gist
[12:50:09] adac: _3dwardsharp, ruby 2.4.0p0
[12:52:21] adac: imploding...
[13:02:38] Derperperd: has joined #RubyOnRails
[13:12:10] doodlehaus: has joined #RubyOnRails
[13:12:33] rgr: has joined #RubyOnRails
[13:13:29] rgr: A little bit confused again about versioning. Whats the proper way , I have rvm installed and working, to fix my apps ruby vesion? In the gemfile or in rvm create .ruby-version ?
[13:14:08] adac: workmad3, _3dwardsharp Andr3as implode and re-install did the trick
[13:14:18] adac: now it is working properly
[13:14:29] rgr: and should I create a gemset and specify that too?
[13:14:32] Andr3as: thx for reporting, adac - glad its working again
[13:14:46] adac: Thank you guys for helping!
[13:14:50] adac: I'm happy now :)
[13:17:44] dionysus69: has joined #RubyOnRails
[13:19:35] chouhoulis: has joined #RubyOnRails
[13:20:30] teddysmoker: has joined #RubyOnRails
[13:21:30] Tempesta: has joined #RubyOnRails
[13:23:10] dionysus69: has joined #RubyOnRails
[13:23:28] doodlehaus: has joined #RubyOnRails
[13:23:55] keerthana: has joined #RubyOnRails
[13:25:02] workmad3: adac: good to know... I wonder what got messed up in your env :/
[13:25:42] adac: workmad3, I think I remember now what happened last week. Instead of deleting a gemset I deleted the whole ruby
[13:25:43] brendan6: has joined #RubyOnRails
[13:25:51] adac: and then re-installed it
[13:26:05] adac: but rails s was working back then so I thought all is ok
[13:26:55] adac: the "rails --version" output in rails 5 seems to be a bug in rails 5.x
[13:27:25] adac: rails --version
[13:27:25] adac: rake, version 12.0.0
[13:29:06] Olipro: has joined #RubyOnRails
[13:32:43] DLSteve: has joined #RubyOnRails
[13:35:55] anenr: has joined #RubyOnRails
[13:36:53] anenr: I'm trying to use Foundation her switches functionality, but I'm kinda stuck in simply changing the HTML to Rails.. <div class="switch"> <input id="exampleCheckboxSwitch" type="checkbox"> <label for="exampleCheckboxSwitch"></label> </div> I just want a simple check_box which returns a boolean to the DB. Could anyone help me?
[13:37:16] GodFather: has joined #RubyOnRails
[13:38:03] patarr: has joined #RubyOnRails
[13:40:33] larcara: has joined #RubyOnRails
[13:41:59] jordansz: has joined #RubyOnRails
[13:44:59] Pumukel: has joined #RubyOnRails
[13:46:49] mwlang: has joined #RubyOnRails
[13:49:16] artto_: has joined #RubyOnRails
[13:52:33] artto: has joined #RubyOnRails
[13:52:49] Pumukel: has joined #RubyOnRails
[13:56:10] agent_white: has joined #RubyOnRails
[13:57:54] tedwing: has joined #RubyOnRails
[14:00:24] artto_: has joined #RubyOnRails
[14:03:47] Derperperd: has joined #RubyOnRails
[14:08:30] chagel: has joined #RubyOnRails
[14:08:36] ReBa_: I have an array with key => value pairs. I want to have the nth-position of one specific key. What's the best approach for this?
[14:08:47] ReBa_: I could just loop over the array and keep track of the count
[14:08:56] ReBa_: But maybe there is a faster option?
[14:09:04] pwntrik: has joined #RubyOnRails
[14:09:13] mostlybadfly: hello all, I keep getting this error when installing puma, but haven't been able to get a good response with info by googling, any thoughts? https://gist.github.com/mostlybadfly/5b06f3ac0320bc3670352f1ee7e16254
[14:09:22] mostlybadfly: it seems like I might need openssl, but I do have that installed
[14:09:33] epochwolf: ReBa_: array.select{|pair| pair[0] == key }[8]
[14:10:08] ReBa_: epochwolf: BTW, your "class" solution for xml+excel rendering with DoubleRenderError works perfectly! :)
[14:10:12] ReBa_: Let me try that out
[14:10:38] epochwolf: ReBa_: it's not the more efficient solution but it's easy to read.
[14:11:13] keerthana: has joined #RubyOnRails
[14:11:55] alex88: has joined #RubyOnRails
[14:13:52] envint: has joined #RubyOnRails
[14:13:52] agent_white: Mornin' folks
[14:14:20] artto: has joined #RubyOnRails
[14:16:45] artto: has joined #RubyOnRails
[14:18:40] ReBa_: epochwolf: Trying to get that to work, but in fact, I need the position based upon the key.
[14:18:52] artto: has joined #RubyOnRails
[14:18:57] epochwolf: ReBa_: what do you mean?
[14:19:08] ReBa_: Wait, I'll make it a little more clear
[14:20:49] zpe: has joined #RubyOnRails
[14:20:56] ReBa_: epochwolf: https://gist.github.com/RemiBa/acd830b1d3905fc2f5292df17e0cd979
[14:21:00] ReBa_: I hope it's somewhat clear
[14:21:45] epochwolf: Tyat's not an array...
[14:21:48] epochwolf: That's a hash.
[14:21:50] ReBa_: I need the position of '[inspections][filename]'
[14:22:02] ReBa_: The keys is an array, not?
[14:22:17] ReBa_: If you do hash.keys?
[14:22:19] epochwolf: Yes... but why is the position of the key important?
[14:22:38] ReBa_: Because the user can change the position in the user interface
[14:22:58] ReBa_: So they can or remove the column, or alter it's position
[14:23:03] epochwolf: So you need the key in the 9th position?
[14:23:12] ReBa_: So it could be that the filename is the 3rd in the :added hash
[14:23:34] epochwolf: Or do you need to know the position of a particular key?
[14:23:36] matthewd: ReBa_: Then it sounds like you want (Hash#keys and) Array#index
[14:23:58] ReBa_: It's the particular key
[14:24:13] ReBa_: So you have '[inspections][filename]' => Inspection.human_attribute_name(:filename)
[14:24:14] epochwolf: keys.index("[inspections][filename]")
[14:25:18] ReBa_: epochwolf: matthewd: that will be it!
[14:25:38] ReBa_: I was focussing to much on the hash in the beginning
[14:26:07] ReBa_: Thank you guys!
[14:26:58] nurey: has joined #RubyOnRails
[14:31:44] handicraftsman: How do i send plain text as answer to request? Without HTML formatting.
[14:32:25] epochwolf: render plain: "Text"
[14:32:41] handicraftsman: epochwolf, thanks
[14:32:47] DrYockel: has joined #RubyOnRails
[14:33:45] chouhoulis: has joined #RubyOnRails
[14:35:07] artto: has joined #RubyOnRails
[14:35:44] chouhoul_: has joined #RubyOnRails
[14:35:58] tvw: has joined #RubyOnRails
[14:40:57] envint: has joined #RubyOnRails
[14:47:32] patarr1: has joined #RubyOnRails
[14:49:27] artto: has joined #RubyOnRails
[14:49:31] chouhoulis: has joined #RubyOnRails
[14:51:28] LyndsySimon: has joined #RubyOnRails
[14:51:30] Derperperd: has joined #RubyOnRails
[14:52:56] pLaTo0n: has joined #RubyOnRails
[14:58:12] doodlehaus: has joined #RubyOnRails
[15:03:30] centrx: has joined #RubyOnRails
[15:03:30] centrx: has joined #RubyOnRails
[15:03:34] Blacink: has joined #RubyOnRails
[15:04:33] envint: has joined #RubyOnRails
[15:09:49] Cohedrin: has joined #RubyOnRails
[15:11:08] stanshenoy: has joined #RubyOnRails
[15:11:43] envint: has joined #RubyOnRails
[15:13:27] doodleha_: has joined #RubyOnRails
[15:13:58] envint: has joined #RubyOnRails
[15:18:16] Derperperd: has joined #RubyOnRails
[15:18:55] aajjbb: has joined #RubyOnRails
[15:21:39] naprimer_2: has joined #RubyOnRails
[15:21:40] snowy: has joined #RubyOnRails
[15:24:03] envint: has joined #RubyOnRails
[15:26:03] envint: has joined #RubyOnRails
[15:26:08] Omnilord: has joined #RubyOnRails
[15:28:50] psethi: has joined #RubyOnRails
[15:29:19] brent__: has joined #RubyOnRails
[15:29:59] brent__: has joined #RubyOnRails
[15:30:37] psethi: Hi Folks, I wonder, how can I have my JS file include ruby variables. Here is my gist. Where do I need to put the .js.erb file to be picked up correctly. https://gist.github.com/techsethi/f6e91a1639dd44612ef8941866b82f16 Thanks in advance
[15:37:16] tedwing: has joined #RubyOnRails
[15:37:49] umdstu: i tried to add some custom Exceptions to my app, wrapped them in module Exceptions and put them in lib dir for the app. the lib dir is added to autoload list but the new exception classes aren't being detected in the controller
[15:38:53] marr123: has joined #RubyOnRails
[15:40:28] tvw: has joined #RubyOnRails
[15:42:41] username1: has joined #RubyOnRails
[15:42:42] username2: has joined #RubyOnRails
[15:43:27] Cohedrin: has joined #RubyOnRails
[15:44:21] artto: has joined #RubyOnRails
[15:46:49] fox_mulder_cp: psethi: google : rails remote:true
[15:47:56] benlieb: has joined #RubyOnRails
[15:48:12] xaviergmail: has joined #RubyOnRails
[15:49:46] Technodrome: has joined #RubyOnRails
[15:50:05] FLeiXiuS: has joined #RubyOnRails
[15:53:41] chouhoulis: has joined #RubyOnRails
[15:54:04] mwlang: has joined #RubyOnRails
[15:54:31] d0nn1e: has joined #RubyOnRails
[15:54:46] chouhoulis: has joined #RubyOnRails
[15:55:05] nurey: has joined #RubyOnRails
[16:00:26] gloscombe: has joined #RubyOnRails
[16:04:18] sid_fules: has joined #RubyOnRails
[16:06:31] Sigyn: has joined #RubyOnRails
[16:21:28] tbuehlmann: umdstu: can you gist your class, how you use it and the error you get?
[16:23:48] Pumukel: has joined #RubyOnRails
[16:24:48] gusrub: has joined #RubyOnRails
[16:25:00] doublemalt_: has joined #RubyOnRails
[16:25:53] lightheaded: has joined #RubyOnRails
[16:27:15] rgr: has joined #RubyOnRails
[16:29:42] rgr: has joined #RubyOnRails
[16:30:37] envint: has joined #RubyOnRails
[16:32:19] drale2k_: has joined #RubyOnRails
[16:34:42] Pumukel: has joined #RubyOnRails
[16:37:30] geetar_1: has joined #RubyOnRails
[16:37:30] artto: has joined #RubyOnRails
[16:37:44] dblessing: has joined #RubyOnRails
[16:39:17] FooMunki: has joined #RubyOnRails
[16:43:44] mikeymicrophone: has joined #RubyOnRails
[16:47:41] Jasaka: has joined #RubyOnRails
[16:56:16] lightheaded: has joined #RubyOnRails
[16:56:44] lightheaded: has joined #RubyOnRails
[16:56:55] FooMunki: has joined #RubyOnRails
[16:57:09] lightheaded: has joined #RubyOnRails
[16:59:45] pwntrik: has joined #RubyOnRails
[17:00:43] blackmesa: has joined #RubyOnRails
[17:01:07] [Butch]: has joined #RubyOnRails
[17:03:19] AnomalousBit: has joined #RubyOnRails
[17:06:05] iliketurtles: has joined #RubyOnRails
[17:06:07] HoierM: has joined #RubyOnRails
[17:06:50] djbkd: has joined #RubyOnRails
[17:07:00] HoierM: has joined #RubyOnRails
[17:11:03] fearoffish: has joined #RubyOnRails
[17:12:34] Ayey_: has joined #RubyOnRails
[17:16:12] Jasaka: has joined #RubyOnRails
[17:16:13] Technodrome: has joined #RubyOnRails
[17:18:11] hahuang65: has joined #RubyOnRails
[17:19:09] stanshenoy: has joined #RubyOnRails
[17:21:18] snowy: has joined #RubyOnRails
[17:22:02] gregf_: has joined #RubyOnRails
[17:22:49] Snowy_: has joined #RubyOnRails
[17:25:08] cnk: has joined #RubyOnRails
[17:26:05] hahuang61: has joined #RubyOnRails
[17:27:46] JDeen: has joined #RubyOnRails
[17:28:55] AzaToth: has joined #RubyOnRails
[17:32:10] Technodrome: has joined #RubyOnRails
[17:34:38] NoGodDamnIdea: has joined #RubyOnRails
[17:34:38] NoGodDamnIdea: has joined #RubyOnRails
[17:36:46] Pumukel: has joined #RubyOnRails
[17:36:59] drale2k: has joined #RubyOnRails
[17:52:29] hahuang62: has joined #RubyOnRails
[17:55:15] iliketurtles: has joined #RubyOnRails
[17:55:52] blackmesa: has joined #RubyOnRails
[17:57:58] arBmind: has joined #RubyOnRails
[17:59:50] mikeymicrophone: has joined #RubyOnRails
[18:00:11] jenrzzz: has joined #RubyOnRails
[18:00:11] jenrzzz: has joined #RubyOnRails
[18:02:59] aajjbb: has joined #RubyOnRails
[18:03:29] Ayey_: has joined #RubyOnRails
[18:05:26] Limix: has joined #RubyOnRails
[18:05:54] kies: has joined #RubyOnRails
[18:08:30] patarr: has joined #RubyOnRails
[18:10:21] aajjbb: has joined #RubyOnRails
[18:10:24] benlieb: has joined #RubyOnRails
[18:11:18] envint: has joined #RubyOnRails
[18:12:09] snowy: has joined #RubyOnRails
[18:17:42] kristofferR: has joined #RubyOnRails
[18:18:03] cpruitt: has joined #RubyOnRails
[18:21:08] patarr: has joined #RubyOnRails
[18:22:28] xaviergmail: has joined #RubyOnRails
[18:28:45] arBmind: has joined #RubyOnRails
[18:41:40] DoctorMonocular: has joined #RubyOnRails
[18:43:11] DoctorMo_: has joined #RubyOnRails
[18:47:24] dionysus69: has joined #RubyOnRails
[18:53:55] Mia: has joined #RubyOnRails
[18:53:55] Mia: has joined #RubyOnRails
[18:56:39] sergio_101: has joined #RubyOnRails
[18:59:24] jordansz: has joined #RubyOnRails
[19:01:02] gabeodess: has joined #RubyOnRails
[19:01:42] [Butch]: has joined #RubyOnRails
[19:02:31] gabeodess: just upgrading to Rails 5 and I'm getting warnings about Strong Parameters related to URL generation using `url_for`. I get why there is a security risk when using mass assignment to the database, but why is there a concern for URL generation?
[19:03:04] jenrzzz: has joined #RubyOnRails
[19:03:14] marr: has joined #RubyOnRails
[19:04:53] srinidhi: has joined #RubyOnRails
[19:04:54] adac: has joined #RubyOnRails
[19:07:50] epochwolf: gabeodess: I would assume because someone could pass the host parameter and cause url_for to have an external url.
[19:08:08] epochwolf: url_for params is unsafe.
[19:09:05] Andr3as: my datamodel contains a domain and an actionfield.. actionfields should be created within the context of a domain by an admin or by the editor of that domain but could also be created outside of that by an admin... i want pundit to check that but get an undefined method error.. - https://gist.github.com/awunder/1a35d75b0cfadc43d73e147be1e6ee3a
[19:09:07] epochwolf: You're basically allowing the user to specify a url that gets used in your application.
[19:09:33] Andr3as: i may do a stupid mistake but really dont get it... am thinking abt it for some time.. if someone could give me a hint..(?)
[19:09:36] pLaTo0n: has joined #RubyOnRails
[19:09:36] epochwolf: matthewd: yay, I got something right on the first try. :)
[19:10:24] lxsameer: has joined #RubyOnRails
[19:11:07] epochwolf: Andr3as: @action_field.respond_to?(:domain) && @action_field.domain.any?
[19:11:30] epochwolf: I'm thinking a model class instead of a model instance got passed in.
[19:11:46] keerthana: has joined #RubyOnRails
[19:12:14] gabeodess: epochwolf, sure but the risk seems minimal as anyone could simply type whatever they want into the address bar of the browser, no?
[19:12:43] epochwolf: gabeodess: what if you used url_for to specify a location to send a file or redirect the user to the next step somewhere?
[19:13:08] Andr3as: epochwolf: hmm thats right.. pundit says so.. am confused abt your line of code.. i dont really get it (sry quite a newbie here..)
[19:13:34] epochwolf: Andr3as: respond_to? just checks to see if that object has the method.
[19:13:45] epochwolf: (or is it responds_to?)
[19:14:08] Andr3as: i always asked myself for what respond_to could be any good
[19:14:18] Andr3as: now thats slick
[19:14:56] Derperperd: has joined #RubyOnRails
[19:15:02] havenwood: Nice to see 5.1 Release Candidate 1!
[19:15:07] Blacink: has joined #RubyOnRails
[19:15:10] Andr3as: thank you, epochwolf!
[19:15:21] epochwolf: havenwood: no, I don't like change! I just started learning 5.0!
[19:15:28] havenwood: epochwolf: ;-)
[19:15:44] havenwood: http://weblog.rubyonrails.org/2017/3/20/Rails-5-1-rc1/
[19:15:45] epochwolf: seriously... 5.0 is awesome
[19:16:54] gabeodess: epochwolf: hmmm, so in my case I'm using ransack, and I want to provide a link to my user that maintains the current search parameters which might include 10 or 15 different keys in the querystring. Does it make sense to have to whitelist each one of these keys in every link I use on the page? Or does it seem okay to just permit! my params in this case?
[19:17:22] matthewd: gabeodess: It is not okay to use permit!.
[19:17:33] matthewd: gabeodess: I mean.. you do you.. but it's insecure.
[19:18:57] gabeodess: matthewd: right, I get that for mass assignment and such, but for my case it seems like overkill to have to permit every key that I'm searching by. Have you run across something like this? what was your solution?
[19:19:13] matthewd: gabeodess: You could avoid having to whitelist each one of the keys in every link/use on the page by doing it once, or by using a helper method
[19:19:40] envint: has joined #RubyOnRails
[19:19:56] tctara: has joined #RubyOnRails
[19:19:58] gabeodess: matthewd: okay, decent suggestion, thanks.
[19:20:01] matthewd: gabeodess: I am saying it is specifically a security issue to pass unchecked parameters to url_for, nothing to do with mass assignment
[19:20:31] gabeodess: yeah, I guess I'm still trying to understand what the risk is for url_for matthewd
[19:21:27] gabeodess: epochwolf: mentioned that it could be a risk if I was using url_for to send a file to a specific location, but I'm not doing that in this case.
[19:21:44] rgtk: has joined #RubyOnRails
[19:23:11] linetrace: has joined #RubyOnRails
[19:23:11] matthewd: Allowing an attacker to show a victim a page from your site, complete with their logged-in session etc, while having full control over where some/all of the links on that page go, is.. unwise.
[19:24:51] gabeodess: hmmm, interesting. Thanks for breaking it down for me.
[19:26:40] envint: has joined #RubyOnRails
[19:27:04] hakash: has joined #RubyOnRails
[19:32:00] snickers: has joined #RubyOnRails
[19:32:03] dps: has joined #RubyOnRails
[19:37:22] pLaTo0n: has joined #RubyOnRails
[19:38:07] patarr: has joined #RubyOnRails
[19:39:59] Pumukel: has joined #RubyOnRails
[19:42:46] alphaatom: has joined #RubyOnRails
[19:45:09] alphaatom: has joined #RubyOnRails
[19:48:00] alphaatom: has joined #RubyOnRails
[19:50:29] alphaatom: has joined #RubyOnRails
[19:52:41] jenrzzz: has joined #RubyOnRails
[19:52:58] alphaatom: has joined #RubyOnRails
[19:55:25] lightheaded: has joined #RubyOnRails
[19:55:29] alphaatom: has joined #RubyOnRails
[20:03:00] username: has joined #RubyOnRails
[20:03:34] alphaatom: has joined #RubyOnRails
[20:03:38] Ayey_: has joined #RubyOnRails
[20:05:26] username1: has joined #RubyOnRails
[20:05:27] iliketurtles: has joined #RubyOnRails
[20:07:03] chouhoul_: has joined #RubyOnRails
[20:07:43] netzfisch: has joined #RubyOnRails
[20:08:14] chouhoul_: has joined #RubyOnRails
[20:11:23] Fernando-Basso: has joined #RubyOnRails
[20:13:27] InternetDown: has joined #RubyOnRails
[20:15:48] gabeodess_: has joined #RubyOnRails
[20:16:10] drale2k_: has joined #RubyOnRails
[20:16:36] jkwood_: has joined #RubyOnRails
[20:16:45] agent_wh1te: has joined #RubyOnRails
[20:16:58] FooMunki: has joined #RubyOnRails
[20:17:27] DoctorMonocular: has joined #RubyOnRails
[20:18:13] InternetDown: has joined #RubyOnRails
[20:18:15] badeball_: has joined #RubyOnRails
[20:18:23] maqr_: has joined #RubyOnRails
[20:18:37] defsdoor_: has joined #RubyOnRails
[20:18:41] mikeymicrophone_: has joined #RubyOnRails
[20:18:42] knight-: has joined #RubyOnRails
[20:18:47] p8m_: has joined #RubyOnRails
[20:18:51] mchelen2_: has joined #RubyOnRails
[20:18:59] D9-: has joined #RubyOnRails
[20:19:11] djinni`_: has joined #RubyOnRails
[20:19:11] Haydos_: has joined #RubyOnRails
[20:19:19] Toledo: has joined #RubyOnRails
[20:19:20] coatezy_: has joined #RubyOnRails
[20:19:28] dyyylan-: has joined #RubyOnRails
[20:19:30] leslie1: has joined #RubyOnRails
[20:19:31] gbailey-: has joined #RubyOnRails
[20:19:33] fcser__: has joined #RubyOnRails
[20:19:58] d0nn1e_: has joined #RubyOnRails
[20:20:04] jbermudes_: has joined #RubyOnRails
[20:20:04] jbermudes_: has joined #RubyOnRails
[20:20:04] jbermudes_: has joined #RubyOnRails
[20:20:11] Gargron_: has joined #RubyOnRails
[20:20:16] swav_: has joined #RubyOnRails
[20:20:21] DefV_: has joined #RubyOnRails
[20:20:34] apeiros_: has joined #RubyOnRails
[20:20:44] ErhardtMundt_: has joined #RubyOnRails
[20:20:57] aajjbb1: has joined #RubyOnRails
[20:21:09] bauruine_: has joined #RubyOnRails
[20:21:31] FastJack_: has joined #RubyOnRails
[20:22:01] sonOfRa_: has joined #RubyOnRails
[20:22:35] dcluna_: has joined #RubyOnRails
[20:22:40] snowy: has joined #RubyOnRails
[20:22:49] adgtl-: has joined #RubyOnRails
[20:22:53] daed_: has joined #RubyOnRails
[20:23:12] ahrs_: has joined #RubyOnRails
[20:23:32] omer: has joined #RubyOnRails
[20:23:41] thejoecarroll_: has joined #RubyOnRails
[20:23:48] crankhar1er: has joined #RubyOnRails
[20:23:59] toydestroyer_: has joined #RubyOnRails
[20:24:03] matthewd_: has joined #RubyOnRails
[20:24:26] Rodya_: has joined #RubyOnRails
[20:24:45] nekomune_: has joined #RubyOnRails
[20:25:36] dminuoso_: has joined #RubyOnRails
[20:25:53] veloutin_: has joined #RubyOnRails
[20:26:05] sheepman_: has joined #RubyOnRails
[20:27:34] tekku: has joined #RubyOnRails
[20:27:35] bastilian_: has joined #RubyOnRails
[20:27:37] hipertracker: has joined #RubyOnRails
[20:27:50] banisterfiend: has joined #RubyOnRails
[20:28:20] TheMoonMaster_: has joined #RubyOnRails
[20:29:26] bastilian_: has joined #RubyOnRails
[20:31:51] xaviergmail: has joined #RubyOnRails
[20:31:59] johnkpaul: has joined #RubyOnRails
[20:32:33] Ayey_: has joined #RubyOnRails
[20:34:05] Iacobus: has joined #RubyOnRails
[20:34:12] omer: has joined #RubyOnRails
[20:34:40] Kamuela: has joined #RubyOnRails
[20:34:43] jenrzzz: has joined #RubyOnRails
[20:34:43] jenrzzz: has joined #RubyOnRails
[20:34:58] nachoman: has joined #RubyOnRails
[20:35:05] ahrs: has joined #RubyOnRails
[20:35:37] jhill__: has joined #RubyOnRails
[20:36:25] apotry: has joined #RubyOnRails
[20:36:27] ome: has joined #RubyOnRails
[20:36:31] username2: has joined #RubyOnRails
[20:36:33] username2: " require 'byebug'; byebug
[20:36:36] username2: " controller tests should be more concerned about what is the result of that controller action like what cookies are set, or what HTTP code is set rather than testing of the internals of the controller"
[20:36:45] username2: where should the internals of controllers be tested, unit tests for controller files?
[20:37:07] Radar: https://twitter.com/ryanbigg/status/843924361471905793
[20:37:13] username2: (this is the reason assigns() was deprecated in Rails 5 for controller tests)
[20:37:14] Radar: ^ Need reviewers for Deep Dive Rails
[20:40:07] Jasaka: has joined #RubyOnRails
[20:40:17] havenwood: Radar: Nice!
[20:41:59] jottr: has joined #RubyOnRails
[20:43:03] Shidash: has joined #RubyOnRails
[20:43:18] Pumukel: has joined #RubyOnRails
[20:44:05] chouhoulis: has joined #RubyOnRails
[20:45:16] dagelf: has joined #RubyOnRails
[20:46:29] handicraftsman: Gotta love: rails
[20:49:04] Technodrome: has joined #RubyOnRails
[20:50:51] snowy: has joined #RubyOnRails
[20:51:08] dpsk: has joined #RubyOnRails
[20:52:02] urkle: has joined #RubyOnRails
[20:52:39] arBmind: has joined #RubyOnRails
[20:53:22] Technodrome: anyone know any rails companies hiring atm?
[20:53:48] jaequery: has joined #RubyOnRails
[20:53:57] meoblast001: has joined #RubyOnRails
[20:54:23] zpe: has joined #RubyOnRails
[20:54:41] szulak: has joined #RubyOnRails
[20:56:35] flopsec: has joined #RubyOnRails
[20:57:44] PacKetKiller: has joined #RubyOnRails
[20:58:05] PacKetKiller: ACTION looks at handicraftsman
[20:59:19] Ayey_: has joined #RubyOnRails
[20:59:50] handicraftsman: ACTION stares at PacKetKiller, because he does not even know ruby
[21:00:03] PacKetKiller: ACTION wonders why handicraftsman invited him into here
[21:00:19] PacKetKiller: has left #RubyOnRails: ("PocketKiller >> Part")
[21:01:19] jordansz: has joined #RubyOnRails
[21:04:06] Spami: has joined #RubyOnRails
[21:04:50] Rodya_: has joined #RubyOnRails
[21:05:11] matthew0: has joined #RubyOnRails
[21:05:34] Spami: I'm currently using this gem https://github.com/mbleigh/acts-as-taggable-on and it creates a method tags. But I wan't to move away from the gem. I added a `tags` column in my model, and I have a ten portray method to update the tags in my `tags` column. Is there a way to get the content from my `tags` column by bypassing the method that overwrite it?
[21:06:53] NoGodDamnIdea: has joined #RubyOnRails
[21:07:23] jenrzzz: has joined #RubyOnRails
[21:07:23] jenrzzz: has joined #RubyOnRails
[21:09:54] rgtk: has joined #RubyOnRails
[21:10:15] jbrinkmusic: has joined #RubyOnRails
[21:22:11] workmad3: has joined #RubyOnRails
[21:23:29] Limix: has joined #RubyOnRails
[21:25:06] glasz: has joined #RubyOnRails
[21:26:11] brent__: has joined #RubyOnRails
[21:26:25] brent__: has joined #RubyOnRails
[21:30:07] hp_schemez: has joined #RubyOnRails
[21:37:47] hp_schemez: has left #RubyOnRails: ()
[21:40:27] mikeric: has joined #RubyOnRails
[21:41:14] blackmesa: has joined #RubyOnRails
[21:44:37] Pumukel: has joined #RubyOnRails
[21:56:38] cnk: Radar: I would love to review your Deep Dive book.
[21:57:41] kitsuneyo: has joined #RubyOnRails
[21:58:57] kitsuneyo: what is the type of a path like `user_url(5)` ?
[22:01:21] doodlehaus: has joined #RubyOnRails
[22:02:48] jsrn_: has joined #RubyOnRails
[22:06:53] MasterAsia: has joined #RubyOnRails
[22:07:01] MasterAsia: Is there a way to have has_many as a polymorphic?
[22:07:40] MasterAsia: I have an upload model that I want to associate with other models
[22:07:44] jcm: has joined #RubyOnRails
[22:09:15] Shidash: has joined #RubyOnRails
[22:09:57] Radar: cnk: PM me your email address
[22:14:03] kristofferR: has joined #RubyOnRails
[22:15:33] MasterAsia: Radar, did I miss out on a shady deal?
[22:15:40] DoctorMonocular: has joined #RubyOnRails
[22:16:03] Radar: masterasia: maybe
[22:17:12] djgraham: has joined #RubyOnRails
[22:17:16] whytaunt: has joined #RubyOnRails
[22:18:01] kitsuneyo: I can't figure this out. I have a string 'user_url(object.user)'. I want to use it with a helper like `link_to, e.g. `link_to 'Link', user_url(object.user)`. How do I do this?
[22:18:37] Radar: kitsuneyo: what happens when you try that? It looks like to me that it would work.
[22:22:04] kitsuneyo: Radar: In that case my Q was misleading. I'm not actually using link_to, I'm using active model serializers, but nobody here seems familiar with that. My actual code is: `link(:related) { link_path }`, where link_path is the string i mentioned before
[22:23:08] kitsuneyo: masterasia, do you mean a many to many relationship, or one to many?
[22:23:35] MasterAsia: kitsuneyo, many-to-many
[22:24:53] kitsuneyo: masterasia, you would need a join table with two sets of type and id columns
[22:25:00] pwntrik: has joined #RubyOnRails
[22:25:03] pwntrik: anyone know what's up with this error: "uninitialized constant ActiveRecord::Core::LegacyYamlAdapter" It's triggered when I run `rake db:migrate` if there are any calls to "add_index" I had to remove them to get migrate to run. However, I get this error when I run the server, too. I have libyaml and libyaml-dev installed, and `bundle install` runs, `rails s` runs. But this error comes up everywhere. Any suggestions would be greatly appreciated thank y
[22:25:35] cnk: kitsuneyo: how about more parens? link_to('Link', user_url(object.user))
[22:26:16] Haydos: has joined #RubyOnRails
[22:26:16] Haydos: has joined #RubyOnRails
[22:28:01] hipertracker: has joined #RubyOnRails
[22:30:29] nurey: has joined #RubyOnRails
[22:31:17] kitsuneyo: Radar / cnk : Here is the gist of the full method I'm trying to write. It just puts the string instead of the URL. https://gist.github.com/kitsuneyo/df549dbb43e5bf33169f9eee5486676c
[22:32:19] kitsuneyo: masterasia: have you seen this? http://stackoverflow.com/questions/1128308/rails-many-to-many-polymorphic-relationships
[22:32:56] Radar: kitsuneyo: I don't use AMS so I don't think I can help here.
[22:32:57] cnk: I think that will just give you a string foo_url(atttr) not the evaluated url method. Yes?
[22:33:26] DoctorMonocular: has joined #RubyOnRails
[22:33:29] kitsuneyo: cnk, yes. I need it to evaluate the string I guess. I tried send to no avail.
[22:34:08] cnk: I am not sure if the routing methods, foo_url, etc are in scope in AM::Serializer
[22:34:45] cnk: and send? how so? the big eval(link_path) might work
[22:34:46] cnk: unclear
[22:34:57] Radar: ACTION barfed a little into his mouth
[22:36:08] kitsuneyo: eval worked, many thanks cnk :D
[22:36:20] kitsuneyo: Radar, was that directed at AMS?
[22:36:21] cnk: so,, how certain are you that that is safe?
[22:36:29] Radar: kitsuneyo: directed at the suggestion of eval
[22:36:30] cnk: no at 'eval'
[22:37:00] cnk: so you need to be 100% certain no data submitted by a user ends up in link_path
[22:37:32] kitsuneyo: user data would never get near this method
[22:37:43] kitsuneyo: but if there is a safe alternative you know of?>
[22:39:47] andywww: has joined #RubyOnRails
[22:40:23] kitsuneyo: I'm reading that eval is also slow
[22:44:03] jerdstar: has joined #RubyOnRails
[22:45:13] Pumukel: has joined #RubyOnRails
[22:45:30] workmad3: has joined #RubyOnRails
[22:45:58] jerdstar: Hello, I'm currently rebuilding an old rails 3 api. I noticed that the Set-Cookie header has a different cookie on pretty much every request. Why? Is it safe to use the previous cookie since it's not expired?
[22:47:00] xixi: has joined #RubyOnRails
[22:47:07] matthewd: kitsuneyo: Why won't send work?f
[22:47:48] kitsuneyo: matthewd, I don't know. Maybe I'm doing it wrong. I tried `send(link_path)`
[22:48:35] amperry: has joined #RubyOnRails
[22:49:04] amperry: Hi folks, wondering why changing the .select clause in a query changes the # of results: https://gist.github.com/amp108/f8fff044fcb73fe31d2fc2b0204c2d6e
[22:49:18] amperry: Rather, the .order clause
[22:50:24] kitsuneyo: matthewd, the error I get with send is this: NoMethodError: undefined method `user_url(object.uploaded_by)'
[22:51:08] matthewd: Yeah.. that's not how send works
[22:51:37] kitsuneyo: That's not the only way I tried send
[22:52:52] kitsuneyo: I tried to combine call it on what I thought were the right bits of the string, but perhaps I didn't get it right
[22:53:44] arBmind1: has joined #RubyOnRails
[22:54:25] mikecmpbll: has joined #RubyOnRails
[22:54:44] xjunior: has joined #RubyOnRails
[22:54:48] xjunior: I have this Dockerfile (https://gist.github.com/b9162da619ea279d4e80be142b57c7e5) and it is a rails project. The image builds fine, but doesn't run as if the "bundle install" part wasn't run. Any idea?
[22:59:27] Ayey_: has joined #RubyOnRails
[23:00:47] Kamuela: has joined #RubyOnRails
[23:00:47] jhill__: has joined #RubyOnRails
[23:00:47] ome: has joined #RubyOnRails
[23:00:47] szulak: has joined #RubyOnRails
[23:00:48] flopsec: has joined #RubyOnRails
[23:01:31] pwntrik: I'm getting the error "uninitialized constant ActiveRecord::Core::LegacyYamlAdapter" here's the trace: https://pastecry.pt/DeuBCw#EhDer0Bum4Yt5Kuq7Vev2Tys4Uv
[23:02:18] pwntrik: Here's a better version https://pastecry.pt/umzXxs#UsAf6Deb0Uc5Eh3Ar6Rur9Sez
[23:03:12] kitsuneyo: matthewd: After reading more about send I think I understand better how it's used, but I have no idea how to use it here. What object would I be sending the string to? Do you have an idea of what's needed?
[23:04:06] matthewd: kitsuneyo: The same thing you're calling eval on (self)
[23:05:01] amperry: ACTION updated https://gist.github.com/amp108/f8fff044fcb73fe31d2fc2b0204c2d6e to include `.to_sql` output.
[23:06:45] matthewd: amperry: What do you think x.balances[-1] is here?
[23:06:54] pwntrik: ^^^ also of note, none of the files listed in the backtrace are my code it's all system gem installs like active_record, etc.
[23:07:39] amperry: matthewd: x.balances[-1] should be the last of a set of balances updated per month.
[23:08:24] kitsuneyo: matthewd: `link(:related) { self.send(link_path) }` gives another undefined method error
[23:08:33] matthewd: amperry: It's one of them.. but there's nothing in that query that'll make it the last
[23:08:41] tbuehlmann: xjunior: these Gemfile issues moved me away from that approach. right now I'm preferring docker compose with one container for each service and simply mounting the current directory to /app and having a volume for the installed gems
[23:08:52] Derperperd: has joined #RubyOnRails
[23:09:12] xjunior: tbuehlmann: I like your approach. is there any tutorial of that you can refer?
[23:09:14] amperry: matthewd: ah. So I need to also order by balances.balance_date?
[23:10:01] tbuehlmann: xjunior, gisted this some days ago: https://gist.github.com/tbuehlmann/a361a255298794078506504f75372a57
[23:10:07] xjunior: thank you!
[23:10:10] matthewd: pwntrik: https://github.com/rails/rails/blob/v4.2.4/activerecord/lib/active_record/core.rb#L302
[23:11:02] matthewd: amperry: Probably. Without that the order will be arbitrary, so the other change of order may well result in different results.
[23:11:22] tbuehlmann: xjunior: this being an app setup just recently: https://gist.github.com/tbuehlmann/51bb8c40f923368a0f6057cb2a8c92b2
[23:12:24] xjunior: tbuehlmann: what about watching your Gemfile for dependency installation?
[23:12:59] xjunior: I woud image that other Dockerfile I posted would have that feature
[23:13:06] xjunior: as per the tutorial I was following
[23:15:13] tbuehlmann: no idea, sorry
[23:19:06] pwntrik: matthewd: thanks i was looking for that. I'm trying to downgrade from 5 to 4 to see if that changes the "Legacy" error because I'm pretty sure I wrote this app with Ruby 4
[23:20:00] matthewd: pwntrik: Well, running with different components at different versions definitely isn't going to work
[23:20:33] pwntrik: Ya i didn't realize it was trying to use Rails 5. It has both installed 4 and 5
[23:21:16] amperry: matthewd: yup, that fixed it. Thanks!
[23:22:11] matthewd: pwntrik: !xy more importantly. Asking for help with your idea of a hack around the real problem, without actually describing same, is not doing anyone any favours.
[23:22:11] helpa: pwntrik: It seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
[23:29:14] Duckily: has joined #RubyOnRails
[23:31:25] kitsuneyo: If I send 'users' as the path_name, then I can use self.send to get users_url with the following: https://gist.github.com/kitsuneyo/df549dbb43e5bf33169f9eee5486676c. I just need to work out how to pass the ID to user_url. Anyone?
[23:34:22] kristofferR: has joined #RubyOnRails
[23:35:44] pwntrik: matthewd: duly noted
[23:36:43] matthewd: kitsuneyo: Where have you been "reading more about send", which hasn't answered that question? :/
[23:38:01] matthewd: pwntrik: IOW: I'd much rather help you solve the actual "this isn't working on Rails 5.0" issue, than join in on the "well maybe I can get it working if I roll back to Rails 4.2" side-quest
[23:38:31] alan_w: has joined #RubyOnRails
[23:41:53] choke: has joined #RubyOnRails
[23:41:56] quazimodo: has joined #RubyOnRails
[23:46:12] pwntrik: matthewd: it's all good. i can get rails 5 uninstalled and test it. working on it as we speak i'll let you know if that fixes the error
[23:46:49] crystalneth: has joined #RubyOnRails
[23:46:51] doodlehaus: has joined #RubyOnRails
[23:48:48] pwntrik: matthewd: same error. => Rails 4.2.4 application starting in development on http://10.0.2.15:3000
[23:49:45] matthewd: pwntrik: We just established that line doesn't contain any mention of LegacyYamlAdapter in 4.2.4 though :/
[23:50:00] matthewd: pwntrik: Full error and backtrace again please
[23:50:08] Ayey_: has joined #RubyOnRails
[23:50:25] matthewd: Though again, I'd much rather understand and fix the issue with 5.0
[23:51:03] pwntrik: matthewd: https://pastecry.pt/6FA1Ly#Ut%5ESea2Cut6An6Ac1Az3Dew8Yg
[23:53:43] kitsuneyo: has joined #RubyOnRails
[23:54:01] matthewd: That still looks like a Frankenstein of OS package- and gem-provided files
[23:55:22] Radar: I can't find that init_with method at that specified location in Rails 5.0.2.
[23:55:29] kitsuneyo: Ehh, I figured out what I needed to do with send... I guess it was pretty simple >.<;;
[23:56:02] Radar: Oh is it because that's not Rails 5, but 4.2.4?
[23:56:18] Radar: Yeah, that looks like it.
[23:56:46] Radar: https://github.com/rails/rails/blob/v4.2.4/activerecord/lib/active_record/core.rb#L301-L314
[23:56:54] Radar: I don't see LegacyYamlAdapter there either.
[23:56:55] cnk: kitsuneyo: do share
[23:57:06] pwntrik: it's 4.2.4
[23:57:32] matthewd: Half the paths have 4.2.4 in them, and half are from vendor_ruby
[23:57:40] duderonomy: has joined #RubyOnRails
[23:57:44] Radar: pwntrik: at /usr/lib/ruby/vendor_ruby/active_record, is there a file called gem_version.rb?
[23:57:53] kitsuneyo: cnk, here is an updated gist: https://gist.github.com/kitsuneyo/df549dbb43e5bf33169f9eee5486676c
[23:58:26] kitsuneyo: it took me ages to understand how to include the param
[23:58:27] Radar: pwntrik: if there isn't, is there one called version.rb?
[23:58:35] cnk: Excellent
[23:58:50] matthewd: activesupport, at least, seems to have individual files split between the two locations :|
[23:58:50] cnk: so this is a general method for including a link ot a related object?
[23:59:08] Radar: matthewd: Are you certain?
[23:59:18] Radar: matthewd: better question: _how_ are you certain?
[23:59:53] matthewd: activesupport (4.2.4) lib/active_support/notifications/instrumenter.rb:20