beingjohnm

Activity Graph

Page 1 of 4 | Next »

2019-08-20

[01:49:01] beingjohnm: has joined #RubyOnRails

2019-08-17

[01:30:03] beingjohnm: Ping timeout: 245 seconds
[02:05:42] beingjohnm: has joined #RubyOnRails
[02:39:12] beingjohnm: Ping timeout: 245 seconds

2019-08-10

[12:43:58] beingjohnm: Ping timeout: 258 seconds
[13:22:24] beingjohnm: has joined #RubyOnRails
[13:44:49] beingjohnm: Ping timeout: 244 seconds
[15:54:10] beingjohnm: has joined #RubyOnRails
[15:56:36] beingjohnm: It can be frustrating trying to piece together knowledge with blog posts and Stack Overflow questions...
[16:43:14] beingjohnm: FrostCandy: I wasn't commenting on your question. Lamenting my own issues. :)
[16:45:11] beingjohnm: I'm trying to setup an rspec feature test and when I visit the e.g. http://sub.lvh.me the application controller is seeing a request for www.example.com. None of the many, many pages I have visited have helped me resolve this.
[17:41:18] beingjohnm: maybe I'll explore system tests rather than messing with capybara and rspec anymore
[23:24:54] beingjohnm: the minitest system tests did the trick

2019-08-09

[16:19:38] beingjohnm: Ping timeout: 245 seconds
[16:26:20] beingjohnm: has joined #RubyOnRails

2019-08-08

[18:45:25] beingjohnm: Anyone have any ideas on my question above?
[18:45:37] beingjohnm: from a couple of days ago?
[18:48:35] beingjohnm: Linell: I'm trying to write my first integration tests and having an issue. Getting a "can't modify frozen String" error on a line that simply reads "visit "/"": https://gist.github.com/global001/608daee57dc9bbec39a498f725e7908b
[18:48:43] beingjohnm: I'm not familar with rspec or capybara but there is not a lot of code here to inspect. I was wondering if there was possibly a traceback missing due to this and that the error is somewhere else. On Ruby 2.4.4 if it matters.
[18:49:05] beingjohnm: As usual I assume I am missing something simple and obvious :)
[18:51:07] beingjohnm: Linell: Thanks anyway!
[18:51:17] beingjohnm: No but I will right now
[18:54:45] beingjohnm: Linell: I did search that and didn't see anything that helped. Did see someone else with the same unanswered question.
[18:55:24] beingjohnm: I guess one question is why would I all of a sudden get an error about frozen strings. Isn't that a Ruby 3 thing while I'm on 2.4.4.
[18:57:09] beingjohnm: and I'm further wondering if the error might be something to do with loading the page e.g. inside devise's controller but that the traceback isn't showing it
[18:57:29] beingjohnm: the page loads fine in the browser though
[18:58:07] beingjohnm: Linell: good idea
[19:02:59] beingjohnm: same error though
[21:26:08] beingjohnm: Linell: Figured out that it was looking for Firefox to be installed on the system and wasn't finding it. My dev system is a remote Ubuntu instance.

2019-08-06

[13:50:44] beingjohnm: I'm trying to write my first integration tests and having an issue. Getting a "can't modify frozen String" error on a line that simply reads "visit "/"": https://gist.github.com/global001/608daee57dc9bbec39a498f725e7908b
[13:56:10] beingjohnm: I'm not familar with rspec or capybara but there is not a lot of code here to inspect. I was wondering if there was possibly a traceback missing due to this and that the error is somewhere else. On Ruby 2.4.4 if it matters.

2019-07-24

[14:19:07] beingjohnm: Remote host closed the connection
[14:29:19] beingjohnm: has joined #RubyOnRails
[19:39:54] beingjohnm: anyone know where I would put "Host: redis" from this first example into my Rails app: https://docs.gitlab.com/ee/ci/services/redis.html It doesn't seem like the redis.yml is the place

2019-07-23

