tycoon177

Activity Graph

Page 1 of 5 | Next »

2019-01-21

[13:29:52] tycoon177: has left #RubyOnRails: ()
[13:30:02] tycoon177: has left #ruby: ()

2018-12-18

[16:17:22] tycoon177: is there a built-in way to load just the last association in a has_many in activerecord?
[16:33:34] tycoon177: tubbo: I was hoping to preload it, sorry. It's for a collection of rows
[16:37:48] tycoon177: thanks tubbo! I ended up just doing an `includes` with some conditions in the where clause that pared it down well enough that i'm not worried about performance impacts

2018-12-15

[02:24:00] tycoon177: Ping timeout: 252 seconds
[02:26:35] tycoon177: has joined #RubyOnRails
[02:26:47] tycoon177: has joined #ruby

2018-12-12

[22:29:37] tycoon177: Ping timeout: 250 seconds

2018-12-07

[16:56:02] tycoon177: could someone help me understand why i'm getting a double render error with this? I am simply trying to serialize an array of hashes in my controller and responding with json data, but i'm getting a double render with this code: https://gist.github.com/BenMcH/aa43cbbd73e38deff0266bac0568bbe3
[16:57:17] tycoon177: i figured the block provided to the format.json would stop activecontroller from looking for a template file in my views, but this doesn't seem to be the case.
[17:08:33] tycoon177: disregard...my respond_to block was in a loop and i didn't notice that

2018-11-29

[14:37:18] tycoon177: good morning, i have a legacy table that i just converted to a rails-friendly naming convention and made it into a model, but the created_at and updated_at columns are not being properly updated. i'm not sure what is causing this, however. the db/schema.rb file appears to be correct. those columns are of type `t.datetime`
[14:40:41] tycoon177: oops, disregard. it looks like the updated_at did, in fact, just get updated. my bad

2018-11-20

[14:38:09] tycoon177: does anyone here know how I could "group" 2 table rows in the Prawn pdf gem? Basically, if one of the rows is going to spill over to the next page, I need both of them to do so
[20:24:30] tycoon177: for anyone wondering the answer to my prawn question earlier, i ended up going through and making those rows a subtable. it's not pretty, but it keeps them together on the same page.

2018-11-06

[15:03:27] tycoon177: is there a way to get rack-mini-profiler to work with sql server? i only see postgres and mysql mentioned in the readme, but we use sqlserver and have a route that is misbehaving

2018-11-05

[22:00:06] tycoon177: if i wanted to have a link_to and include all of the params used on the current route, is there a built in way to do this? or am i stuck manually defining all of them? the use case that i have is linking off to a pdf view of the page for printing purposes
[22:00:21] tycoon177: and to generate the pdf, i need all of the same data to be passed to the controller
[22:00:41] tycoon177: fwiw, the params that i need are all GET params
[22:03:25] tycoon177: crankharder: tyvm :)

2018-10-19

[19:40:52] tycoon177: hello, i am currently working on a sinatra app and was wondering what gems people are using to send emails from ruby since actionmailer isn't available without rails
[19:44:49] tycoon177: i did find this gem that seems like it'd be a good fit and isn't abandoned :p https://github.com/mikel/mail
[20:47:30] tycoon177: for anyone wondering, the mail gem that i sent earlier is working poifectly

2018-10-08

[20:33:24] tycoon177: is there a way to get an activerecord #touch to also call after_save callbacks? i'd prefer to avoid having the two separate callbacks in case they were to change in the future
[20:40:56] tycoon177: it doesn't appear like that's possible in the docs...I'll just put some comments around these callbacks in our code to let anyone in the future know that they belong together

2018-10-03

[13:00:47] tycoon177: Arkentias: activestorage requires a model, yes, but that's all that would be needed. i wouldn't roll your own solution with this being readily available
[13:01:05] tycoon177: there's no requirement for other associations on the model or anything like that
[13:03:08] tycoon177: i mean..it needs a db attribute, but it'll be a single column
[13:03:15] tycoon177: you'll probably want has_one_attached https://edgeguides.rubyonrails.org/active_storage_overview.html#has-one-attached
[13:04:10] tycoon177: sorry to run, but i have to head to work. feel free to tag me in a message if you have any questions..i'll be back within an hour
[18:48:53] tycoon177: does #touch call the after_save callbacks in activerecord?
[18:49:06] tycoon177: or will i need a separate after_touch callback declared?

