Activity Graph

Page 1 of 2 | Next »


[11:27:21] j0llyr0tten: *.net *.split


[11:07:44] j0llyr0tten: hey, i'm experimenting with Rails+Webpacker+Vuejs and i'm wondering how i view the little sample that ships out of the box
[11:08:11] j0llyr0tten: where do i navigate to to view hello_vue ?


[05:12:29] j0llyr0tten: hey, you know the way there's a <%= yield %> in application.html.erb – would it be possible to have two yields?
[05:13:42] j0llyr0tten: i'm trying to figure out how to create a dual-paned app, each pane having a view onto a different model …
[12:37:23] j0llyr0tten: baweaver: "a page doesn't necessarily _have_ to be 1-to-1 with a model" gotcha, but how would you construct a URL for a page which is doing both model_a#show and model_b#edit ?
[12:39:47] j0llyr0tten: are all the other models sort of like TicketingDashboard? Are they other Dashboards?
[12:40:11] j0llyr0tten: or are they totally other things entirely?
[12:40:51] j0llyr0tten: do you have a Dashboard superclass?
[12:41:56] j0llyr0tten: noob_on_rails: maybe create one and put the shared code there?
[12:42:42] j0llyr0tten: J0llyr0tten: you're welcome, someone had the same question the other day, maybe an example should go in the docs!
[12:44:55] j0llyr0tten: noob_on_rails: obviously Dashboard inherits from ApplicationRecord or whatever it is called and each type of dashboard inherits from Dashboard (not ApplicationRecord) … tell me if it works btw …
[13:19:53] j0llyr0tten: morfin60: no idea, tell us
[13:22:08] j0llyr0tten: noob_on_rails: i think Concerns are more general, cutting down on Module (not Model) boilerplate … great!
[13:22:58] j0llyr0tten: quazimodo: #model_name ?
[13:26:17] j0llyr0tten: quazimodo: i'm not sure? all i know is that a method in the base class returns the correct inherited model name via #model_name . where is #kind_of? defined?


[05:11:20] j0llyr0tten: za1b1tsu: h = {} ; [[1, 2], [7, 8], [9, 10]].each {|a| h[a[0]] = {:z => a[1]}}
[05:12:01] j0llyr0tten: probably a more succinct way but i'm not seeing it off the top of my head


[00:08:54] j0llyr0tten: Radar: where is the code for the database adapters?
[00:09:22] j0llyr0tten: Say if I wanted to create a new back-end.
[00:09:42] j0llyr0tten: Actually a triplestore.
[00:10:14] j0llyr0tten: I'm trying to gauge how insane the idea is.
[00:11:44] j0llyr0tten: My idea is to go through Ruby-RDF and so be able to use any triplestore it can talk to.
[00:17:30] j0llyr0tten: kapil___: you want to share validation between models?
[00:18:09] j0llyr0tten: this is just a guess but you could inherit all models that have a slug column from the same super class
[00:18:31] j0llyr0tten: and put the method in the super class, that might work
[00:28:25] j0llyr0tten: kapil___: what's a slug?
[01:01:23] j0llyr0tten: kapil___: i do not know
[12:08:33] j0llyr0tten: Apparently the master branch now requires CoffeeScript
[12:09:01] j0llyr0tten: This, in my humble opinion, is not the greatest idea in the world
[12:16:44] j0llyr0tten: Making CoffeeScript a hard requirement causes bloat
[12:17:15] j0llyr0tten: Not allowing people to --skip-coffee is not great
[12:17:57] j0llyr0tten: Straw poll ! How many people here use the --skip-coffee command line option when making a new Rails app?
[13:03:22] j0llyr0tten: My bad, --dev option always gives you coffee! This needs documenting but I cannot find where …
[13:13:28] j0llyr0tten: dminuoso: the new command – if you issue --dev and --skip-coffee together, the coffee-related gems don't get included but they are needed because master's client-side code is written in CoffeeScript so the app breaks
[15:03:11] j0llyr0tten: dminuoso: could it be because i then point the Rails source to master in the Gemfile and reissue a `bundle install' ?
[15:05:30] j0llyr0tten: dminuoso: i checked your gist, i'm pretty sure that's what i did (can't remember if i used --force)
[15:06:26] j0llyr0tten: i think the difference, as i say, is that i then point the Gemfile to master on Github rather than to local gems
[15:07:24] j0llyr0tten: and the reason i do that is to track the development branch
[18:40:19] j0llyr0tten: dminuoso: where the code for `rails new' ?