[05:41:46] beingjohnm: Ping timeout: 246 seconds
[05:44:05] beingjohnm: has joined #RubyOnRails

2019-07-22

[02:20:42] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in
[02:50:19] beingjohnm: has joined #RubyOnRails

2019-07-19

[18:54:15] beingjohnm: I create an index that Rails/Postgres does not seem to be enforcing: t.index ["user_id", "category_id", "account_id", "year", "month"], name: "unique_budget_entry", unique: true. The thing is that an entry either has account_id set or category_id set not both (and nil if not set). My thought was I only want one entry per category a month and one entry per account per month. Unfortunately it is
[18:54:21] beingjohnm: only enforcing the uniquness if all fields are set and not counting null as in the index.
[19:01:12] beingjohnm: mlt-: I think I might need to unique indexes, one on category_id and one on account_id. or possibly a partial index

2019-07-09

[15:19:14] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.2 - http://znc.in
[16:09:17] beingjohnm: has joined #RubyOnRails

2019-07-07

[11:46:53] beingjohnm: Remote host closed the connection
[12:20:53] beingjohnm: has joined #RubyOnRails

2019-06-25

[14:50:37] beingjohnm: Remote host closed the connection
[15:20:11] beingjohnm: has joined #RubyOnRails

2019-05-30

[06:23:33] beingjohnm: Ping timeout: 258 seconds
[06:26:24] beingjohnm: has joined #RubyOnRails

2019-05-16

[22:45:16] beingjohnm: Remote host closed the connection
[23:21:03] beingjohnm: has joined #RubyOnRails

2019-04-22

[21:59:04] beingjohnm: Ping timeout: 246 seconds
[22:01:15] beingjohnm: has joined #RubyOnRails

2019-04-13

[16:50:06] beingjohnm: *.net *.split

2019-04-08

[13:34:24] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in
[13:40:25] beingjohnm: has joined #RubyOnRails

2019-03-31

[12:45:28] beingjohnm: some comments on Hacker News yesterday made me want to give turbolinks a try. Definitely seems to speed up the page loags but can't submit a form without a page load.
[12:46:37] beingjohnm: I can see that there is option to turn off the turbolink loading of pages at the link level but that isn't ideal. Any other ideas?

2019-03-16

[14:21:19] beingjohnm: trying to patch a record and format.html { head :ok } redirects in Rails 5.2 (last step of upgrade from 4.2). I had been using head :no_content but that now triggers a download of an empty file
[14:28:29] beingjohnm: actually, head :ok shouldn't be inside the format.html brackets I think
[14:32:35] beingjohnm: that didn't work. It is still trying to redirect to the record.
[18:51:25] beingjohnm: Shorty6: create the javascript file and include it on that page

2019-03-15

[14:09:10] beingjohnm: running into an issue with bundler 2.0.1 and deploying to elastic beanstalk. bummer.

2019-03-14

[20:05:43] beingjohnm: Remote host closed the connection
[20:09:35] beingjohnm: has joined #RubyOnRails

2019-03-11

[18:24:31] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in
[18:28:04] beingjohnm: has joined #RubyOnRails

2019-03-06

[11:37:59] beingjohnm: moving from rails 4 to rails 5. Do I just junk all of my controller tests?
[11:40:06] beingjohnm: getting no route matches...missing required keys id for: get edit_task_url, params: { id: @task.id }
[12:13:06] beingjohnm: These are minitests
[12:16:39] beingjohnm: tbuehlmann: following a guide on transitioning to rails 5 so using IntegrationTest
[12:19:48] beingjohnm: same error with: get edit_task_path, params: { id: @task.id }
[12:20:50] beingjohnm: elsewhere is sounds like I should be doing: get 'tasks/id/edit/ ubut don't know how to write that
[12:21:50] beingjohnm: tbuehlmann: that worked. Thank you!
[12:23:27] beingjohnm: trying to combine bits from different guides...example code was working for the show test but not for the edit test.
[14:04:23] beingjohnm: guyzmo: I never found a free day or two to check out rspec. Your comment makes me wish I had!
[16:57:21] beingjohnm: guyzmo: at some point I'm going to expand my testing (mostly a ton of model and unit tests) and start going integration testing. I'll probably look closer then.