2018-09-18

[19:45:55] tycoon177: are there any good tools out there to reduce ruby's and rails' memory footprints or at least track down problem areas? our application consumes about 300mb/instance which is higher than we'd like.
[19:46:45] tycoon177: it's a very general question, i know, but this is something that won't have a one size fits all answer
[20:26:31] tycoon177: emers3n: you can't redirect to any method other than get afaik
[20:36:05] tycoon177: great to hear that you got it figured out!

2018-09-04

[05:48:51] tycoon177: Ping timeout: 260 seconds
[15:12:11] tycoon177: has joined #RubyOnRails
[15:51:00] tycoon177: does memory usage scale 1:1 with the number of puma workers?

2018-09-02

[13:58:36] tycoon177: gavit: passenger and nginx or Apache is good (I prefer nginx) but we use puma in prod now and just proxy requests from nginx. I'd suggest sticking with passenger. We made this switch for ease of docker in production
[14:26:11] tycoon177: gavit: it seems to perform better and have better defaults imo
[14:27:23] tycoon177: It's not a make or break decision and can be changed later
[14:27:36] tycoon177: So if you're comfortable with Apache just stick with it :)

2018-08-30

[20:53:40] tycoon177: beingjohnm: you could have the forms submit to a nested route under the account, but i wouldn't worry too much about that as long as you run verifications that the user should be able to make those changes
[20:59:22] tycoon177: automated checking tools are handy to use but shouldn't be blindly trusted

2018-08-29

[02:42:50] tycoon177: *.net *.split
[12:58:02] tycoon177: has joined #RubyOnRails
[13:23:55] tycoon177: has joined #ruby

2018-08-21

[20:11:01] tycoon177: are there any options to write on pdfs with prawn? i see that they removed templates due to pdf corruptions

2018-08-15

[20:35:47] tycoon177: tdelam: turbolinks is safe to remove, yes. it's just a helpful gem that does more seamless navigation within your application. with that comes the downside of having to write all javascript with turbolinks in mind
[20:36:34] tycoon177: because it can and will execute the same script multiple times in a browsing session, which, if you're not careful, can just keep attaching event handlers, for example

2018-08-13

[19:18:55] tycoon177: Disconnected by services
[19:19:46] tycoon177: has joined #RubyOnRails
[19:30:58] tycoon177: can i specify a controller for a `member` block in routes.rb? i have a collection of non-restful routes that go together but shouldn't be methods on the parent controller

2018-08-10