[15:19:22] j0llyr0tten: has joined #RubyOnRails
[15:20:31] j0llyr0tten: hey, i tried removing the coffeescript gem from my Gemfile to disable coffeescript but Rails complains, any ideas
[15:29:50] j0llyr0tten: apeiros: throws an exception `cannot load such file -- coffee_script' from gems/sprockets-3.7.1/lib/sprockets/autoload/coffee_script.rb
[15:30:35] j0llyr0tten: I don't know why sprockets is still trying to autoload coffeescript when i don't even have the gem installed and all javascript files end in .js
[15:32:02] j0llyr0tten: Could it be ActionView and ActionCable ?
[15:39:10] j0llyr0tten: the error occurs in <%= stylesheet_link_tag 'application', media: 'all' %>
[15:39:51] j0llyr0tten: which is weird because it that's for CSS, correct?
[17:27:50] j0llyr0tten: I tried it with a fresh install and I'm still getting an error … Rails version: 5.2.0.beta2 , Ruby version: 2.5.0 (x86_64-linux)


[08:20:02] j0llyr0tten: has left #RubyOnRails: ()


[23:02:44] j0llyr0tten: has joined #RubyOnRails
[23:03:30] j0llyr0tten: hey, non RoR question but i'm at a loss. What the simplest way to connect Rails with a TripleStore?
[23:04:37] j0llyr0tten: Radar: i'll try over in #ruby-rdf first, nvm


[18:22:03] j0llyr0tten: *.net *.split


[06:07:30] j0llyr0tten: Ping timeout: 256 seconds
[06:07:44] j0llyr0tten: has joined #RubyOnRails


[00:02:38] j0llyr0tten: Cohedrin: what does includes do again?
[00:06:28] j0llyr0tten: lacrymology: is there some reason you're using SQL directly?
[00:12:46] j0llyr0tten: lacrymology: i don't know, write it in AR, check what the log output says, then convert to SQL, bit of a lame answer but there you go


[22:54:41] j0llyr0tten: has joined #RubyOnRails
[22:55:16] j0llyr0tten: hello. i am using rails api and i'm wondering why my controllers only have 5 methods rather than 7?
[22:58:31] j0llyr0tten: aaargh, what's the shorthand for talking to just one person??
[23:00:02] j0llyr0tten: matthewd: actually, my bad - 6 instead of 7, missing `new' i think
[23:00:15] j0llyr0tten: matthewd: could have sworn it was 5
[23:00:47] j0llyr0tten: matthewd: sorry! `edit' is missing as well
[23:01:32] j0llyr0tten: matthewd: bronson: grooooooan - so obvious the instant you say it, duh!
[23:02:01] j0llyr0tten: it'd be nice if the rails api docs spelled that out for morons like me
[23:04:38] j0llyr0tten: weird, i can't actually _find_ the rails api docs at the mo', hmm
[23:09:46] j0llyr0tten: do you mean after you've done something that's done a SELECT and made an activerecord association?
[23:19:50] j0llyr0tten: Would anybody like to talk about integrating React+Redux with Rails API?
[23:20:21] j0llyr0tten: haven't hear of it!
[23:20:58] j0llyr0tten: i was thinking it should be pretty simple to autogen javascript ajax calls ... automate some of the wiring, what do you think?
[23:21:42] j0llyr0tten: bronson: hmm, let me think
[23:23:40] j0llyr0tten: bronson: http://guides.rubyonrails.org/active_record_callbacks.html#after-initialize-and-after-find
[23:24:08] j0llyr0tten: bronson: somewhere around there anyway :)
[23:24:56] j0llyr0tten: bronson: sorry, keep meaning to send to baash05: there you go ....
[23:27:35] j0llyr0tten: yay, payed it forward
[23:29:17] j0llyr0tten: bronson: okay, so that seems to be React+Rails, i want React decoupled from Rails and only talking to it via Rails API
[23:30:39] j0llyr0tten: bronson: i don't think so? i'm thinking that my app could have many clients just one of which is a React client
[23:31:57] j0llyr0tten: i think Rails has the M and C part of MVC nailed, the V is up for grabs ... and I'm feeling React is where it's at
[23:32:11] j0llyr0tten: steep learning curve though
[23:33:17] j0llyr0tten: i've been using react-slingshot : https://github.com/coryhouse/react-slingshot
[23:36:02] j0llyr0tten: heh... _3dwardsharp: what i'm thinking is generating React boilerplate from my Rails API, maybe packaging up that ability as a gem?
[23:36:22] j0llyr0tten: ah, the old days were the best
[23:36:32] j0llyr0tten: handcrafting HTML1
[23:37:15] j0llyr0tten: <marquee>awesome HTML1</marquee>
[23:37:58] j0llyr0tten: ellistaa: what's the feed meant to be of?
[23:40:13] j0llyr0tten: Radar: seems simplest? RSS is just HTTP after all, isn't it? just change the media type and use XML builder to gen the XML?
[23:41:25] j0llyr0tten: ellistaa: screen scrape is last resort, there are loads of HN apps, how do they get the HD data feed?
[23:41:49] j0llyr0tten: ellistaa: no NYTimes DB login?
[23:43:09] j0llyr0tten: that's a good idea
[23:43:36] j0llyr0tten: then add one more action on your controller and create the XML object
[23:47:01] j0llyr0tten: okay, so i've another question... hierarchical data, should i think about using something like Mongo or should i wire it up relationally?
[23:48:08] j0llyr0tten: it seems like _every_ project i've ever worked on has had hierarchical data in it somewhere and it's always the most annoying part of the schema
[23:48:40] j0llyr0tten: i've never used Mongo so that's why i'm asking, i figure it's times to look for alternatives
[23:49:24] j0llyr0tten: what would? and how would i connect this other (hierarchical) data store back to Postgres, for instance
[23:50:00] j0llyr0tten: at one point i was even thinking of using the filesytem as a hierarchical data store
[23:50:32] j0llyr0tten: i just don't think hierarchical data and relational DBs are a good fit
[23:50:50] j0llyr0tten: i've thought about this literally for years
[23:51:03] j0llyr0tten: naw, it's always hacky
[23:51:53] j0llyr0tten: isn't Mongo a graph db?
[23:52:20] j0llyr0tten: rhizome: i mean storing hierarchical data in a relational db always feels hacky
[23:54:35] j0llyr0tten: rhizome: think about it, SQL has no support for it, the AR and Ruby side is complex, ...
[23:54:50] j0llyr0tten: i _love_ relational dbs
[23:56:53] j0llyr0tten: SELECT * FROM FOLDER (oh yeah, plus 3 nested levels please)


[00:35:33] j0llyr0tten: Read error: Connection reset by peer


[00:08:50] j0llyr0tten: has joined #RubyOnRails


[21:45:11] j0llyr0tten: has joined #RubyOnRails


[23:32:53] j0llyr0tten: Ping timeout: 246 seconds


[12:47:01] j0llyr0tten: has joined #RubyOnRails
[12:48:27] j0llyr0tten: hello, in Sprockets 3.X there is a method register_engine - I can't find it in Sprockets 4.X - how do we register extensions in Rails Edge?


[21:58:46] j0llyr0tten: There seem so many ways to integrate Rails and Bower, can anyone help me choose the best fit for me?
[23:00:07] j0llyr0tten: I just installed a JS package using bower-rails and the goodies i want are in the package's dist folder ... how do i get this into the rails asset pipeline in development env?


[08:51:21] j0llyr0tten: i keep getting a message to run gem pristine --all
[08:51:50] j0llyr0tten: but the gems it is complaining about are default gems
[08:52:14] j0llyr0tten: they came with the system ruby installed with apt-get
[08:54:01] j0llyr0tten: i've search and searched and racked my brains but cannot figure it out
[08:54:26] j0llyr0tten: obviously it isn't a show-stopper but if anyone has any ideas i'd appreciate it


[09:36:28] j0llyr0tten: i have the most _bizarre_ behaviour in with Devise and I can't for the life of me wrap my head around it
[09:37:09] j0llyr0tten: when i sign in and the browser takes me back to where i was it shows an image from the page, not the page itself
[09:37:45] j0llyr0tten: somehow the image load is in the browser history ... hmm ... oh wait ....
[09:38:55] j0llyr0tten: hmm, it's because i wrap it in a zoomer plug-in and it loads async?


[00:29:40] j0llyr0tten: an Item has man Scans
[00:29:53] j0llyr0tten: how do i group items by number of scans?
[07:53:45] j0llyr0tten: simplest way to transform a hash from (example) {1=>2, 3=>2, 4=>1} to {1=>[4], 2=>[1,3]} ?????
[10:46:17] j0llyr0tten: i'm specifying a width on my images but it's not being respected


[00:06:36] j0llyr0tten: i can't get redirect_to :back go to the correct place in one of my pages
[00:07:06] j0llyr0tten: it's redirecting back to an image on the page rather than the page itself :/


[07:06:18] j0llyr0tten: shorter way of saying this? foo.map{|f| {f.fa_structure => f.sub}


[12:53:21] j0llyr0tten: how do i package a mobile version of a jpeg and display that when someone uses a portrait oriented mobile screen?


[20:31:51] j0llyr0tten: i'm stumped: i added a column: scans_accepted to to table: Member --- but i'm getting an Error undefined method `scans_accepted'
[20:32:33] j0llyr0tten: what's weird is that i can go into the console and do a: member = Member.find 1 ; member.scans_accepted += 1
[20:32:52] j0llyr0tten: just not from the front end, any ideas why?
[20:33:52] j0llyr0tten: minecoins: i'll check
[20:35:35] j0llyr0tten: minecoins: not an index
[20:37:02] j0llyr0tten: minecoins: i don't understand why i can manipulate it in the rails console but not in the code
[20:38:52] j0llyr0tten: minecoins: i call a class method on a Member model and in the method create a Member object and access it from there
[20:49:27] j0llyr0tten: minecoins: seems to be working now (ish) no idea why


