Skip to content

Instantly share code, notes, and snippets.

@sfentress
Created September 8, 2011 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfentress/1203930 to your computer and use it in GitHub Desktop.
Save sfentress/1203930 to your computer and use it in GitHub Desktop.
CC IRC Log 9/8/11
CIA-115: ==> rigse :: Stephen Bannasch rails3.0 * r005e5ff / (Gemfile Gemfile.lock)
[10:40am] CIA-115: (log message trimmed)
[10:40am] CIA-115: Gemfile: dynamic_form to restore some legacy Rails features
[10:40am] CIA-115: https://github.com/joelmoss/dynamic_form
[10:40am] CIA-115: ==> rigse :: Stephen Bannasch rails3.0 * r74ef4d4 / app/controllers/application_controller.rb
[10:40am] CIA-115: (log message trimmed)
[10:40am] CIA-115: restore legacy WillPaginate::Collection behavior
[10:40am] CIA-115: https://github.com/mislav/will_paginate/wiki/Backwards-incompatibility
[10:46am] stepheneb: If you are working on the rails3 stuff and have local commits you might want to:
[10:46am] stepheneb: git fetch; git rebase origin/rails3.0; git push origin rails3.0
[10:46am] stepheneb: bundle install
[10:48am] stepheneb: rklancer: why should we commit this into production.rb: config.serve_static_assets = true
[10:48am] stepheneb: why shouldn't we ...?
[10:51am] rklancer: I assume just in case we forget to turn it off before deploying
[10:51am] stepheneb: why would that be a problem?
[10:51am] stepheneb: what does it do
[10:51am] stepheneb: we never had this problem before
[10:52am] rklancer: huh? it makes sure apache serves the content from public/ instead of the Rails stack
[10:53am] stepheneb: it needs to work whether we are running in production locally or on a server w/o changes to production.rb
[10:54am] stepheneb: I'm sure there are many folks doing just that
[10:54am] rklancer: i assume so...
[10:54am] stepheneb: I mean w/o me having to change production.rb locally
[10:55am] CIA-115: ==> otrunk :: snourian * r25091 /trunk/common/java/simulations/Energy3D/ (3 files in 2 dirs)
[10:55am] CIA-115: http://trac.cosmos.concord.org/projects/changeset/25091
[10:55am] CIA-115: - fix problem with incorrect camera position when taking snapshot for printing when the resolution is different than actual
[10:55am] stepheneb: apache should always serve the content from public/
[10:56am] stepheneb: only when content is requested that isn't here => /public/some/content/that/is/not/here
[10:56am] stepheneb: does the request then get passed to rails
[11:20am] rklancer: Does that mean Rails gets hit with 404s?
[11:21am] rklancer: for stuff that isn't in public
[11:21am] rklancer: I mean, if a non-existent asset file is requested
[11:22am] rklancer: I guess that's configurable...
[11:22am] stepheneb: rklancer: no ... if it isn't in public the web server (apache, webrick, etc) just passes the request along to rails
[11:22am] rklancer: right, so if you ask for stylesheets/non_existent.css
[11:22am] stepheneb: so for example a request to /activities will nbot find the file 'activities' in /public'
[11:23am] stepheneb: will be passed off to rails
[11:23am] rklancer: right. the normal behavior.
[11:23am] stepheneb: I haven't thought much about how sass would work but I expect it's like this
[11:23am] rklancer: What I'm asking is second-order, probably less important, and probably avoidable by configuring Apache correctly
[11:24am] stepheneb: in production always comple all assets when starting up ... ONCE
[11:24am] rklancer: which is to say, does Rails end up serving the 404 for "stylesheets/non_existent_stylesheet.css" if that file doesn't exist
[11:24am] rklancer: stepheneb: right and right.
[11:24am] stepheneb: in dev don't compile assets until requested and not found OR if an scss file is changed
[11:25am] stepheneb: yes, rails will server the 404 for a non-existaent css UNLESS there is some middleware that intercepts this and ... say compiles it
[11:28am] rklancer: I guess the last question is about asset_packager
[11:29am] rklancer: when I run rails s -eproduction locally, I don't get a packaged css
[11:29am] rklancer: but I can investigate that later
[11:29am] rklancer: (instead, the html contains several stylesheet link tags)
[11:38am] stepheneb: rklancer: it might be easier to divide the problem into two parts
[11:38am] stepheneb: 1) w/o asset_packager
[11:39am] stepheneb: disable asset_packager and make sure that compass/sass toolchain works in dev and productionmodes
[11:39am] stepheneb: make sure JavaScript resources are being served also
[11:40am] stepheneb: 2) investigate whether our current asset_packager works in rails3.0.10; are there better options?
[11:40am] stepheneb: for example I suspect there might be a backport in a gem of the rails 3.1 asset system
[11:41am] stepheneb: if this is correct AND it's reiable (people are using it, issue tracker has closed issues, etc) then perhaps we should use that instead
[11:41am] stepheneb: this would make a future move to 3.1 easier
[11:51am] CIA-115: ==> rigse :: Sam Fentress rails3.0 * rd07589e / README.textile
[11:51am] CIA-115: Get rid of extraneous bc's - http://git.io/YZzHqQ
[11:56am] stepheneb: sfentress: did you know you can check the textile or markdown formatting if you are running the portal locally: http://localhost:3000/readme
[11:56am] rklancer: hey stepheneb I'm working on SG for a little bit longer. But (1) compass seems to compile when starting rails, don't yet know if it watch functionality is enabled in dev mode so you can change SCSS w/o restarting the server
[11:57am] sfentress: stepheneb: right. I was fixing someone's formatting bugs that had been bothering me
[11:57am] stepheneb: thnaks
[11:58am] rklancer: (2) bin/rake asset:packager:build_all works fine but I think (?) rails isn't requesting the packaged assets, and I don't know if the asset packager runs when Rails is started in production mode
[11:58am] rklancer: so I will investigate these when I return
[12:07pm] stepheneb: rklancer: if I run: git clean -dfx public/stylesheets/; bin/rails s -e production
[12:07pm] stepheneb: there are no stylesheets
[12:08pm] stepheneb: it seems like compiling the stylesheets ONCE should happen whenever the server starts in production mode ...
[12:09pm] rklancer: huh
[12:19pm] sfentress: when I recreate the project from scratch, and then run 'rake db:test:prepare', I see MySql errors that I didn't see before
[12:19pm] sfentress: Loading ri_gse_domains...
[12:19pm] sfentress: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key,uuid,created_at,updated_at) VALUES (1,'Physical Science','PS','30ea867c-61fe' at line 1: INSERT INTO ri_gse_domains (id,name,key,uuid,created_at,updated_at) VALUES (1,'Physical Science','PS','30ea867c-61fe-11df-a821-001ff3caa767','2010-05-17 21:50:21','2010-05-17 21:50:21')
[12:19pm] sfentress: failed to load table ri_gse_domains
[12:19pm] sfentress: Loading ri_gse_expectations...
[12:20pm] sfentress: and a similar error for ri_gse_unifying_themes
[12:22pm] sfentress: by the way, one nice thing about communicating on Skype is that a) when a previously-offline dev opens the standup channel, they can see all the previous conversations without having to hunt down logs, and b) you can direct questions to no one (i.e. to the group) and by default people will be aware that there is activity on the channel
[12:31pm] stepheneb: sfentress: I agree w/that skype benefit
[12:32pm] stepheneb: sfentress: I have a section in the google doc about that: Fix Mysql errors when preparing the test database
[12:33pm] stepheneb: rklancer: "huh" ... wgat was it you didn't understand?
[12:33pm] sfentress: stepheneb: ah, ok, so it's not new. I didn't remember seeing those before, but they may well have been there
[12:33pm] stepheneb: sfentress: I haven't investigated that yet
[12:34pm] stepheneb: sfentress: I don't see any evidence but I wondered if it was char encoding utf-8 issues
[12:35pm] stepheneb: I'm pretty sure the files are passing into ruby before going to mysql
[12:35pm] stepheneb: might be fixed just by putting the encoding preamble at the top of the yaml file
[12:36pm] sfentress: stepheneb: I haven't looked into it either. I was starting to look into the searchable_model bug, and wanted a well-working testing db to make sure I wasn't introducing any errors from that
[12:36pm] sfentress: but I can look into the sql bug instead
[12:36pm] stepheneb: sfentress: when I am using irc like this I tend to leave it open and my computer running all day -- even when I take a break -- to deal with that issue
[12:38pm] stepheneb: sfentress: try adding this as the first line of the gse yaml files: # encoding: UTF-8
[12:38pm] sfentress: stepheneb: right, I do too. But if we had been using IRC all along, I wouldn't have seen all the interesting conversations that happen after 6:00 when I close my computer, for example
[12:38pm] stepheneb: reference: http://blog.grayproductions.net/articles/ruby_19s_three_default_encodings
[12:38pm] sfentress: stepheneb: unless I thought to go find the logs
[12:39pm] sfentress: which actually seem not to be working
[12:39pm] stepheneb: yeah ... the logger could notice when you joined and when you left and could have a command that added you to a list for special notification you to
[12:40pm] stepheneb: so after adding yourself to the show-me-chat-i-missed logger list
[12:41pm] stepheneb: when you logged off and later logged on the logger could notice and generate the content and a short url and post it to the irc log
[12:41pm] stepheneb: ... but that doesn't exist with our logger that's not even turned on now
[12:42pm] rklancer: stepheneb: the 'huh' is that I don't see that behavior
[12:42pm] stepheneb: rklancer: are you up-to-date
[12:43pm] stepheneb: sfentress: I wrote to aaron about how to turn on the logger -- I know most of the details ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment