Page 1 of 8 | Next »
[05:43:29] Synthead: I want to parse markdown and get links and their attributes to iterate through. I found redcarpet, but it seems to just convert markdown to other languages. Can I use it to simply parse markdown and read its data?
[23:41:05] Synthead: I want to use a different gcc when compiling a gem via Bundler. How can I do this?
[07:58:54] Synthead: I'm trying to start a basic rails app. I did a "rails new", and "rails s" shows what I expected, but when trying to load localhost, I get this:
[07:58:56] Synthead: #<LoadError: Error loading the 'sqlite3' Active Record adapter. Missing a gem it depends on? can't activate sqlite3 (~> 1.3.6), already activated sqlite3-1.4.0. Make sure all dependencies are added to Gemfile.>
[17:53:32] Synthead: is there a lib that'll help convert something like "200M" (a string from user input) to bytes in 200 MiB?
[16:27:33] Synthead: I added BUNDLE_BUILD__BYEBUG='--with-cflags=-Wno-error=attributes' to my environment, and "bundle config" confirms that it's in there. However, when I run "bundle", it still raises an error when compiling byebug: https://gist.github.com/synthead/59d70a500a17f2df751dc5891b44ed63
[16:28:08] Synthead: If I cd to the byebug gem sources, edit Makefile and tack -Wno-error=attributes in there, "make" works
[05:12:29] Synthead: what are your thoughts on foo = lots + of / logic; MyClass.new(foo: foo) vs. MyClass(foo: lots + of / logic) ?
[01:10:37] Synthead: I'm using minitest, and I want to ensure that a method gets called without actually calling the method (kinda like expect(instance).to receive(:method) in rspec)
[21:44:32] Synthead: I'm trying to send raw XML via Faraday, and the server is giving 500s where cURL'ing the same data works fine
[21:45:00] Synthead: is there some way that I have to configure Faraday to make this work? perhaps it's trying to encode the data somehow?
[00:25:34] Synthead: when I do a Set.new.tap and do a little loop to add things to it, the Set comes back empty
[00:25:51] Synthead: if I stick a binding.pry in the block, I can see that the Set is being populated, though
[09:43:27] Synthead: whenever I try to use this data for something, my test immediately raises the 409 exception
[09:44:09] Synthead: I can think of hacky rescue ways to assign that exception to a variable, but is there a better way I can do this?
[02:32:03] Synthead: is there a way to check if n is an index of an array without doing something like n >= 0 && n < a.count ?
[01:32:09] Synthead: is there a good way I can break up #( ... ) literals into multiple lines without including the newlines?
[01:32:49] Synthead: if I terminate the end of the first line with \, it works, but it also includes all the whitespaces before the text in the second line
[01:34:21] Synthead: I'd prefer to use string literals because I'm using a lot of "s with interpolated strings
[01:35:02] Synthead: this is what I'm after, basically https://gist.github.com/anonymous/205bc5d76bc9ec7b72b6519dcf292d2b
[20:07:30] Synthead: what the correct semantic naming for a m2m table? say I have the tables "issues" and "comments". would it be "comments_issues"? Then would the model be CommentsIssue?
[20:09:14] Synthead: right, but I'm looking to make a m2m model that stores attributes about the relationship
[19:40:35] Synthead: I'm building a docker image with passenger in it, and I'm putting passenger-install-nginx-module in the Dockerfile. I want to keep the image size small, so it'd be great to delete the downloaded files, the sources it compiled from, etc. Is there a supported way to do this, or should I just rm -r some of the directories in /usr/lib/ruby/gems/2.3.0/gems/passenger-5.0.29?
[22:03:00] Synthead: is there a way I can have rails read from config/ as well as an additional arbitrary directory?
[22:08:47] Synthead: I am building a docker container for a rails project, and it would be really nice to put conf files with passwords, etc. in a volume
[22:09:12] Synthead: there are some tracked files in config/ (like most projects), and some that aren't (with .example files provided)
[22:09:55] Synthead: I would like to leave config/ alone and have rails additionally read from another configuration directory on a docker volume for untracked, persistent storage
[22:21:44] Synthead: jhass: is there a rails-like way to do that I'm trying to do (add a config dir) that would work natively with database.yml?
[20:15:44] Synthead: is there a way to check if there's a "not null" constraint in a model reflection?
[20:24:52] Synthead: fox_mulder_cp: something like ThatModel.reflections[that_reflection].not_null? (but working)
[20:29:02] Synthead: fox_mulder_cp: I'm not looking if one reflection on a model is nil, but if the reflection itself supports nil values
[23:28:53] Synthead: can I have an app/models/concerns/foo.rb and app/controllers/concners/foo.rb, or would one override another?
[21:19:22] Synthead: in routes.rb, I have "resources :resources", and in resources_controller.rb, I have "def show; ...; end". I can pass, i.e., /resources/5 and hit the "show" route with params[:id] == 5. Is there a way I can get this url the other way around? Meaning, can I dynamically generate a URL of /resources/5 from a model class and ID?
[18:35:30] Synthead: I need to write a string to a file, but I could do that with StringIO.new(string)
[18:48:12] Synthead: adam12: the scp bit piggybacked with the ssh connection worked with StringIO :)
[18:49:01] Synthead: some guy made net-ssh-simple, but I looked at it and the syntax wasn't as nice as I wanted
[19:00:21] Synthead: ruby-lang367: also, the company list is paginated, so you'll want to account for that
[19:00:54] Synthead: ruby-lang367: in chrome/chromium, open the console, go to the network tab, refresh the page, then scroll the results to see what I mean
[19:02:25] Synthead: also, I didn't look at the ajax data, but you might be able to just JSON.parse the payload from that instead of using nokogiri
[19:06:14] Synthead: nerium: as in, is the code always going to be (i.e.) "x.y.z", or are you going to be taking user input for this or something?
[19:07:25] Synthead: nerium: are you going to be using this query-esque language just for your own code, or is it going to be seen in the final product?
[19:08:59] Synthead: nerium: the reason why I'm asking these questions is because it sounds like a bit of code smell over here
[19:09:22] Synthead: it's custom, so others will not know how to look it up, use it, it would have to be maintained, there might be weird bugs, etc
[19:09:48] Synthead: and on the turn of things, it'll likely be slower than standard ruby, and provide limitations (what if the key must have a "." in it?)
[19:10:18] Synthead: I think you're better off using an Array of keys, then using a recursive function with .fetch to dig into the object a bit