[16:04:25] j0llyr0tten: i'm getting a strange error in Devise when i click Send me reset password instructions
[16:04:56] j0llyr0tten: i'm getting an ERROR -- : Binary data inserted for `string` type on column `reset_password_token`
[16:05:25] j0llyr0tten: no code, default Devise views
[16:06:41] j0llyr0tten: i'm using sqlite3 as my production db, could that be it?
[16:08:02] j0llyr0tten: s2013: how do i go about that, do you mind? nuke the db, recreate the db, reinstall Devise -- in that order?
[16:30:03] j0llyr0tten: s2013: i did all that (nuke db etc.) and i'm still gettin ERROR -- : Binary data inserted for `string` type on column `reset_password_token`
[16:30:51] j0llyr0tten: s2013: i changed User to Member, might that affect soemthing?
[16:36:33] j0llyr0tten: s2013: where's it getting the binary data from though?


[13:12:11] j0llyr0tten: has anybody used to rails-assets bundler bower tie up?
[13:13:18] j0llyr0tten: also, say i have a bower component that has a .js and a .css that i want to tweak a little, but it'll be very specific to my project
[13:14:09] j0llyr0tten: we're told not to track vendor components in git, so how do i create a patch that i can easily re-apply with every update of the component by the vendor?
[13:15:37] j0llyr0tten: jammanbo: where would you put the patches? into git? i was leaning towards a rake task, what do you think?
[13:15:49] j0llyr0tten: jammanbo: could you elaborate on your proposal? thx.


