[03:42:55]
swemoney:
I just ran into a bug where Person.items has some duplicates in my database. (i.e. I've called Person.items << some_item more than once) .. This is a has and belongs to many relationship. If I do Person.items.uniq or Items.people.uniq, it'll return the list correctly. Is there an easy way to clean up these duplicates?

[08:50:44]
xco:
hi. i have a test_helper.rb with this #process method https://gist.github.com/siaw23/4d1587046d5dbb7fae286458f42b2f90#file-test_helper-rb-L63. i’m on Rails 5 but for some reason the #process method is implementing this: http://api.rubyonrails.org/v4.2/classes/ActionController/TestCase/Behavior.html#method-i-process which is from Rails 4 (hence giving me lots of deprecation warnings). How do I make my Rails 5 use this #process me

[09:29:33]
tbuehlmann:
also, do you see there's a deprecation warning in 5.0.4? https://github.com/rails/rails/blob/33db42168425866b714203e35a3a36693983b3f9/actionpack/lib/action_controller/test_case.rb#L484

[09:31:00]
xco:
oauth authorizes a user to use my api. yes i saw that. but even though routes are defined, when i add the kwargs like say params: { obj: { something: ‘hello’} } i get undefined routes error

[10:21:25]
xco:
tbuehlmann: https://gist.github.com/siaw23/d83d26a75b0d80e5279b0f7c3e68537a#file-image_request_controller-rb-L121 and on line https://gist.github.com/siaw23/d83d26a75b0d80e5279b0f7c3e68537a#file-image_request_controller-rb-L257

[15:11:39]
Fenhl:
hello. I host a web service which won't start any more since I upgraded to Debian jessie. Error message during `bundle install` is as follows: rack-2.0.3 requires ruby version >= 2.2.2, which is incompatible with the current version, ruby 2.1.5p273

[15:25:32]
fryguy:
i'd remove bundler, install it correctly, and move on from there. i'd look in /usr/local/bin to see if you maybe have another ruby installation in there that you forgot about. in addition, i'd strongly consider adding rbenv or chruby and have you own ruby installation instead of relying on the os provided one.

[17:53:05]
ivanskie:
starting new project. wondering what are people doing these days. watched a talk about how much built-in testing was improved with rails 5.. which raised this question. Do I go with rspec, or the built in minitest

[18:05:32]
dionysus69:
it just throwns this error https://gist.github.com/anonymous/625a2f9a1f14c1d3f722d194a13bfbec

[18:06:39]
dionysus69:
I could just do create unless find but I am just curious why find_or_create_by doesnt work. I have actually removed ID column and added executed this in migration ALTER TABLE subdivisions ADD PRIMARY KEY (subdivision_id);

[20:42:03]
ivanskie:
i'm trying to create a rails app from scratch with testing. i'm failing miserably. (rails 5, devise, rspec, factory girl, faker, capybara). I may have gone ahead of myself a bit. I'm trying to test user signup, login, and all of that. and the test rails generated for users controller is failing to pass.

[20:44:49]
ivanskie:
last time i made an app a few years back, i was using devise test helpers.. so I'm thinking i should be doing that. but i dont remember how without blatenly copying the spec from last app. A buddy from a diff country and I are getting together to pair program, started last night only to not really get anywhere lol.

[20:45:34]
ivanskie:
so im trying to do refresher. scramling to look at rails 4 in action book, or rails tutorial, or screencasts, but not finding just stesp to do it without starting completely from scratch arrrrr

[21:01:48]
kariyaki:
Does anyone know if there exists a conflict between Simplecov and another gem? I'm using Simplecov to generate coverage results, but the results only show in the generated index.html file under the "coverage" folder. I want the coverage results to show directly in RubyMine in the corresponding controllers/models. I'm currently working on an existing project, so still fresh in the Ruby

[21:01:48]
kariyaki:
world. Tried creating a new project and ran the tests with coverage, and got the results directly in RubyMine. Therefore I suspect that Simplecov have a conflict with another gem.

[22:27:15]
diggitydane:
I'm trying to write rspec tests for an API with JWT using cancancan for authorization. When I run a request with 'rspec /spec/requests/alert_responses_spec.rb' all of the tests pass. When I run it will 'rspec' they fail. It appears in the latter that load_and_authorize_resource is called before the parent action runs to authenticate the JWT

[23:32:27]
havenwood:
diggitydane: do the tests maybe fail because of the order they're run in? does it always fail with?: --order rand

[23:35:59]
diggitydane:
havenwood, no order doesn't matter. The main thing that is happening, is when I run with `rspec` load_and_authorize_resource runs first. If I run the test directly, it runs the before_action :authenticate_request! first (which works because I then have a current_user)

[23:39:47]
diggitydane:
the request is calling load_and_authorize. what's weird is the front-end app works correctly, using curl works correctly, and running the test directly works correctly. The only time it doesn't work is running the full test suite. When I do that, the order of those actions on the class changes

[23:44:16]
diggitydane:
if i run them random and directly, still passes. I don't think it's an order problem with the tests