jlebrech

Activity Graph

Page 1 of 7 | Next »

2019-09-16

[10:15:17] jlebrech: has joined #RubyOnRails
[10:15:56] jlebrech: had to upgrade to rails 5.2.3 as Content-Security-Policy kept growing till the server crashed
[10:59:51] jlebrech: Remote host closed the connection

2019-08-20

[11:39:10] jlebrech: has joined #RubyOnRails
[11:41:06] jlebrech: my keeps getting gateway error and passenger is stopped, was given a shutdown signal. in 6.0.2, didn't have that issue with the previous version. has anyone had a similar issue?
[11:42:05] jlebrech: my app* aka, apache-passenger rails application
[16:00:21] jlebrech: Remote host closed the connection

2019-06-14

[09:07:59] jlebrech: has joined #ruby
[11:48:56] jlebrech: Remote host closed the connection

2019-04-10

[11:33:26] jlebrech: has joined #ruby
[11:41:32] jlebrech: missing_method doesn't work with superclasses?
[11:42:46] jlebrech: that way round yes
[11:43:08] jlebrech: if I call, super on a child class and it's missing it won't scoop it up
[11:44:13] jlebrech: just something funky i wanted to try out.
[11:57:06] jlebrech: phaul: thanks :)
[13:26:20] jlebrech: anything better than rails? looking to simplify the: routes -> controller -> model thing. maybe a flat structure to have an api but also run webpacker.
[13:26:31] jlebrech: can grape be used as an engine?
[16:00:48] jlebrech: Remote host closed the connection

2019-03-28

[15:57:45] jlebrech: has joined #RubyOnRails
[15:59:42] jlebrech: anyone use docker with rails does this compose file look right? https://0bin.net/paste/CB2Kx3DiKRnddYqF#gXymhP84IbCsnhdElbjWH-FJ6GOSwpJX9MVmJ8TU61D

2019-02-08

[14:56:36] jlebrech: has joined #RubyOnRails
[14:56:46] jlebrech: gon gem is great
[16:07:36] jlebrech: has joined #ruby
[16:08:21] jlebrech: hi everyone, i want to split my controllers into page controllers and api controllers. should I use engines for that or just modules?
[16:23:12] jlebrech: Remote host closed the connection

2019-02-07

[14:37:45] jlebrech: has joined #RubyOnRails
[14:39:02] jlebrech: i find my routes.rb to be over complex, is there a nicer way to do it? sick of POST, GET, only: everywhere. 247 lines of code
[14:50:25] jlebrech: Remote host closed the connection

2019-01-28

[10:29:36] jlebrech: has joined #RubyOnRails
[11:32:28] jlebrech: Remote host closed the connection

2019-01-11

[09:16:31] jlebrech: has joined #RubyOnRails
[09:18:15] jlebrech: is there a nicer way to do this? <div v-for="c in <%= @contexts.to_json %>"> this is cool https://github.com/gazay/gon but another gem for this is overkill.
[09:40:25] jlebrech: Remote host closed the connection
[09:40:47] jlebrech: has joined #RubyOnRails
[10:12:03] jlebrech: Remote host closed the connection

2019-01-07