[17:51:54] j0llyr0tten: i'm trying to match /foo/:id/:bar
[17:52:19] j0llyr0tten: where bar is [a..zA..Z], is there a way?
[17:52:55] j0llyr0tten: i'm stumped, i thought it might be a dynamic segment but i can't seem to get it to work


[00:34:50] j0llyr0tten: oh turbolinks, let me count the ways i love thee
[00:36:09] j0llyr0tten: because i am a crap coder and my pages take 3 seconds to render it looks like nothing is happening until the response comes back
[00:36:34] j0llyr0tten: it makes the site feel odd, and i couldn't figure it out
[00:37:06] j0llyr0tten: then, i notice that a redirect is causing a page to be called twice. weird, i say to myself
[00:37:42] j0llyr0tten: and lo and behold it is our friend turbolinks again (deduced after much much much puzzlement)
[00:38:22] j0llyr0tten: weird, i says to meself


[15:53:48] j0llyr0tten: i am having trouble with `render_to_string'
[15:54:02] j0llyr0tten: it's not behaving the same way as `render'
[15:54:22] j0llyr0tten: specifically it is not finding a layout i am passing
[15:54:45] j0llyr0tten: and `render' does. i am at my wits end, i have used up my google-fu
[15:55:28] j0llyr0tten: render_to_string(partial: @note, layout: "notes/note_group_layout") ... @note is an instance of a model


[13:30:38] j0llyr0tten: i'm trying to use imagemagick in rails ... it works from the console (bin/rails c) but not from within a controller
[13:30:46] j0llyr0tten: require 'RMagick'
[13:30:56] j0llyr0tten: include Magick fails in the controller


[11:08:17] j0llyr0tten: is there any way to add before or after hooks to _path methods ?


[03:29:33] j0llyr0tten: hi ... i was wondering, say i create a new model `notes` and then i want `items` to have zero or more notes, how to i create a migration to add a column to items to point to notes?
[03:35:58] j0llyr0tten: Radar: `notes` belongs_to `items`
[03:36:21] j0llyr0tten: Radar: i already have items, i have just created notes
[03:37:43] j0llyr0tten: Radar okay, so i need to delete my notes model
[03:38:10] j0llyr0tten: and recreate it with a column pointing to items
[03:38:44] j0llyr0tten: Radar: oh no?
[03:39:54] j0llyr0tten: Radar: if a were to add the column using the command line, what type do i give it?
[03:41:33] j0llyr0tten: Radar: ok, i totally get you. but in addition, i'd love to know how to specify it on the command line as well, ....
[11:37:30] j0llyr0tten: i have a route `item_path` and when i try to method alias it in a helper i get a routing error
[11:37:48] j0llyr0tten: undefined method `item_path' for module `ItemsHelper'