[15:17:04] tycoon177: i'm being very hopeful, but is there any way to graphically build pdfs with prawn?
[15:17:27] tycoon177: i have some reports that i'm needing to rewrite and put values in very specific places on top of an image
[15:17:54] tycoon177: if not, i'll have to print it out and draw a grid on it to get at least rough ideas for pdf units :p
[16:27:08] tycoon177: felix_vs: check out rvm. if you install ruby, you can then install rails with the built in `gem` command (or from a Gemfile)
[16:27:10] tycoon177: with bundler
[16:30:37] tycoon177: rvm has you covered there :)
[16:31:06] tycoon177: felix_vs: https://rvm.io/rvm/install
[16:32:38] tycoon177: felix_vs: you're able to set a default ruby version and then a local version if it differs from your default
[18:10:17] tycoon177: what do you mean virtual environments? that's what gemfiles are for
[18:19:29] tycoon177: a Gemfile is a file that outlines what gems (ruby packages) a project uses. When you generate a new rails application, this is automatically generated.
[18:20:13] tycoon177: Using this file (or a Gemfile.lock, after the initial dependency resolution) bundler (a gem itself) will automatically manage your project's dependencies
[18:20:34] tycoon177: because of this, virtual environments, like python uses, is not necessary
[18:21:03] tycoon177: bundler only loads the gems necessary for a project's execution
[18:26:55] tycoon177: no, i didn't understand your question initially, but i think i do now
[18:27:09] tycoon177: you'd use rvm to switch your ruby version with the `rvm use $version` command
[18:27:22] tycoon177: if you don't include the --default flag, it will only change it for your cwd
[18:30:22] tycoon177: i'm not sure how it's best used with existing applications, but you should be able to do that, yes
[18:46:12] tycoon177: desnudopenguino: ++
[19:04:33] tycoon177: great to hear it :)
[20:29:52] tycoon177: why are you trying to test delayed job in your application lunarfyre7?
[20:30:07] tycoon177: delayed_jobs have their own test suite so that you don't have to :)
[20:30:15] tycoon177: just test the code that is run after the delay
[20:32:56] tycoon177: what's your point?
[20:33:15] tycoon177: you don't have to wait for the delay
[20:33:29] tycoon177: test the underlying methods and assume that delayed jobs works as intended
[20:33:47] tycoon177: that's what their tests are for, to test delayed jobs.
[20:34:29] tycoon177: plus, delayed jobs are run in a separate process to rails, so that'd make it INSANELY hard to test
[21:09:25] tycoon177: Vashy: you'd store any related information in the model that it's attached to.
[21:12:18] tycoon177: i'm not familiar with how active_storage works atm, i assumed that it just stored a path in the model, but that doesn't appear to be the case
[21:12:55] tycoon177: Vashy: i'll see if i can find anything as well
[21:15:03] tycoon177: that sounds like the best solution, honestly
[21:15:21] tycoon177: parent model > image model > active storage
[21:16:00] tycoon177: has_many_attached seems like it'd cause nothing but headaches if you wanted to store metadata in the db
[21:36:28] tycoon177: http://railscasts.com/episodes/196-nested-model-form-revised
[21:36:28] tycoon177: Vashy: this video (although quite old at this point) will help with nested form creation

2018-08-02

[21:30:02] tycoon177: what templating engines out there are worth looking into? erb is really starting to grind my gears. i'm going to be looking into haml. it's the one i see most often, next to erb. Are there any others worth looking into?
[22:17:57] tycoon177: I'll check it out, thanks

2018-07-26

[15:50:16] tycoon177: is there a way that i can convert a symbol to a string without the colon being included in the string?
[15:52:36] tycoon177: Celmor: you could look into Pandoc bindings. i'm sure that pandoc could handle markdown to pdf
[16:02:27] tycoon177: disregard my question re: symbols. it seems like that's not the standard behavior if i just run irb, so i think this is a rails specific thing (or project specific)
[16:04:19] tycoon177: and now that issue seems to have disappeared. strange
[16:05:59] tycoon177: syndikate: are you asking whether `/resource` is different from `/resources`?
[16:08:49] tycoon177: i'm fairly sure that `resources :probations` would be required here. AFAIK, `resources` is always expecting a plural name
[16:09:19] tycoon177: you could, then limit the routes created with :only or :except, like normal
[18:58:25] tycoon177: syndikate: why wouldn't it change the paths? it's a completely different resource :)
[20:50:21] tycoon177: is there a way to create a has_many association on multiple foreign keys? right now, i have a method named after the association that just calls to the other model directly, but this stops me from using the association in `includes` or `joins` and has been causing n+1 queries out that wazoo
[21:17:17] tycoon177: desnudopenguino: no, sorry, i didn't explain it well. The two tables should be connected via 3 of their columns. the rows only match if all 3 values match. it's a strange, strange setup, i know, but it was well in place before i got here :p
[21:17:49] tycoon177: desnudopenguino: i think i'll end up just joining on a different table and then use #select or #keep_if on the ruby end of things
[21:18:04] tycoon177: #select would be best in this instance
[21:24:59] tycoon177: mlt-: when you say raw sql, how do you manage this in rails? can you set the join syntax when setting a has_many or a belongs_to? i'd be happy to do that, but i don't think i'll use that gem
[21:26:19] tycoon177: how would i be able to do this join (or includes) with raw sql if wanted to use the model in rails too?
[21:26:44] tycoon177: the gem? we use sql server, which the gem only partially supports :p
[21:26:51] tycoon177: so it's kind of a non-starter
[21:27:27] tycoon177: it's fine, i'll just join on another table that's already in the query and then filter my results with #select
[21:29:22] tycoon177: thanks for taking another look! i was hoping that i was overlooking something in the docs, but this is a very odd thing to have to do, i'll admit
[21:29:35] tycoon177: it's a result of a non-normalized database, actually
[21:29:56] tycoon177: i can very easily think of a better schema that would've fixed this, but technical debt is preventing such a migration
[21:30:14] tycoon177: in our case, that's the reason