2019-03-02

[14:48:27] beingjohnm: how do you escape special characters in an email address using mailer. e.g. the from name has paranthesis in it so the from string might be "Test(s) <test@example.com>"
[18:32:31] beingjohnm: ACTION might be upgrading to rails 5 today

2019-03-01

[14:15:24] beingjohnm: Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in
[14:17:13] beingjohnm: has joined #RubyOnRails

2019-02-26

[09:30:05] beingjohnm: Ping timeout: 245 seconds
[09:36:18] beingjohnm: has joined #RubyOnRails
[11:55:51] beingjohnm: Remote host closed the connection
[17:15:08] beingjohnm: has joined #RubyOnRails

2019-02-22

[02:31:14] beingjohnm: has joined #RubyOnRails

2019-02-21

[23:09:26] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in

2019-02-03

[15:04:04] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[15:07:01] beingjohnm: has joined #RubyOnRails

2019-01-29

[19:23:52] beingjohnm: tests failing today with Time.now + 1.month. Question is do I ignore or rework the code so it passes?
[21:59:14] beingjohnm: havenwood: I think it is failing as it is setting the date for one month from now and then checking the month between dates. Typically that would return one and now I think it is returning zero.

2019-01-27

[00:33:17] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[00:38:02] beingjohnm: has joined #RubyOnRails

2019-01-18

[03:53:12] beingjohnm: weird. I'm positive that the behaviour of my code changed. I use using self.child.each and now it seems as if I need to do self.child.all.each
[03:54:27] beingjohnm: not getting an error but if I do the former then the loop doesn't seem to run
[03:56:40] beingjohnm: the all shouldn't be required right?
[03:57:27] beingjohnm: too tired to even create a gist right now. been banging my head on this for a while. writing tests and maybe there is something in there that is getting me
[03:57:45] beingjohnm: thanks though sevenseacat!
[15:45:50] beingjohnm: figure it out. was a combination issue of how I was writing my tests and data being "preloaded" in the model

2018-12-08

[00:18:32] beingjohnm: Ping timeout: 240 seconds
[00:56:48] beingjohnm: has joined #RubyOnRails

2018-12-03

[18:45:18] beingjohnm: reasking my maybe random question: has anybody setup testing that looks at each view and checks if there are any I18n translations that don't exist?

2018-12-01

[16:33:53] beingjohnm: maybe a random question but has anybody setup testing that looks at each view and checks if there are any I18n translations that don't exist?

2018-10-24

[18:48:53] beingjohnm: *.net *.split

2018-09-17

[19:37:45] beingjohnm: I'd do users first
[19:38:23] beingjohnm: and, if you're starting from scratch, writing tests before writing any methods

2018-09-15

[02:31:21] beingjohnm: I click a button in examples/index.html.erb which creates a new example record. I also want that to render a partial (examples/_edit_form_modal.html.erb) that I pass @example.id to.
[02:32:43] beingjohnm: when using $("body").append("<%= j render partial 'examples/edit_form_modal' %>") it is just appending the string rather than rendering the partial and appedning it
[02:34:16] beingjohnm: it seems that I can perhaps only use the append...render inside of a js.erb file. so, how do I load and execute that js.erb file from jquery?
[02:34:53] beingjohnm: There is something very basic here that is escaping me at the moment
[02:43:40] beingjohnm: maybe it will come to me with a fresh start

2018-08-30