[00:32:36] j0llyr0tten: question: shouldn't migrations happen _after_ seed data is loaded in rake db:setup ? makes sense, no?
[00:43:11] j0llyr0tten: bricker: hmm, i'll have to modify my seed data so
[00:44:39] j0llyr0tten: where does one put general application helper code, say code that migrations and seeding could reuse
[00:45:28] j0llyr0tten: bricker: to my mind seeding sounds like data after the tables have been set up but before migrations are run
[00:46:06] j0llyr0tten: bricker: plants grow from seeds :)
[12:03:22] j0llyr0tten: how do i get images in vendor/assets/stylesheets/images/ into my app in production?
[12:08:58] j0llyr0tten: mikecmpbll: vendors put their images there, not me?
[12:09:28] j0llyr0tten: mikecmpbll: vendor css files reference images relative to where they are
[12:09:53] j0llyr0tten: i found the answer on stackexchange but i am unsure why it is not the default
[12:09:56] j0llyr0tten: config.assets.precompile += %w[*.png *.jpg *.jpeg *.gif]
[12:10:06] j0llyr0tten: http://stackoverflow.com/questions/8052865/rails-3-1-asset-pipeline-why-my-images-do-not-precompile-for-production
[12:13:58] j0llyr0tten: mikecmpbll: just checkin, hold tight!
[12:23:16] j0llyr0tten: mikecmpbll: nope, it didn't work due to fingerprinting
[12:23:20] j0llyr0tten: mikecmpbll: http://stackoverflow.com/questions/7375810/rails-3-1-asset-pipeline-turn-off-image-asset-fingerprinting-on-heroku
[12:26:03] j0llyr0tten: mikecmpbll: why would it use an asset helper when it is not a rails specific project?
[12:32:09] j0llyr0tten: can i selectively turn off file digests in compiled assets?


