eyeris

Activity Graph

Page 1 of 1

2018-08-17

[20:05:23] eyeris: has joined #ruby
[20:06:23] eyeris: At some point an ancient version of the tzinfo gem was installed. Now I have .rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/specifications/tzinfo-0.3.52.gemspec, which causes the newest rubygems to complain about the deprecated has_rdoc= method. What command will get rid of this ancient specification? I've tried gem cleanup to no avail.
[20:09:07] eyeris: apeiros: there's no bulk mode? I used tzinfo as an example but I have a _lot_ of other gems in the same situation.
[20:15:44] eyeris: apeiros: thanks for your help.
[20:15:45] eyeris: Quit: leaving

2018-07-05

[17:01:11] eyeris: has joined #RubyOnRails
[17:02:31] eyeris: I'm getting an exception `uninitialized constant Rack::Test::UploadedFile` raising out of this line in rails 4.2 https://github.com/rails/rails/blob/4-2-stable/actionpack/lib/action_controller/metal/strong_parameters.rb#L530
[17:05:06] eyeris: actionpack 4.2.10 declares rack-test as a dependency and rack-test 0.6.3 (I think that's the latest compatible with rails 4.2) requires 'rack/test/uploaded_file' https://github.com/rack-test/rack-test/blob/v0.6.3/lib/rack/test.rb#L8
[17:05:33] eyeris: However, if I run 'bundle exec irb' Rack::Test is defined while Rack::Test::UploadedFile is undefined
[17:06:28] eyeris: This doesn't happen for me with a brand new 4.2 app, it's clearly something wrong with my dependencies. I'm struggling to see a next diagnostic step to narrow down the problem though. Any ideas?
[17:22:34] eyeris: Quit: leaving

2017-09-15

[22:19:35] eyeris: has joined #ruby
[22:20:16] eyeris: Is there any way to make a method yield to a block that yields back to the function, which yields to the block once again?
[22:21:25] eyeris: I'd want that proc to be the remainder of the method though.
[22:21:27] eyeris: def f; puts 1; yield; puts 2; yield; puts 3; end; f{ puts 100; yield; puts 200 }
[22:21:49] eyeris: that doesn't work because the yield from the block fails w/ a LocalJumpError
[22:25:27] eyeris: I suppose that is the closest.
[22:26:00] eyeris: naw, it's not worth the allocation a Fiber brings along w/ it
[22:26:15] eyeris: I'll just find a different way :)
[22:26:27] eyeris: It was more of a curiosity, really.
[22:29:52] eyeris: Quit: leaving

2017-03-31

[17:53:52] eyeris: has joined #RubyOnRails
[17:55:19] eyeris: Is there a way to use rails5 helpers with a path prefix that can be changed per request? There's the long-standing SCRIPT_NAME approach to hosting the app on a path prefix that the app doesn't know about but that's limited to a single prefix. I want the same routes exposed on two different roots.
[17:57:07] eyeris: I could add multiple routes in the app, but I'm hoping to expose it via two different reverse proxies, with more to come. I'd hate to have to add a route for each new reverse proxy I add to the mix.
[18:55:32] eyeris: Quit: leaving

2014-09-18

[05:20:02] eyeris: Is there anything in rspec that let's me both stub a method (to prevent an outside service call) and also test that the method is called?

2014-05-14

[15:20:09] eyeris: If I have two controllers A and B, with B being namespaced in my routes, how can I invoke url_for from a view rendered by controller B to an action in controller A? If I do url_for(:controller => :A) I get a URL prefixed by the B namespace.

2014-05-13

[21:44:13] eyeris: I'm trying to write my first controller tests. When I use url_for it complains that it needs a :host. How do I specify the default :host for my test environment?
[21:44:33] eyeris: config.action_mailer.default_url_options doesn't seem appropriate since it's not a mailer.
[21:44:52] eyeris: yet I can't find any documentation for somethinglike config.action_dispatch.default_url_options
[21:53:43] eyeris: Apparently the appropriate invocation of url_for inside controller tests is @controller.url_for()