« Back to channel list

#RubyOnRails - 14 May 2017

« Back 1 day Forward 1 day »
[00:04:22] xx00__: has joined #RubyOnRails
[00:04:37] xx00__: I installed MySQL to use with ruby on rails but when I try to “rake db:create” it asks me for a password
[00:04:43] xx00__: even though i never set a password when i installed MySQL
[00:04:48] xx00__: can anyone advise?
[00:09:11] Dreamer3: has joined #RubyOnRails
[00:12:24] bronson: has joined #RubyOnRails
[00:26:11] quirkycoders: has joined #RubyOnRails
[00:35:03] ascarter: has joined #RubyOnRails
[00:38:58] Rodya_: has joined #RubyOnRails
[00:40:35] djbkd: has joined #RubyOnRails
[00:43:19] Jameser: has joined #RubyOnRails
[00:47:39] xx00__: has joined #RubyOnRails
[00:48:29] Jameser: has joined #RubyOnRails
[00:53:39] Rodya_: has joined #RubyOnRails
[00:54:11] rfoust: has joined #RubyOnRails
[00:57:52] patarr: has joined #RubyOnRails
[01:18:55] irishfromua: has joined #RubyOnRails
[01:24:04] aajjbb: has joined #RubyOnRails
[01:59:05] xibalba: xx00__ ; you didn't complete your mysql install likely
[02:13:35] bronson: has joined #RubyOnRails
[02:20:43] irishfromua: has joined #RubyOnRails
[02:22:53] wethu: has joined #RubyOnRails
[02:37:14] irishfromua: has joined #RubyOnRails
[02:41:27] SteenJobs: has joined #RubyOnRails
[02:41:34] hfp_work: has joined #RubyOnRails
[02:47:13] confounds: has joined #RubyOnRails
[02:55:22] captproton: has joined #RubyOnRails
[02:58:48] patarr: has joined #RubyOnRails
[03:00:21] sandstrom: has joined #RubyOnRails
[03:01:14] captproton: does anyone want to help me figure out why rails 5 doesn’t give me error explanations, but 500’s?
[03:05:07] apparition: has joined #RubyOnRails
[03:11:47] jaegerca: has joined #RubyOnRails
[03:13:35] jaegerca: So I have this people resource in my project, and there are a lot of actions that can be taken with them like publish, unpublish, retire - and many more. I am thinking about moving all these non CRUD actions into their own controller. does this make sense to anyone? resources :people {resource :action} and then just putting the actions in the action resource? Seems dirty to me.
[03:14:59] fryguy: captproton: what is config.consider_all_requests_local set to
[03:15:16] fryguy: jaegerca: why
[03:16:07] jaegerca: fryguy: Why does it feel dirty? Because It makes it seem like "action" is itself a resource when really it's not
[03:16:22] captproton: @fryguy development.rb: config.consider_all_requests_local = true
[03:17:31] captproton: @jaegerca maybe your model is too huge?
[03:18:13] jaegerca: captproton: It's just a lot of states in eventmachine really
[03:18:28] captproton: @jaegerca maybe you could create some Plain Old Ruby Objects
[03:18:39] jaegerca: I am just looking for a smart way to put non crud actions in another controller
[03:19:43] captproton: I would need more details to be more help
[03:21:31] fryguy: captproton: and are you running in development mode?
[03:22:23] fryguy: what does the page look like
[03:23:16] captproton: @fryguy I am used to getting something descriptive and now I get the one-sentence explanation:
[03:24:02] captproton: https://realestateflywheel-staging.herokuapp.com/500.html
[03:24:08] captproton: similar to that ^^
[03:25:54] fryguy: are you running your app on heroku?
[03:40:09] xx00__: has joined #RubyOnRails
[03:48:32] v|sh: has joined #RubyOnRails
[04:06:56] captproton: has joined #RubyOnRails
[04:14:31] bronson: has joined #RubyOnRails
[04:42:54] thomasfedb: Radar, howdy
[04:56:50] patarr: has joined #RubyOnRails
[05:01:24] DaveTaboola: has joined #RubyOnRails
[05:07:27] tofutoon: has joined #RubyOnRails
[05:16:14] bronson: has joined #RubyOnRails
[05:26:59] duderonomy: has joined #RubyOnRails
[05:35:27] ych: has joined #RubyOnRails
[05:37:03] cam27: has joined #RubyOnRails
[05:49:48] apparition: has joined #RubyOnRails
[06:01:06] cjk101010: has joined #RubyOnRails
[06:03:47] fernandomm: has joined #RubyOnRails
[06:44:56] jane_booty_doe: has joined #RubyOnRails
[06:50:54] srinidhi: has joined #RubyOnRails
[06:54:09] bobbyblanco: has joined #RubyOnRails
[07:08:26] Majadon: has joined #RubyOnRails
[07:17:51] scrooloose: has joined #RubyOnRails
[07:22:33] marr: has joined #RubyOnRails
[07:51:11] SteenJobs: has joined #RubyOnRails
[08:04:41] TvL2386: has joined #RubyOnRails
[08:06:47] lxsameer: has joined #RubyOnRails
[08:26:45] AzaToth: has joined #RubyOnRails
[08:29:42] v|sh: has joined #RubyOnRails
[08:40:09] defsdoor: has joined #RubyOnRails
[09:07:30] wethu: has joined #RubyOnRails
[09:53:08] mikecmpbll: has joined #RubyOnRails
[10:07:20] Volhist: has joined #RubyOnRails
[10:13:12] arBmind: has joined #RubyOnRails
[10:31:53] apparition: has joined #RubyOnRails
[10:39:10] Stimpy_: has joined #RubyOnRails
[10:53:12] beingjohnm: I'm using minitest and in one of my controller tests I create @user in setup. The form in that controller accesses the @user instance variable for a select field but I keep getting na error about it being nil.
[10:57:23] waseem_: has joined #RubyOnRails
[11:14:33] wethu: has joined #RubyOnRails
[11:18:54] netzfisch: has joined #RubyOnRails
[11:37:41] mikecmpb_: has joined #RubyOnRails
[11:50:00] quazimodo: has joined #RubyOnRails
[11:53:22] brkkyk: has joined #RubyOnRails
[12:12:01] User458764: has joined #RubyOnRails
[12:20:30] netzfisch: has joined #RubyOnRails
[12:22:06] tbuehlmann: beingjohnm: instance variables defined in your setup are not available in the view
[12:34:56] svkurowski: has joined #RubyOnRails
[12:56:19] Jameser: has joined #RubyOnRails
[13:00:16] shadre: has joined #RubyOnRails
[13:14:01] beingjohnm: tbuehlmann: Any suggestions on how to run the test?
[13:14:17] tbuehlmann: can you gist the code?
[13:23:13] beingjohnm: tbuehlmann: https://gist.github.com/global001/a69e32ff6166c71d02784a0ade75cee7
[13:23:29] beingjohnm: line 20 in the form is the line causing the issue
[13:23:47] tbuehlmann: can you add the controller to the gist?
[13:27:18] beingjohnm: tbuehlmann: done. thanks.
[13:27:25] captproton: has joined #RubyOnRails
[13:28:13] tbuehlmann: where in your code is @user actually set?
[13:32:08] beingjohnm: good question. It looks like it might not be. I thought it was being set by devise but I'm not seeing that to be the case.
[13:32:45] tbuehlmann: do you mean current_user instead of @user?
[13:34:36] beingjohnm: I know devise is creating current_user but I use @user in the registrations controller successfully
[13:36:07] beingjohnm: which would be because the registration for is a form for @user
[13:36:27] tbuehlmann: you should always use current_user and not the underlying instance variable
[13:38:27] beingjohnm: in theory this form could be accessed by the current_user or by an admin on the user's behalf. That is why I have that active record association the way it is.
[13:39:23] beingjohnm: would an instance variable in the setup be available in the controller?
[13:39:44] tbuehlmann: no, it's a different context
[13:42:22] beingjohnm: so, how does one handle a view that contains an active record association in a test?
[13:43:57] tbuehlmann: I don't think the real problem is sorted out yet. how is @user set?
[13:44:18] captproton: has joined #RubyOnRails
[13:44:19] beingjohnm: I am going to add that to the controller
[13:44:40] beingjohnm: and then pass it as a local in new.html.erb to the form partial
[13:47:41] User458764: has joined #RubyOnRails
[13:51:20] beingjohnm: gist updated to reflect that
[13:51:26] beingjohnm: and test passes now
[13:51:45] beingjohnm: thanks tbuehlmann!
[13:52:05] tbuehlmann: um, welcome!
[14:02:42] User458764: has joined #RubyOnRails
[14:10:35] cam27: has joined #RubyOnRails
[14:17:15] ArTiSTiX: has joined #RubyOnRails
[14:19:36] ArTiSTiX: has joined #RubyOnRails
[14:20:30] captproton: has joined #RubyOnRails
[14:24:07] fox_mulder_cp: tbuehlmann: how your project now? do you release it?)]
[14:27:48] Aherin: has joined #RubyOnRails
[14:37:06] ArTiSTiX: has joined #RubyOnRails
[14:41:18] fmcgeough: has joined #RubyOnRails
[14:45:06] ArTiSTiX: has joined #RubyOnRails
[14:47:50] ArTiSTiX: has joined #RubyOnRails
[14:50:43] durango: has joined #RubyOnRails
[14:55:29] ArTiSTiX: has joined #RubyOnRails
[15:03:30] durango: If I have an input field with simple_form and on the server side rendering of the HTML everything looks OK, but some sort of JS is injecting <style> above <body> with custom CSS that's disabling one of my input fields that shouldn't be disabled. I checked the custom JS files but nothing seems to be the answer. is there a specific place within a rails app that I should be looking into for this "issue"?
[15:05:51] aajjbb: has joined #RubyOnRails
[15:16:14] uksio: has joined #RubyOnRails
[15:20:19] syndikate: Hello people, can somebody help me understand how to create this association in rails?
[15:20:44] ArTiSTiX: has joined #RubyOnRails
[15:21:28] syndikate: A user has many orders, Orders can have two addresses (start and end). Now, having has through works, for user to address. Although, I was wondering what if I want a relation between User and Address as well without has through?
[15:21:45] fmcgeough: has joined #RubyOnRails
[15:35:38] marahin: Hello! I am setting session in Rails 5 with session[:session_id] = (number). However when I read it later, it seems to be hashed / encrypted, as it returns 7a209f6191a221e49818e8c371015826 (with "Rails.logger.debug session[:session_id].inspect"). Any idea what to do?
[15:35:42] marahin: What am I doing wrong?
[15:36:12] marahin: I'm using Sequel as the database engine as I'm working on some non-rails database structure.
[15:37:02] fryguy: marahin: try using a different key other than `session_id`
[15:37:52] marahin: fryguy it still is encrypted.
[15:37:55] marahin: I believe it might be because i am not using AR?
[15:38:20] fryguy: it's quite rare to use AR for sessions nowadays
[15:38:43] fryguy: can you reproduce it in tests
[15:39:12] marahin: fryguy no tests here
[15:39:29] marahin: the thing is - the session value is set, but it seems that it cannot be decoded
[15:39:31] marahin: so it's pure gibberish
[15:39:42] fryguy: write a test
[15:47:14] fmcgeough: has joined #RubyOnRails
[15:49:30] DLSteve: has joined #RubyOnRails
[15:57:33] fmcgeough: has joined #RubyOnRails
[16:02:36] ArTiSTiX: has joined #RubyOnRails
[16:04:53] ArTiSTiX: has joined #RubyOnRails
[16:10:16] fmcgeough: has joined #RubyOnRails
[16:10:24] beingjohnm: durango: could be a browser plugin possibly
[16:12:42] User458764: has joined #RubyOnRails
[16:27:35] francuz: hello, how much is it a good practice to use gems for most plug-ins and library I use?
[16:29:11] fryguy: francuz: as opposed to what?
[16:30:33] captproton: has joined #RubyOnRails
[16:31:02] francuz: downloading them and putting them into the assets manually, or using cdn of the package,
[16:31:22] fryguy: oh so javascript/css stuff
[16:31:39] fryguy: usually if the gems are available they'll tend to be a bit easier to use because asset precompilation will take care of a lot of the details for you
[16:36:09] irishfromua: has joined #RubyOnRails
[16:36:21] ascarter: has joined #RubyOnRails
[16:51:00] aseibert: has joined #RubyOnRails
[16:51:34] durango: beingjohnm: no all browser plugins are off :( it works on one environment (local) but not staging.. Im not seeing any issues between configurations though
[16:53:17] netzfisch: has joined #RubyOnRails
[17:00:06] User458764: has joined #RubyOnRails
[17:04:32] irishfromua: has joined #RubyOnRails
[17:05:11] ArTiSTiX: has joined #RubyOnRails
[17:10:53] ArTiSTiX: has joined #RubyOnRails
[17:14:19] waseem_: has joined #RubyOnRails
[17:28:58] DLSteve: has joined #RubyOnRails
[17:43:41] ArTiSTiX: has joined #RubyOnRails
[18:00:56] my123_: has joined #RubyOnRails
[18:02:34] nOgAnOo_: has joined #RubyOnRails
[18:03:12] Aeyris_: has joined #RubyOnRails
[18:09:53] atrius: has joined #RubyOnRails
[18:11:03] tbuehlmann: has joined #RubyOnRails
[18:13:06] szulak: has joined #RubyOnRails
[18:16:33] Mission-Critical: has joined #RubyOnRails
[18:17:15] gremax: has joined #RubyOnRails
[18:18:01] tycoon177: has joined #RubyOnRails
[18:27:10] srinidhi: has joined #RubyOnRails
[18:32:49] boxmein: has joined #RubyOnRails
[18:37:56] endemic: has joined #RubyOnRails
[18:39:17] endemic: has joined #RubyOnRails
[18:39:42] netzfisch: has joined #RubyOnRails
[18:41:01] endemic: has joined #RubyOnRails
[18:44:44] dionysus69: has joined #RubyOnRails
[18:46:31] duderonomy: has joined #RubyOnRails
[18:47:12] Technodrome: has joined #RubyOnRails
[18:49:36] endemic: has joined #RubyOnRails
[18:57:49] endemic: has joined #RubyOnRails
[18:59:25] endemic: has joined #RubyOnRails
[19:05:35] Dreamer3: has joined #RubyOnRails
[19:09:49] ur5us: has joined #RubyOnRails
[19:12:50] User458764: has joined #RubyOnRails
[19:16:48] boxmein: has joined #RubyOnRails
[19:27:32] captproton: has joined #RubyOnRails
[19:27:36] mostlybadfly: has joined #RubyOnRails
[19:28:29] xco: has joined #RubyOnRails
[19:29:21] xco: in my rails app i’m using redis. on deleting an item. it deletes in the redis cache but item doesn’t dissapear on web until i’ve change urls. not even when i refresh. i need some advice :)
[19:29:52] xco: to fix it so item on delete vanishes like like rails naturally does with usual activerecord stuff
[19:40:22] tanuki: has joined #RubyOnRails
[19:45:51] captproton: has joined #RubyOnRails
[19:46:21] fryguy: how is your page fetching the content to show
[19:47:36] fox_mulder_cp: active model serializer can use redis as cache
[19:52:10] waseem_: has joined #RubyOnRails
[20:00:43] waseem_: has joined #RubyOnRails
[20:43:17] ur5us: has joined #RubyOnRails
[20:56:25] elsurudo: has joined #RubyOnRails
[20:57:13] netzfisch: has joined #RubyOnRails
[21:01:09] elsurudo: has joined #RubyOnRails
[21:19:14] aajjbb: has joined #RubyOnRails
[21:30:22] sandstrom: has joined #RubyOnRails
[21:35:53] kies: has joined #RubyOnRails
[21:39:46] uxp_: has joined #RubyOnRails
[21:40:10] pupsicle1: has joined #RubyOnRails
[21:42:01] sunya7a__: has joined #RubyOnRails
[21:42:09] russt: has joined #RubyOnRails
[21:42:37] xybr3: has joined #RubyOnRails
[21:43:25] glasz: has joined #RubyOnRails
[21:44:03] Gm4n: has joined #RubyOnRails
[21:44:06] beingjohnm: has joined #RubyOnRails
[21:47:11] ja: has joined #RubyOnRails
[21:55:16] Junaos: has joined #RubyOnRails
[22:08:25] captproton: has joined #RubyOnRails
[22:11:37] marr: has joined #RubyOnRails
[22:32:55] Radar: GOOD MORNING
[22:34:40] Papierkorb: OHAYO Mr Radar
[22:48:22] weaksauce: has joined #RubyOnRails
[22:52:25] ahrs: has joined #RubyOnRails
[23:15:05] FastJack: has joined #RubyOnRails
[23:17:39] Radar: o/ Papierkorb
[23:30:02] irishfromua: has joined #RubyOnRails
[23:34:37] fox_mulder_cp: good night. 2.30, must go to sleep )
[23:38:13] amperry: has joined #RubyOnRails
[23:40:49] amperry: Hi folks. If I've got a stylesheet named 'application.css.erb' and I have a rule "body {background-image: image-url('image.png')}", where should 'image.png' reside? If the answer is in 'app/assets/images', is there a common reason why it wouldn't show as the background image in my app?
[23:41:18] Technodrome: has joined #RubyOnRails
[23:44:03] amperry: Or, alternately, the rule is "body {background-image: <% image_url('image.png') %>;}"
[23:48:30] wethu: has joined #RubyOnRails
[23:53:18] amperry: in short, if I want 'image.png' to be my background image, where do I put it and what do I put in my application.css.erb file? Nothing I'm trying seems to work.
[23:58:30] fryguy: amperry: what does the resulting css file that you fetch from the browser show