[13:43:15] j0llyr0tten: any reason rails doesn't use thread safe tzinfo v1.1.0 instead of regular presumably non thread safe v0.3.8
[23:43:52] j0llyr0tten: i'm moving from development to production and i can't get apache/passenger to serve up application.css and application.js
[23:44:12] j0llyr0tten: i've done bin/rake asset:precompile or whatever that incantation is
[23:44:33] j0llyr0tten: i've done me googles
[23:46:35] j0llyr0tten: tubbo: did not restart the server, let me see
[23:47:28] j0llyr0tten: tubbo: ooooooh, why did that work? why could it not pick up the newly create css and js files?
[23:48:58] j0llyr0tten: workmad3: ok, got it, i should have figured that out in fairness
[23:49:12] j0llyr0tten: tubbo: thx oh wise one


[02:55:30] j0llyr0tten: is it possible that turbolinks is messing with onload= attr on my img tags?
[02:56:11] j0llyr0tten: Radar: i'm not sure, i feel that it could be
[02:58:15] j0llyr0tten: tell you what, i'll disable turbolinks and if it starts working then that's it
[03:01:54] j0llyr0tten: Radar: yeah, well we can't all be geniuses like yourself
[03:02:39] j0llyr0tten: Radar: np, ;)
[03:45:59] j0llyr0tten: Radar: i found out what the problem was, i was being a moron
[03:51:28] j0llyr0tten: Radar: meh, i had a src=data:... which was broken so obviously the image wasn't loading


[17:10:33] j0llyr0tten: i have a general question. i have about 350 thumbnails, so my page takes about 18 seconds to load, how can i speed this up?
[17:10:41] j0llyr0tten: page in question is: http://leto.electropoiesis.org:3301/items/slice?aspect=group_chronologically
[17:11:43] j0llyr0tten: i tried using ImageMagick to stick all the thumbnails together and i got a 17MB gif file :/
[17:12:00] j0llyr0tten: rushed: what's a sprite common thumbnail?
[17:13:27] j0llyr0tten: is there a way to progressively load images? should i break the page into pieces? should i ...?
[17:14:53] j0llyr0tten: rushed: like i said, i got a 17MB gif file when i appended them all together, so that's not gonna work
[17:19:22] j0llyr0tten: GeekOnCoffee: these are all thumbnails of scans in an archive
[17:19:35] j0llyr0tten: GeekOnCoffee: the archive is comprised of items
[17:19:46] j0llyr0tten: GeekOnCoffee: each item has one or more scans
[17:20:09] j0llyr0tten: GeekOnCoffee: i show the first scan for an item to give a flavour of the item
[17:20:19] j0llyr0tten: GeekOnCoffee: and that's just how many there are
[17:22:04] j0llyr0tten: GeekOnCoffee: that'd be an idea, how could that be done do you reckon?
[17:22:26] j0llyr0tten: GeekOnCoffee: you make me want to have coffeee
[19:33:01] j0llyr0tten: what's the difference between node and bower? what are the different use cases? they seem to overlap ...
[19:33:11] j0llyr0tten: i mean, between npm and bower
[19:34:27] j0llyr0tten: tubbo: ah, so that's why i used npm to install bower, and then use bower to install jquery plugins
[19:34:35] j0llyr0tten: tubbo: *hat tip*
[19:36:39] j0llyr0tten: tubbo: now you're confusing me :(
[19:38:08] j0llyr0tten: tubbo: 'k dude, i had a quick peep but i'll stick with bower for now ^^
[19:39:00] j0llyr0tten: tubbo: i'll try


[20:34:09] j0llyr0tten: though, i just upgraded rails, let me restart the server
[20:35:28] j0llyr0tten: tubbo: i restarted :) !
[20:35:34] j0llyr0tten: tubbo: and i still get it
[20:39:38] j0llyr0tten: https://gist.github.com/anonymous/7918005
[20:52:09] j0llyr0tten: tubbo: https://www.webproxy.net/view?q=http%3A%2F%2Fleto.electropoiesis.org%3A3301
[20:52:29] j0llyr0tten: click on any of the main links on that page to trigger the javascript error
[20:52:45] j0llyr0tten: i'm afk for a while ... i'll check back in under an hour
[20:52:53] j0llyr0tten: happy hunting!