[11:53:38] jlebrech: has joined #ruby
[12:11:16] jlebrech: i want to pack a string into a hexadecimal value, but pack is a method of array and not string
[12:12:29] jlebrech: basically need the reverse of unpack https://ruby-doc.org/core-2.3.0/String.html#method-i-unpack
[12:12:53] jlebrech: or maybe i need to use base62 but i shouldn't need a gem for that
[12:14:29] jlebrech: doesn't seem like the right thing
[12:14:55] jlebrech: only converts string into arrays, should probably use encode and decode instead
[12:16:18] jlebrech: al2o3-cr: i was trying this solution https://stackoverflow.com/questions/17623668/what-does-string-packh-mean
[13:43:20] jlebrech: i have a strange issue where i get a template error but it's rendering correctly
[13:48:31] jlebrech: ActionView::Template::Error (undefined method `[]' for nil:NilClass)
[13:48:40] jlebrech: <h1>Project: <%= @context[:context] %></h1>
[13:48:49] jlebrech: but it renders correctly
[13:57:18] jlebrech: has joined #RubyOnRails
[13:58:11] jlebrech: i'm getting a template error: (undefined method `[]' for nil:NilClass) but the value is still being rendered correctly.
[13:58:38] jlebrech: something prerendering?
[14:32:43] jlebrech: Remote host closed the connection

2018-11-29

[11:22:20] jlebrech: has joined #RubyOnRails
[11:24:50] jlebrech: I have a bunch of stubs that i just want to return an empty array, is there a gem to do something like returns_empty('Docker.get_tags', 'Twitter.get_tweets') in rspec
[11:26:25] jlebrech: or should i not stub those and set vcr record: :episodes instead?
[11:39:21] jlebrech: has joined #ruby
[11:40:20] jlebrech: hi, i have a bunch of stubs that just return a [] can i specify those as a one liner somehow?
[11:47:14] jlebrech: ooh, yeah make's sense. might put that in spec helper
[11:48:49] jlebrech: phaul: will call it any_instance_empty :)
[12:37:45] jlebrech: phaul: works nicely :)
[14:33:55] jlebrech: Remote host closed the connection

2018-11-15

[09:07:24] jlebrech: has joined #ruby
[09:07:32] jlebrech: has joined #RubyOnRails
[09:08:27] jlebrech: is it possible to do an after_action for POST/PATCH/DELETE actions?
[09:08:47] jlebrech: i could check the controller action within that i guess
[09:45:33] jlebrech: Remote host closed the connection
[14:29:43] jlebrech: has joined #ruby
[14:29:52] jlebrech: how do you permanently change indentation on vs code for ruby to 2 spaces?
[15:32:24] jlebrech: Remote host closed the connection
[15:48:15] jlebrech: has joined #ruby
[15:48:22] jlebrech: Inside: thanks :)
[17:09:56] jlebrech: Remote host closed the connection

2018-11-05

[10:19:22] jlebrech: has joined #ruby
[10:19:42] jlebrech: Iambchop: hi, thanks for the help on friday
[10:21:38] jlebrech: i have api calls that take 18 seconds, i'm thinking of implementing some kind of double buffering cache invalidation, where i retrieve the cache but immediately refresh that cache for next time.
[10:52:51] jlebrech: Remote host closed the connection
[14:13:48] jlebrech: has joined #ruby
[14:14:21] jlebrech: anyone know how to keep the same session throughout capybara tests?
[17:01:09] jlebrech: Remote host closed the connection

2018-11-02