[02:36:43] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[02:40:34] beingjohnm: has joined #RubyOnRails
[20:09:43] beingjohnm: running brakeman on my app and getting the warning about mass assignment (https://brakemanscanner.org/docs/warning_types/mass_assignment/index.html). It is catching because I permit :account_id as a parameter for submission of some of my forms. I can't really think of a work around for that though. e.g. when creating a "transaction" I need to pass the account that the transaction is being created
[20:09:49] beingjohnm: for. Any ideas?
[20:58:54] beingjohnm: tycoon177: good point. I should double check that it is looking up only the accounts the user has access to but I'm pretty sure it is.
[21:04:39] beingjohnm: tycoon177: definitely. I feel like I'm adhering to the framework will and not doing anything crazy but I like the additional data point.

2018-08-21

[16:01:54] beingjohnm: at what number of parameters would you instead pass a hash of parameters?
[16:02:14] beingjohnm: I feel my code getting unruly

2018-08-17

[17:39:06] beingjohnm: Ping timeout: 260 seconds
[17:40:03] beingjohnm: has joined #RubyOnRails

2018-08-16

[15:32:07] beingjohnm: Remote host closed the connection
[16:28:50] beingjohnm: has joined #RubyOnRails

2018-07-20

[00:07:28] beingjohnm: *.net *.split
[00:15:24] beingjohnm: has joined #RubyOnRails

2018-07-14

[12:51:13] beingjohnm: has joined #RubyOnRails
[15:05:26] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[15:07:22] beingjohnm: has joined #RubyOnRails

2018-07-13

[16:40:21] beingjohnm: Remote host closed the connection

2018-06-26

[14:25:52] beingjohnm: Remote host closed the connection
[14:31:46] beingjohnm: has joined #RubyOnRails

2018-06-14

[19:18:54] beingjohnm: seriously why does multiplying by a fraction always return zero like nothing happened
[19:27:26] beingjohnm: t = 0.01 * 100 * (5/9)
[19:28:06] beingjohnm: just researched and see that I have to add .to_f to the numerator and/or denomiantor but that feels like terrible default behaviour
[19:28:15] beingjohnm: should at least output a warning
[19:54:57] beingjohnm: baweaver: I'm not convinced that is expected. Maybe a warning that says "It looks like you are trying to divide two integers and you might expect a float to be returned. We're going to return zero but if you wanted a float you can use this alternative method."
[19:55:40] beingjohnm: I just can't think of a use case otherwise
[19:57:56] beingjohnm: I will cede both of those points but does everybody just multiple every number inside their apps by 100?
[19:59:07] beingjohnm: From a user's point of view I can't think of anytime I would want 5/9 to equal 0.
[22:39:49] beingjohnm: Radar: that sounds like something I should do for my app
[22:47:18] beingjohnm: Just added to my too reesearch list

2018-05-29

[02:46:56] beingjohnm: *.net *.split
[02:47:45] beingjohnm: has joined #RubyOnRails
[02:50:08] beingjohnm: *.net *.split
[02:51:45] beingjohnm: has joined #RubyOnRails
[18:53:00] beingjohnm: *.net *.split
[18:53:38] beingjohnm: has joined #RubyOnRails

2018-05-28

[01:35:50] beingjohnm: Ping timeout: 276 seconds
[01:36:37] beingjohnm: has joined #RubyOnRails

2018-04-25

[12:25:57] beingjohnm: *.net *.split
[12:27:31] beingjohnm: has joined #RubyOnRails
[15:01:28] beingjohnm: *.net *.split
[15:03:07] beingjohnm: has joined #RubyOnRails

2018-04-23

[15:32:08] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[15:34:46] beingjohnm: has joined #RubyOnRails

2018-04-05

[01:21:30] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[01:25:10] beingjohnm: has joined #RubyOnRails
[02:40:12] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[02:51:58] beingjohnm: has joined #RubyOnRails
[02:56:52] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[03:00:47] beingjohnm: has joined #RubyOnRails
[15:34:31] beingjohnm: Been pulling my hair out with something for the past couple of hours: https://gist.github.com/global001/13c241f57a74be0b46f669b76dca409b
[16:10:02] beingjohnm: anybody want to help a brother keep his hair and let me know while this view loop prints out what is inside an if statement regardless? https://gist.github.com/global001/13c241f57a74be0b46f669b76dca409b
[16:50:41] beingjohnm: thomasfedb: no...
[16:52:42] beingjohnm: I did. And it seems to be testing the even/odd correctly based on the debugs. The issue seems to be a quirk of views or something.
[16:53:02] beingjohnm: I feel like I came across this a couple of years ago but can't remember exactly what the issue was.
[16:54:46] beingjohnm: I'll try that
[16:57:33] beingjohnm: that resulted in some strange behaviour. It put all of them on one row (inside of <tr></tr>) with the other four rows appearing empty and outside of the table
[17:06:34] beingjohnm: thomasfedb: this is going to be helpful with debugging. thanks.

2018-04-04

[18:18:05] beingjohnm: Ping timeout: 276 seconds
[18:36:49] beingjohnm: has joined #RubyOnRails
[20:09:12] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[20:18:15] beingjohnm: has joined #RubyOnRails
[21:17:13] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[21:41:29] beingjohnm: has joined #RubyOnRails

2018-03-28

[01:19:27] beingjohnm: Ping timeout: 252 seconds
[01:20:42] beingjohnm: has joined #RubyOnRails

2018-03-15

[02:30:14] beingjohnm: trying to use fontawesome 5 but having trouble with production. When deploying it is adding the "fingerprint" to the end of the font filenames but the fontawesome scss file is not including the fingerprtinted version of the filenames. I tried using asset-url and font-url in the path. Those give me the correct path but don't add the fingerprinted filename.
[02:40:09] beingjohnm: fryguy: I don't think that includes the new pro fonts
[02:58:42] beingjohnm: got it. placing the fonts in public rather than assets solves the problem.

2018-03-14

[16:07:04] beingjohnm: tycoon177: I think that question might be outside the intended scope of the channel :)
[16:08:20] beingjohnm: you could probably send them striaight to s3 and process them with lambda
[16:08:28] beingjohnm: but I don't know how to set that up