2018-07-20

[00:07:04] tycoon177: *.net *.split
[00:15:24] tycoon177: has joined #RubyOnRails
[00:15:34] tycoon177: has joined #ruby

2018-07-19

[05:30:30] tycoon177: Ping timeout: 276 seconds
[14:23:48] tycoon177: konsolebox: N is used to indicate a number, which could be variable, i'm pretty sure.
[14:25:13] tycoon177: this seems like a fun little exercise. i'll give it a go
[14:25:48] tycoon177: my guess is they're wanting a function that would take n and the hash as args
[19:06:17] tycoon177: has joined #RubyOnRails

2018-07-18

[05:16:30] tycoon177: *.net *.split
[05:35:19] tycoon177: has joined #RubyOnRails
[05:35:19] tycoon177: has joined #ruby
[20:49:37] tycoon177: does any tool exist to build prawn pdf reports graphically?
[20:50:07] tycoon177: i haven't found one, but it'd be nice to be able to drag instead of working in inches and such
[22:19:34] tycoon177: That's not a bad idea Inside. I'll give that a shot next time I build a report.

2018-07-09

[18:32:15] tycoon177: dcopie: to make sure i understand, you want 100% of the subdomain traffic to go to a single route?
[18:34:32] tycoon177: this sounds like something that a middleware would be best for, tbqh
[18:34:37] tycoon177: you could hack it in through routing
[19:41:23] tycoon177: i am trying to contribute to an open source gem but am having troubles figuring out how to get an actual stack trace from minitest. The gem interfaces with activerecord and simply reports that there was an error and gives me the location of the original test in activerecord's test suite, but it doesn't give me any more code locations to check (like where the actual exception happened, for example)
[19:41:38] tycoon177: is there any way to have minitest output a full stack trace when there's an error that occurs?
[19:41:42] tycoon177: not a failure, but an error
[19:43:20] tycoon177: cagomez: https://stackoverflow.com/a/1449466
[19:44:13] tycoon177: http://edgeguides.rubyonrails.org/active_record_migrations.html
[19:44:23] tycoon177: i have no idea
[19:44:39] tycoon177: i just googled it and sent you the first links that looked correctly
[19:44:44] tycoon177: looked correct*
[19:45:00] tycoon177: i know the syntax shown works. i'm not sure about doing it on a single line
[20:02:23] tycoon177: hi zenspider o/
[20:06:36] tycoon177: zenspider: here you go! I'm trying to help update a mssql adapter to rails 5.2 and this just isn't giving me the output that i need to track down these bugs :p https://gist.github.com/BenMcH/fb2bd18ccef112fc0320014966d494dc
[20:09:28] tycoon177: sorry it's not the full test suite. there's a lot of them and one of the tests causes the whole suite to hang
[20:36:23] tycoon177: zenspider: i was able to find that setting `BACKTRACE=yes` (anything not null, i think) in my environment, minitest is now outputting full stack traces for me :)
[20:37:03] tycoon177: so my full command is now `BACKTRACE=yes bundle exec rake test`
[20:48:59] tycoon177: no worries! irc is async :p that's all that would be shown for each error unless i set the BACKTRACE env variable
[21:13:40] tycoon177: zenspider: it may seem silly, but that's the desired behavior in this case (seeing exceptions as they're thrown) because my test suite never finishes due to a weird test that uses 2 nested forks in the activerecord codebase
[21:23:23] tycoon177: zenspider: nah, i've identified the test, but not why it's failing on rails 5.2. right now, i'm just trying to update a gem to help out the maintainer since our company uses his gem in every single project
[21:24:49] tycoon177: ah no worries. thank you though!
[21:36:49] tycoon177: Fuzai: i mean...i guess you could periodically use javascript to check a route that returns the updated_at column
[21:37:06] tycoon177: but there needs to be some way for the server to relay that information to the client
[21:37:17] tycoon177: so your options are limited
[21:49:18] tycoon177: timdotrb: if you find one, let me know please! i searched and searched but couldn't find one. i ended up having to piece together how to write a rake middleware

