« Back to channel list

#RubyOnRails - 06 January 2019

« Back 1 day Forward 1 day »
[00:15:25] drale2k_: has joined #RubyOnRails
[00:21:07] cschneid: has joined #RubyOnRails
[00:40:42] cschneid: has joined #RubyOnRails
[00:47:01] benlieb: has joined #RubyOnRails
[00:54:03] benlieb: has joined #RubyOnRails
[01:05:22] apparition: has joined #RubyOnRails
[01:05:51] Slyda1: has joined #RubyOnRails
[01:20:38] tdy: has joined #RubyOnRails
[01:35:19] jottr_: has joined #RubyOnRails
[01:52:11] orbyt_: has joined #RubyOnRails
[02:08:26] tdy: has joined #RubyOnRails
[02:08:49] ss_much: has joined #RubyOnRails
[02:19:17] benlieb: has joined #RubyOnRails
[02:29:42] benlieb: has joined #RubyOnRails
[02:31:10] cschneid: has joined #RubyOnRails
[02:39:54] benlieb: has joined #RubyOnRails
[02:50:07] ghormoon: has joined #RubyOnRails
[03:03:36] duderonomy: has joined #RubyOnRails
[03:08:11] tdy: has joined #RubyOnRails
[03:42:56] sirensari2: has joined #RubyOnRails
[04:04:53] tdy: has joined #RubyOnRails
[04:10:07] braincrash: has joined #RubyOnRails
[04:21:42] gambl0r3: has joined #RubyOnRails
[04:22:22] uplime: has joined #RubyOnRails
[04:27:24] arthurnn: has joined #RubyOnRails
[04:40:06] kapil____: has joined #RubyOnRails
[05:36:46] Saukk: has joined #RubyOnRails
[05:43:31] Saukk: has joined #RubyOnRails
[06:06:06] Jervis_: has joined #RubyOnRails
[06:16:33] cschneid: has joined #RubyOnRails
[07:03:04] avalice: has joined #RubyOnRails
[07:03:13] avalice: sorry if this is a stupid question but
[07:03:17] avalice: i just started with rails, and can't seem to find anything on this online.
[07:03:20] avalice: in form_with/form_for, why does label: <%= f.email_field :email %> not generate a <label> html element
[07:03:24] avalice: whereas if you did <%= f.label :email %> <%= f.email_field :email %> it does?
[07:03:27] avalice: i noticed on the API that they use Email: <%= f.email_field %> a lot
[07:03:30] avalice: but it it doesn't generate a <label> element, how do we apply CSS styles to it?
[07:20:39] tdy: has joined #RubyOnRails
[07:50:00] Dbugger: has joined #RubyOnRails
[07:52:57] defsdoor: has joined #RubyOnRails
[08:46:28] cschneid: has joined #RubyOnRails
[09:54:32] reber: has joined #RubyOnRails
[09:58:04] mikecmpbll: has joined #RubyOnRails
[10:00:45] conta: has joined #RubyOnRails
[10:10:00] conta: has joined #RubyOnRails
[10:54:11] Technodrome: has joined #RubyOnRails
[11:34:12] Andr3as: has joined #RubyOnRails
[11:37:56] drale2k_: has joined #RubyOnRails
[11:48:41] conta: has joined #RubyOnRails
[11:52:49] conta1: has joined #RubyOnRails
[11:55:47] ariedler: has joined #RubyOnRails
[12:07:52] markit: has joined #RubyOnRails
[12:16:46] cschneid: has joined #RubyOnRails
[12:32:15] conta: has joined #RubyOnRails
[13:39:05] Saukk: has joined #RubyOnRails
[13:46:50] pLaTo0n: has joined #RubyOnRails
[14:31:43] reber: has joined #RubyOnRails
[15:01:20] KeyJoo: has joined #RubyOnRails
[15:09:09] dviola: has joined #RubyOnRails
[15:13:52] lunarkittychan: has joined #RubyOnRails
[16:04:22] cschneid: has joined #RubyOnRails
[16:14:07] Technodrome: has joined #RubyOnRails
[16:14:46] crankharder: has joined #RubyOnRails
[16:15:03] tdy: has joined #RubyOnRails
[16:27:28] lexileo: has joined #RubyOnRails
[16:32:10] conta: has joined #RubyOnRails
[16:58:21] orbyt_: has joined #RubyOnRails
[17:10:55] srinidhi: has joined #RubyOnRails
[17:18:34] cschneid: has joined #RubyOnRails
[17:19:30] orbyt_: has joined #RubyOnRails
[17:29:04] catbusters: has joined #RubyOnRails
[17:29:52] catbusters: Hi! I'm trying to use Grape to build an API, and I keep coming across examples that show `get "", root: :something`. What is the `root` supposed to do?
[17:31:55] tdy: has joined #RubyOnRails
[17:37:41] conta: has joined #RubyOnRails
[17:49:40] Saukk: has joined #RubyOnRails
[18:03:34] conta: has joined #RubyOnRails
[18:15:44] cnsvc: has joined #RubyOnRails
[18:19:43] gambl0r3: has joined #RubyOnRails
[18:35:41] uplime: has joined #RubyOnRails
[18:43:59] tdy: has joined #RubyOnRails
[18:51:59] benlieb: has joined #RubyOnRails
[19:06:16] crankharder: has joined #RubyOnRails
[19:34:40] chouhoulis: has joined #RubyOnRails
[19:37:45] orbyt_: has joined #RubyOnRails
[19:44:41] Technodrome: has joined #RubyOnRails
[19:50:58] sirensari2: has joined #RubyOnRails
[19:53:04] armyriad: has joined #RubyOnRails
[20:00:17] tdy: has joined #RubyOnRails
[20:20:17] conta: has joined #RubyOnRails
[20:43:37] tdy: has joined #RubyOnRails
[20:45:21] cnsvc: has joined #RubyOnRails
[20:48:52] TiglatePileser: has joined #RubyOnRails
[21:05:30] tdy: has joined #RubyOnRails
[21:07:21] cnsvc: anybody works on freebsd? have a rails setup issue with mysql
[21:10:06] Radar: GOOD MORNING
[21:11:27] cnsvc: morning Radar
[21:13:18] mksybr: has joined #RubyOnRails
[21:14:59] mksybr: I'm getting URI::InvalidURIError: bad URI(is not URI?): http://example.com but git grep 'http://example.com' has no results? Where should I look. Its when I run tests.
[21:15:52] Radar: mksybr: what's the stacktrace showing you?
[21:16:44] mksybr: https://hastebin.com/afazuqupih.bash
[21:18:15] Radar: mksybr: /home/malik/Workspace/blog/test/controllers/articles_controller_test.rb:20:in `block (2 levels) in <class:ArticlesControllerTest>'
[21:18:20] Radar: mksybr: what is this line?
[21:18:31] mksybr: post @article , params: { article: { title: @article.title, body:
[21:18:36] Radar: (the way I found that was to look through the stacktrace until I found the first line from your application)
[21:18:39] mksybr: @article.body} }
[21:19:06] Radar: I think you should be doing post :create there.
[21:19:18] Radar: The actual error you're seeing is: URI::InvalidURIError: bad URI(is not URI?): http://www.example.com:80#<Article:0x000055cf590f3c68>
[21:19:30] Radar: Where the end of the URL containing the .inspect'd version of the Article is invalid.
[21:20:34] Radar: Given this is a controller test, you should be making requests to the controller's actions. Therefore "post :create" instead of "post @article"
[21:22:43] Radar: morning cnsvc. What's your issue with Rails + mysql?
[21:22:44] mksybr: https://hastebin.com/owocoripet.bash post :create seems the same
[21:23:45] mksybr: Also is there an easy way to know which .post() that is other than scrolling thru `ri post`
[21:24:19] Radar: mksybr: can you please show me the whole controller test?
[21:24:38] mksybr: https://hastebin.com/yahogeyotu.rb
[21:25:02] Radar: The post method is this one: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/testing/integration.rb#L21
[21:25:16] Radar: You can see that file mentioned in the line above the last articles_controller_test stacktrace.
[21:25:41] Radar: Why are you inheriting a controller test from ActionDispatch::IntegrationTest? That seems strange to me. Maybe I am not up-to-date with the latest things that happen in Rails apps.
[21:25:47] Radar: I will try to reproduce this issue in a new app.
[21:26:15] mksybr: @Carpetsmoker Integration tests have replaced TestCase in Rails 5. – ArtOfCode Jul 17 '16 at 22:34
[21:26:15] mksybr: from https://stackoverflow.com/questions/35925504/uriinvalidurierror-bad-uriis-not-uri-testing-rails-controllers
[21:26:22] mksybr: Dunno if its true didnt investigate
[21:27:08] Radar: Okay. In that case: post '/articles' would be the correct version.
[21:27:26] Radar: I've been using RSpec for yonks and so I'm not up-to-speed with the latest and greatest in MiniTest / Test::Unit lands.
[21:27:59] Radar: Alternatively, you can probably use the url helpers here too: post articles_path
[21:30:54] cnsvc: Radar: https://dpaste.de/T3JM it crashes whenever try to connect mysql like rake db:migrate
[21:31:45] cnsvc: this is an empty rails 5.2.2 site
[21:31:48] Radar: cnsvc: that's a big crash!
[21:32:15] Radar: cnsvc: I noticed two things. Your stacktrace contains this line: /usr/local/var/rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/activesupport-4.2.10
[21:32:20] Radar: Which indicates that it is loading AS 4.2.10
[21:32:22] Radar: not 5.2.2
[21:32:35] Radar: The root of the problem seems to be this: /usr/local/var/rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/mysql2-0.4.10/lib/mysql2/mysql2
[21:33:08] Radar: 0.4.10 was released in November 2017. There's a new release of mysql, 0.5.2, released in July 2018. Does upgrading this mysql2 gem fix your issue?
[21:33:20] cnsvc: hm..it's an old log let me update a new one
[21:33:49] cnsvc: i have tested mysql2 0.5.2 and rails 5.2.2 has the same error
[21:34:52] duderonomy: has joined #RubyOnRails
[21:35:07] Radar: cnsvc: Could you update the log to show the same issue with those versions? Then I can definitely confirm it is the same thing at my end.
[21:41:10] hahuang6-: has joined #RubyOnRails
[21:41:21] cnsvc: Radar: https://dpaste.de/vvkq i've updated here. thank u
[21:54:55] uplime: has joined #RubyOnRails
[22:00:33] DTZUZO: has joined #RubyOnRails
[22:02:56] mksybr: Radar fixtures or factories used with rspec? ^F my rspec book and nothing bout either came up, are they not used? Just hardcode the data into tests?
[22:03:27] mksybr: Like if for instance if you have a test with a controller that validates: presence: true or what ever
[22:04:21] Radar: mksybr: I prefer factories.
[22:11:13] Radar: cnsvc: Thanks very much for that. I am not sure what is happening here. I would suggest filing an issue on the mysql2 repo?
[22:25:43] tdy: has joined #RubyOnRails
[23:07:47] Jervis_: has joined #RubyOnRails
[23:12:13] conta: has joined #RubyOnRails
[23:15:42] Technodrome: has joined #RubyOnRails
[23:20:02] uplime: has joined #RubyOnRails
[23:33:17] IGnorAND: is devise the way to go for rails api based apps?
[23:36:57] Technodrome: has joined #RubyOnRails
[23:41:31] tdy: has joined #RubyOnRails