2018-03-09

[11:23:09] beingjohnm: dionysus69: I use Papertrail for that
[19:56:33] beingjohnm: prutheus: I'm not positive but I believe if you're trying to link to a stylesheet in an email you'll need it to be in /public/assets. And then I would hardcode the full url with domain name in the email rather than using the stylesheet include tag
[20:09:21] beingjohnm: prutheus: did you try this? https://stackoverflow.com/questions/7801102/how-to-have-absolute-path-for-stylesheets-in-mailer-with-the-asset-pipeline

2018-03-02

[21:16:48] beingjohnm: za1b1tsu: Session.includes(:ratings).where("ratings.subject = 'review'") ?
[21:17:28] beingjohnm: oh never mind

2018-03-01

[15:30:16] beingjohnm: terens: DateTime.strptime("1519916596.0613241", '%s')

2018-02-28

[16:43:38] beingjohnm: has joined #RubyOnRails
[19:00:26] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[20:34:29] beingjohnm: has joined #RubyOnRails

2018-02-23

[07:57:39] beingjohnm: has joined #RubyOnRails
[08:11:48] beingjohnm: *.net *.split
[08:34:18] beingjohnm: has joined #RubyOnRails
[18:44:46] beingjohnm: *.net *.split

2018-02-21

[09:49:47] beingjohnm: Ping timeout: 276 seconds
[09:52:33] beingjohnm: has joined #RubyOnRails

2018-02-20

[15:26:32] beingjohnm: MrCrackPotBuilde: you can use a second controller for a model but you'll need to be the shop creation views in a folder for the second controller. I believe.
[15:27:20] beingjohnm: Can somebody take a quick look at the weird results I'm getting from a where query using "NOT IN": https://gist.github.com/global001/da4227cac903e50d68d183e32aa7a8d6
[15:31:24] beingjohnm: you don't need to create a new model
[15:34:05] beingjohnm: It sounds like you need to remove the new and create methods from your shop controller and put them in a new controller. Move the new.html.erb from your shop controller views to the new controller views.
[15:47:46] beingjohnm: btw, not sure if it matters but I'm on rails 4. But it seems to be a postgres thing.
[16:59:29] beingjohnm: so it appears that you have to add IS NOT NULL to the end of a subquery when using NOT IN with postgres. e.g. User.where("users.id NOT IN (SELECT user_id FROM activities WHERE activities.created_at >= '2017-01-01' AND activities.created_at <= '2017-12-31' AND user_id IS NOT NULL)").count