[13:54:17] jlebrech: has joined #ruby
[13:54:40] jlebrech: i'm trying to run capybara with js support and am getting this
[13:54:41] jlebrech: undefined method `<<' for {:read_timeout=>2, :continue_timeout=>nil, :debug_output=>nil}:Hash
[14:00:56] jlebrech: Iambchop: https://pastebin.com/0fqFF3zK
[14:04:01] jlebrech: Iambchop: i'm trying to run my first capybara test, it's not my code i'm sure. i've seen this issue with webmock but i've not got mocking set up.
[14:04:18] jlebrech: how would i find out which gem is causing the issue?
[14:05:16] jlebrech: my test runs without js, but as soon as I put js: true i get that error for the same test
[14:16:13] jlebrech: I might be on to something, different error when i commented out fakeweb
[14:24:51] jlebrech: Iambchop: now chromedriver is running on 9515 but getting unable to connect to chromedriver 127.0.0.1:9516
[14:25:07] jlebrech: how to specify the port?
[14:36:43] jlebrech: just selenium-webdriver
[14:36:50] jlebrech: or at least trying to use it
[14:37:52] jlebrech: Iambchop: thanks
[14:38:34] jlebrech: it opened chrome hehe
[14:39:23] jlebrech: it's opening chrome now, is that doing to be a problem for circle ci?
[14:42:12] jlebrech: Iambchop: thanks a lot i've been banging my head for weeks, as i've been told to write test only on fridays
[15:33:40] jlebrech: mhh now i could use VCR with capybara as i'm writing integration tests on fridays :)
[15:33:53] jlebrech: re_record after 7 days :)
[17:08:26] jlebrech: Remote host closed the connection

2018-10-30

[09:11:40] jlebrech: has joined #RubyOnRails
[09:11:46] jlebrech: havenwood: hi
[10:34:39] jlebrech: Remote host closed the connection
[14:13:26] jlebrech: has joined #RubyOnRails
[14:13:29] jlebrech: https://i.imgflip.com/2lb290.jpg
[17:02:58] jlebrech: Remote host closed the connection

2018-10-29

[16:39:24] jlebrech: has joined #RubyOnRails
[16:39:55] jlebrech: is there a way to store error numbers in i18n?
[16:51:13] jlebrech: is it possible to store a number in there too aswell as a key?
[16:51:26] jlebrech: yeah for error number to words translation
[16:53:44] jlebrech: yeah i just need to map a number to an i18n key
[16:53:51] jlebrech: i'm doing this with my own code atm
[16:54:21] jlebrech: mapping a 3rd error code into english
[16:56:27] jlebrech: elsewhere in my code i map them like this:
[16:56:34] jlebrech: ERROR_CODES = []
[16:56:52] jlebrech: then ERRORS_CODE[62] = "CODE_62"
[16:57:05] jlebrech: it's just ugly and it's in different places
[17:16:35] jlebrech: Remote host closed the connection

2018-10-23

[13:41:51] jlebrech: has joined #RubyOnRails
[13:44:37] jlebrech: i have an angularjs/rails app which when I redirect_to puts in the /#!/ anchor tag when I redirect. how do that clear that out. tried login_path(anchor: 'logged_out') but nil and blank redirect using the original anchors.
[15:09:27] jlebrech: rake routes
[15:11:35] jlebrech: resources :business do; resources :customers do; post :new, on: member; end; end
[15:11:52] jlebrech: something like that with newlines instead of ;
[15:19:54] jlebrech: i think you have to post to business_customers_path
[15:20:08] jlebrech: not new_business_customer_path
[15:20:26] jlebrech: new_business_customer_path is for the blank form
[15:37:49] jlebrech: i have a question about redirect_to how do i stop redirecting copying the url#anchor to the next location?
[15:53:42] jlebrech: anchor nil or '', doesn't work. but a string works and it's my current solution
[16:02:41] jlebrech: Remote host closed the connection

2018-08-31

[11:46:43] jlebrech: has joined #RubyOnRails
[11:47:23] jlebrech: I can't find a way to make integration tests to test angularjs code on ruby. what do you use? teaspoon?
[12:08:03] jlebrech: Remote host closed the connection

2018-08-22

[08:33:14] jlebrech: has joined #ruby
[08:33:54] jlebrech: can you use vcr outside of tests? i'd like to record as i'm manual testing and replay my clicks in tests later
[08:45:44] jlebrech: Remote host closed the connection

2018-08-14

[10:00:32] jlebrech: has joined #RubyOnRails
[10:01:39] jlebrech: is there a proxy I can use for Rails env text? for this https://github.com/excon/excon#proxy-support
[10:16:33] jlebrech: rake or rake test i think
[12:23:32] jlebrech: what does yout webpacker file look like?
[15:22:51] jlebrech: Ping timeout: 240 seconds

2018-08-03

[14:27:09] jlebrech: has joined #RubyOnRails
[14:28:32] jlebrech: I need a middleware to share the user session between rails, devise and actioncable. I have a user model but models can't access session, but can access warden, is that right?
[16:11:48] jlebrech: Remote host closed the connection

2018-07-24

[11:32:59] jlebrech: has joined #RubyOnRails
[11:33:41] jlebrech: i want to access something i create in my initializer from anywhere in the app, do I put it in a singleton?
[16:10:00] jlebrech: Remote host closed the connection

2018-07-19

[11:02:37] jlebrech: has joined #RubyOnRails
[11:03:17] jlebrech: my websocket isn't upgrading for actioncable on my server. it works on dev tho
[11:05:51] jlebrech: i'm testing older code right now to see if it worked back then
[14:31:40] jlebrech: actioncable still works without mount ActionCable.server => '/cable'
[16:17:23] jlebrech: Remote host closed the connection

2018-06-28

[10:21:43] jlebrech: has joined #RubyOnRails
[10:22:16] jlebrech: is there a shorthand to deploy the currently checked-out branch on capistrano?
[17:00:16] jlebrech: Remote host closed the connection

2018-06-20

[09:40:01] jlebrech: has joined #RubyOnRails
[16:17:16] jlebrech: Remote host closed the connection

2018-06-19

[11:40:26] jlebrech: has joined #RubyOnRails
[11:42:00] jlebrech: when I precompile, asset_tags don't point to the right place in public/ can I tell it to look for stylesheets in public/assets instead of public/stylesheets?
[12:06:50] jlebrech: anyone know much about sprockets?
[16:17:01] jlebrech: Remote host closed the connection

2018-06-18

[10:16:41] jlebrech: has joined #RubyOnRails
[10:17:48] jlebrech: can someone help me with ActionCable? my connection is verified by use session, how do I send a message just to that user? is something like ActionCable.server.broadcast "message", 'hello' enough?
[11:59:09] jlebrech: 404 error when? during the deploy?
[12:34:11] jlebrech: yottanami: do your routes work?
[12:46:12] jlebrech: yottanami: are you accessing the api from the same domain?
[13:01:40] jlebrech: you need cors set up.
[13:04:44] jlebrech: cross origin resource scripting
[16:18:36] jlebrech: Remote host closed the connection

2018-06-15

[09:41:42] jlebrech: has joined #RubyOnRails
[09:42:37] jlebrech: how can I wait for ActiveJob to complete for a while from my controller?
[09:44:30] jlebrech: this? https://github.com/cdale77/active_job_status
[09:45:36] jlebrech: i have a api call that can take up to 3 minutes, I want to stall the ui till it's complete, but still want to run it with activejob
[09:46:01] jlebrech: i don't have to put it in a job tho
[09:46:11] jlebrech: go point :)
[09:46:15] jlebrech: good point*
[09:46:55] jlebrech: it's pointless if i'm blocking :P silly idea
[09:49:19] jlebrech: so, how is jostatus polling done usually? this looks good https://github.com/cdale77/active_job_status
[09:49:44] jlebrech: but anyway, that part of the UI gets blocked anyway
[09:51:15] jlebrech: mhh, it's all 3rd party api calls. I don't have many models to update. but maybe I should
[09:52:29] jlebrech: i'll have to use that gem tho no?
[09:53:00] jlebrech: so how do you query an activejob status?
[12:48:35] jlebrech: Ping timeout: 245 seconds

2018-06-11

[08:20:40] jlebrech: has joined #RubyOnRails
[08:23:43] jlebrech: should i use sessions with actioncable?
[15:08:08] jlebrech: why is stylesheet_link_tag complaining about jquery?
[15:15:30] jlebrech: i comment that line out and the page loads without styles, but why would stylesheet_link_tag even need jquery?
[15:20:25] jlebrech: it needed jquery-rails to process css, very confusing
[15:26:53] jlebrech: gem 'sprockets' needed
[15:27:19] jlebrech: sprocket-rails
[16:19:15] jlebrech: Remote host closed the connection

2018-06-05

[13:07:43] jlebrech: has joined #RubyOnRails
[13:08:26] jlebrech: question about webpacker: i've a webpack config for angularjs 1.x in webpack 3.12. can it run it?
[13:10:00] jlebrech: Dbugger: why not? https://github.com/rails/webpacker
[13:11:28] jlebrech: my webpack config works, but I want to know what webpacker can add, for example i want to leave my webpack config untouched bu have rails do cached busting stuff for me
[13:12:49] jlebrech: instead can I compile my angularjs code from rails and slowly phase it out?
[13:13:16] jlebrech: i prefer verbosity
[13:14:04] jlebrech: yep, it just about works for me right now. i want to split my frontend code base into little chunks and replace with vanilla rails + react sprinkles
[13:16:44] jlebrech: i'd like something that compiles js to have a unix philosophy to it. just do one thing, and you can use make/tup/bazel to glue them together
[13:18:03] jlebrech: rails need a "maglev" dsl that compiles to wasm/js and you don't have to touch js again
[16:08:41] jlebrech: Remote host closed the connection

2018-05-18

[10:51:00] jlebrech: has joined #RubyOnRails
[10:52:13] jlebrech: I have i have angular code which I'd like to symbolically link into the public folder. but I want the rest to the api be under /api route
[10:52:46] jlebrech: do I just have to ln the public folder and change routes.rb?
[16:04:18] jlebrech: Remote host closed the connection

2018-03-22

[16:30:10] jlebrech: has joined #RubyOnRails
[16:32:19] jlebrech: i'm on Rails 5.0.0 and when I do ActionController::Parameters.permit_all_parameters = true I will still complain about an unpermitted parameter but still allow access to it.
[17:05:12] jlebrech: Remote host closed the connection

2018-01-17

[15:57:37] jlebrech: has joined #RubyOnRails
[16:24:18] jlebrech: Remote host closed the connection

2018-01-05

[11:49:42] jlebrech: has joined #RubyOnRails
[12:27:41] jlebrech: Remote host closed the connection

2017-12-19

[13:48:15] jlebrech: has joined #RubyOnRails
[13:48:53] jlebrech: i'm getting Net::ReadTimeout: Net::ReadTimeout for route /admin/config.php using a rails as api
[13:51:26] jlebrech: ActionController::RoutingError: No route matches [GET] "/admin/config.php" annoying script poking my app
[13:57:21] jlebrech: can you block direct access to an app via it's ip rather than using the domain?
[14:11:38] jlebrech: marahin: ok cheers
[17:06:44] jlebrech: Remote host closed the connection

2017-12-11

[13:52:27] jlebrech: has joined #ruby
[13:53:29] jlebrech: hi, i'm running a method for a long time and I'm yielding to keep track of the progress but when i yield at the very end it doesn't seem be picked up
[14:16:32] jlebrech: Burgestrand: nevermind it was returning before yield
[15:11:45] jlebrech: megan1993: try adding .count to the query? is this active record?
[15:13:39] jlebrech: or replace where with "exists?"
[15:17:58] jlebrech: what was the join for?
[16:56:15] jlebrech: Remote host closed the connection

2017-09-13

[11:37:03] jlebrech: has joined #ruby
[11:38:09] jlebrech: anyone try ubuntu subsystem on windows? my colleague is trying to run middleman on windows 10 and i suggested that would be a better course to take than installing ruby directly on windows
[13:03:08] jlebrech: Ping timeout: 255 seconds

2017-05-08

[11:38:18] jlebrech: that's fine, I think i'll have to make an angular-template-controller that puts i18n into the template
[11:38:42] jlebrech: a rails controller to write the angular views
[11:39:19] jlebrech: dminuoso: too right, you can sprinkle a tiny bit of reacts and get immediate results
[11:41:06] jlebrech: it's does the same stuff as advanced jquery
[11:41:36] jlebrech: yeah, i'm using rails to rid myself of routers
[11:41:48] jlebrech: i already know that
[11:48:02] jlebrech: think i might put the angular templates in erb so I can put i18n stuff in there later. I think with session I can also bypass some angularjs code that just places text somewhere. but then i'll get cache busting problems
[12:08:50] jlebrech: i think content_tag is the way to do it.
[12:52:17] jlebrech: has joined #RubyOnRails
[13:27:13] jlebrech: webpack makes very small files :)
[14:06:30] jlebrech: crst_: slim is nice
[16:21:33] jlebrech: Remote host closed the connection