2018-07-03

[14:23:33] tycoon177: Psy-Q: i would suggest having a joining table using a has_many through
[14:28:05] tycoon177: could each contact be a technical contact for more than one account?
[14:28:16] tycoon177: same question but with owner instead of technical contact
[14:28:36] tycoon177: then a has many through will be your best bet

2018-06-26

[18:54:36] tycoon177: where can i effectively learn OO ruby? I have been working with rails for over 2 years now and i have learned a lot (i think) of ruby, but i stumble greatly when it comes to modules vs classes and things like that
[18:55:26] tycoon177: i guess now that i'm thinking about it, specifying OO was redundant

2018-06-25

[19:45:43] tycoon177: i cannot figure this out...i'm trying to define a new route inside a namespace (which i've done many times before) and i keep getting `uninitialized constant Reports::Controller::Controller` where reports is the namespace and controller is my controller name
[19:45:50] tycoon177: does anyone know why this may be happening?
[19:47:26] tycoon177: and my controller is defined as `class Reports::SomeController < ApplicationController`
[19:47:31] tycoon177: so i'm not sure what I'm doing wrong
[19:48:19] tycoon177: aaaaand disregard. I was trying to access the model under the controller's name in the index method

2018-06-20

[03:50:31] tycoon177: Ping timeout: 276 seconds
[06:21:55] tycoon177: has joined #ruby
[06:21:55] tycoon177: has joined #RubyOnRails

2018-06-07

[15:31:10] tycoon177: is it bad practice to have a non db-based model? Like, I have some static data that I'd like a model for because it's used across several models and didn't know if it'd be best to just make a PORO or if there's some other way to do this
[16:33:46] tycoon177: NL3limin4t0r: thanks for the input. I ended up just writing a standard class that doesn't inherit from activerecord::base and ended up just writing a few helper methods to get the right instance. In the end, it creates a maximum of 3 (at this time) objects in memory with 2 attributes each. It just started to get a bit messy with magic numbers flying around due to some legacy code
[19:56:42] tycoon177: Inside: not if you don't have any EU customers afaik
[19:56:54] tycoon177: but you should still probably be compliant just in case
[20:52:34] tycoon177: has anyone here run into issues unzipping a zip file created with rubyzip on a mac? the files are unzipped just fine when using `unzip` from the terminal, but simply double clicking on them to open them with archiveutility fails with "Error 1 - Operation not permitted" (and this is only sometimes)
[20:52:50] tycoon177: I haven't found a common factor with the files themselves, but this has been driving me nuts
[20:53:28] tycoon177: because the fix thusfar has been to have marketing (who uses these zip files) send the files to me where i unzip and rezip the files manually
[20:59:10] tycoon177: elomatreb: I agree, but I feel like there should be a way for this to be corrected :/ oh well, I'll just continue to deal with it I suppose
[21:14:09] tycoon177: elomatreb: i just got a response in ##mac and it turns out the issue *is* with the OS. OSx uses bsdtar under the hood whereas most linux distros use gnutar
[21:22:15] tycoon177: I just switched from using the built in archive utility to using "The Unarchiver" and it fixed the issue

2018-06-01

[03:44:48] tycoon177: *.net *.split
[07:47:37] tycoon177: has joined #ruby
[07:47:38] tycoon177: has joined #RubyOnRails

2018-05-29

[02:47:16] tycoon177: *.net *.split
[02:47:49] tycoon177: has joined #RubyOnRails
[02:48:11] tycoon177: has joined #ruby

2018-05-15