2018-02-19

[20:36:02] beingjohnm: Inside: use jquery to replace the text on that page?
[20:36:20] beingjohnm: not sure what the question is really
[20:37:51] beingjohnm: Inside: google "jquery to replace text on a page"

2018-02-09

[16:45:58] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[16:50:34] beingjohnm: has joined #RubyOnRails

2018-01-22

[07:20:00] beingjohnm: Ping timeout: 248 seconds
[07:24:14] beingjohnm: has joined #RubyOnRails
[15:15:57] beingjohnm: Ping timeout: 240 seconds
[15:20:22] beingjohnm: has joined #RubyOnRails

2018-01-20

[14:22:53] beingjohnm: Remote host closed the connection
[14:59:38] beingjohnm: has joined #RubyOnRails

2018-01-12

[20:17:08] beingjohnm: is there a way to undo a csv import if an error occurs with one of the rows? Or do I need to test the whole csv file before saving records?
[20:33:57] beingjohnm: fryguy: importing it into the database

2018-01-11

[14:56:42] beingjohnm: I'm looking to implement custom fields (user can create new fields for a model) and it sounds like I can either use a custom fields table or the hstore feature of of postgres. Anybody have any experience with this? My first question is with the custom fields table method. If I want to offer the user the choice of either creating a text or a number field that seems to change the key/value paradigm. I'll need to do key/value_type/value_tex
[14:59:44] beingjohnm: json might work. hadnt considered that. Is it relatively fast with active record?

2017-12-21

[02:07:17] beingjohnm: *.net *.split
[02:08:35] beingjohnm: has joined #RubyOnRails

2017-12-13

[14:28:13] beingjohnm: fschuindt: the Chrome extension Postman?

2017-11-17

[20:56:26] beingjohnm: anybody having issues with workers/database connections with Heroku right now?

2017-11-14

[15:52:34] beingjohnm: Remote host closed the connection
[15:59:50] beingjohnm: has joined #RubyOnRails

2017-11-09

[06:15:04] beingjohnm: Ping timeout: 248 seconds
[06:17:29] beingjohnm: has joined #RubyOnRails

2017-11-06

[06:31:52] beingjohnm: *.net *.split
[07:11:58] beingjohnm: has joined #RubyOnRails

2017-09-27

[17:01:36] beingjohnm: Remote host closed the connection
[17:08:07] beingjohnm: has joined #RubyOnRails

2017-07-28

[13:38:28] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[16:29:39] beingjohnm: has joined #RubyOnRails

2017-07-14

[01:49:37] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in
[01:50:42] beingjohnm: has joined #RubyOnRails

2017-07-12

[13:18:53] beingjohnm: has joined #RubyOnRails

2017-07-11

[16:48:13] beingjohnm: Quit: ZNC 1.6.3+deb1+trusty0 - http://znc.in

2017-06-29

[14:30:06] beingjohnm: Remote host closed the connection
[14:48:14] beingjohnm: has joined #RubyOnRails

2017-06-27

[17:12:56] beingjohnm: arup_r: to save disk space?
[17:13:25] beingjohnm: When you do what is outlined on that page I believe it only returns anything that has not been completed
[17:14:14] beingjohnm: Can you connect ot Redis directly?
[17:14:58] beingjohnm: I meant outside of Sidekiq
[17:15:21] beingjohnm: yeah, I saw that too
[19:13:45] beingjohnm: Anybody know how to merge two I18n yml files inside of rails? I have my default en file and then client specific yml files that replace certain strings in the en.yml.

2017-06-16

[23:26:15] beingjohnm: *.net *.split