[13:33:16] tycoon177: Is there a way to have rspec use the middleware in a controller spec?
[13:35:02] tycoon177: My use case is this: All requests when a user is not signed in are automatically redirected back to a login form. We just recently pulled this code out into a reusable gem and transformed it into a Rack middleware vs doing this in a before_action. Now, all of my tests are passing except for the tests that redirect a user back to login. The middleware is mounted, but it's not ever called when doing controller specs
[13:36:50] tycoon177: alright, thanks
[13:37:13] tycoon177: I'll have to figure out how to make these controller specs into request specs or something like that
[13:37:35] tycoon177: Some of our apps would be able to use system specs, but others are stuck on rails 3 (but we're working on that too)
[13:38:50] tycoon177: we haven't used any request specs in this app, so i'm not super familiar. It'd just be spec/requests instead of spec/controllers, right?
[13:53:54] tycoon177: tbuehlmann: thanks again! My specs are working when changing it to a request spec :)

2018-05-14

[18:59:54] tycoon177: If I wanted to find information about including some javascript in a gem to be available to the asset pipeline, where should I look for that information? I figured out how to write a rack middleware in a gem last week, but I would like to add some javascript that interfaces with it to my app automatically.
[19:08:54] tycoon177: nzst: thanks :) i was actually looking at the jquery-rails gem because the asset pipeline page on edgeguides.rubyonrails.com said that it was a good example
[19:22:57] tycoon177: nzst: thanks again! My middleware is including my javascript as intended now :)
[19:46:10] tycoon177: nzst: no i didn't :( I had to read a few gems' source code to figure it out myself. Once I get a better grasp on it, i'm considering writing a blog post about it. it was pretty painful finding out how to write custom rack middleware, tbqh
[19:48:01] tycoon177: nzst: that being said, I know rack middleware outside of a gem, in a folder like app/middleware is all of the benefit, none of the headache of bundling it with a gem. The hardest part about the gem was having it auto mount the middleware when the gem was included in the gemfile
[19:55:37] tycoon177: nzst: this is the only thing I was able to find that explained it enough https://stackoverflow.com/a/5730274
[19:56:59] tycoon177: nzst: and to top it off, I found this pattern in other middleware gems
[20:08:30] tycoon177: nzst: What are you having issues with in regards to that gem?
[20:15:50] tycoon177: nzst: you probably don't want a rack middleware for your task
[20:17:00] tycoon177: what is the task at hand?
[20:18:05] tycoon177: Why are you needing these routes to change?
[20:18:14] tycoon177: I think I'm missing some of the puzzle
[20:18:42] tycoon177: a middleware change will still require a deployment
[20:21:22] tycoon177: nzst: you technically *could* use a middleware for this, but there's nothing stopping you from using a catchall route and a table in your db for redirect mapping
[20:21:44] tycoon177: nzst: i did something similar in another app at work. Let me find some code for you to reference
[20:24:59] tycoon177: nzst: https://gist.github.com/BenMcH/44c78c2270f88d5ce00cf134b42b77a6 Here's the general idea behind my idea. You *could* do this right in your rails routes once and then manage the redirects at the db level. If you truly don't want to handle this in rails, you *can* write a middleware and it'd respond slightly faster, but then you have to deal with supporting that middleware
[20:25:20] tycoon177: note: this code may not be great or even good
[20:27:33] tycoon177: nzst: we use 2 of those in a single application to manage both a cms style of content filled pages and to handle category names or ids in the url. It works well for our uses, but we're pretty low traffic, so ymmv
[20:28:17] tycoon177: you might want to change `/:id` to `/:slug` in your case. Then you would be able to access it in the controller or view via `params[:slug]`
[20:36:43] tycoon177: hahuang65: if everything is the same, i believe rails just does a begin and commit transaction
[21:39:10] tycoon177: Add an index to the database
[21:39:47] tycoon177: if i'm understanding correctly, you'll want an index on your users.office_id column
[22:22:49] tycoon177: fox_mulder_cp: good to know! Thanks :) I usually forget that I can do an association like that in a migration

2018-05-09

[19:03:52] tycoon177: Is there a way to access the rails cookies from rack middleware? I want to rewrite a before_action callback in my application controller to a rack middleware.
[20:03:15] tycoon177: I found the answer to my question. In case anyone is wondering, you can recreate a request object in rack by calling `request = Rack::Request.new(env)` in the call method of the rack middleware. After this, you can access your session variables by calling `request.session[:session_var]`
[20:03:40] tycoon177: It's not 100% the same as the rails request object, i don't think, but it's close enough to get and set session variables :)

2018-05-08

[13:04:08] tycoon177: it feels so good to have rewritten a report that was ugly code and made it beautiful
[13:05:16] tycoon177: s/beautiful/not as ugly/

2018-05-07

[16:03:31] tycoon177: I am having issues with rubyzip in my rails application. Sometimes, the zip files that are generated cannot be opened on osx, with an error of operation not permitted. I found this relevant issue on github https://github.com/rubyzip/rubyzip/issues/249. I was wondering if anyone else has run into this issue or if there is another library that I can use to zip these files in rails
[16:04:01] tycoon177: the files that I am zipping, in case it matters, are all photos. There are generally 15-25 of them
[18:21:53] tycoon177: I am having issues with rubyzip in my rails application. Sometimes, the zip files that are generated cannot be opened on osx, with an error of operation not permitted. I found this relevant issue on github https://github.com/rubyzip/rubyzip/issues/249. I was wondering if anyone else has run into this issue or if there is another library that I can use to zip these files in rails?
[19:02:37] tycoon177: /join #ruby
[19:04:52] tycoon177: does anyone here know of an alternative gem to rubyzip? we've been running into the same issue outlined here https://github.com/rubyzip/rubyzip/issues/249. Basically, *sometimes* the zip files generated by rubyzip can't be opened by the default archive utility on osx. I checked and all of the file names are unique. That was mentioned as a possible cause on that issue thread
[19:08:55] tycoon177: gizmore: i might look into doing that. Thanks! I was just wanting to make sure that I wasn't just missing another gem. I tried searching but didn't find anything
[20:10:25] tycoon177: fwiw, i would also suggest rebuilding on a new rails version. we have a rails 3 application at work that we've been trying to get up to rails 5 for some time now..it's hard to both add features and work on upgrading the underlying rails version at the same time

2018-05-04

[16:47:41] tycoon177: i4: we do the same thing. it's very nice for supporting javascript that only needs to fire on specific pages without changing the asset pipeline too much
[16:54:48] tycoon177: i4: pretty much exactly the same as you described it :)
[16:55:44] tycoon177: I'm looking at some old code I wrote for a report and I'm cringing whilst reading it...I need to rewrite this. It's like I didn't know that .map exists
[16:56:01] tycoon177: i4: were you asking for my help?
[16:57:58] tycoon177: activemodel makes things so much easier

2018-04-27

[13:58:50] tycoon177: It appears that my rails app is saving datetime objects to the database in UTC time. Is there a way that I can correct this and/or fetch them under the correct time?
[14:47:09] tycoon177: sorry, i was pulled away from my desk. What would I do in rails to convert it to the correct time before serving it up? Just date.with_timezone?

2018-04-25

[12:25:58] tycoon177: *.net *.split
[12:27:15] tycoon177: has joined #ruby
[12:27:32] tycoon177: has joined #RubyOnRails
[15:01:28] tycoon177: *.net *.split
[15:03:06] tycoon177: has joined #RubyOnRails
[15:03:21] tycoon177: has joined #ruby

2018-04-24

[16:24:05] tycoon177: I have an application that worked perfectly in dev, but in production, it refuses to remotely submit forms. When I submit this one, it returns the javascript in my browser as a document. I have checked and jquery_ujs is loaded in the application.js after jquery
[16:26:30] tycoon177: The chrome web console says that the content-type is text/javascript, but there is a warning that says "Resource interpreted as Document but transferred with MIME type text/javascript" I don't think an xhr request is ever spawned for this form, but other forms work just fine
[17:27:49] tycoon177: in case anyone was wondering about my issue, i ended up finding out that multipart forms cannot be remote submissions because javascript doesn't have access to your filesystem to grab the file contents

2018-04-20

[14:38:06] tycoon177: has joined #ruby