Tyler Schultz's blog
Ask for Help
"CarrierWave is messy leaving files in the tmp directory when running tests. Is rm -rf the best answer?"
Yes!
"While the we love Rails, we don't need it, we just want its asset packaging features. Some suggest using sprockets. Do you have other suggestions?"
Interesting Things
*Gem Maintainers: use LicenseFinder to save users of your gem the hassle of digging through your gem to figure out what license your gem is distributed under.
*A Pivot had great success using Join.me for remote pairing. Setup was a snap! Others suggest checking out TeamViewer as well.
Help!
"How do I choose the value of a select box programmatically? The val function does not seem to do the trick."
Try setting the desired option as selected and then trigger a change event on the select input.
*"A pair is looking for 'multi file upload via iframe-transport' expertise. Specifically uploads in FireFox 3.6."
Interesting
- The latest RubyMine EAP has improved code formatting options!
Ask for Help
"Our delayed job consumes 2G of memory creating ~20k ActiveRecords in a loop!"
It doesn't answer why your job is using so much memory, but check out activerecord-import.
Interesting Things
- Pivotal SF will be hosting a Tracker Users Group meetup tonight. Dan Podsedly will be speaking. He will be seeking feedback for a eagerly awaited feature to be rolled out shortly: Epics! Come and mingle with fellow Tracker users, drink some beer and eat some food.
Help
Some pivots are having trouble with a flash embed tag's scale attribute. The desired behavior is that the movie scale to fit the size of the element. According to documentation, this should just work. The flash content will not scale, instead the content is getting cropped.
Anyone have experience using Amazon RDS with Heroku?
Several projects at Pivotal have used this combination with great success.
Interesting
- A project had some intermittently slow queries. The problem was traced back to some large strings in one of the columns. The team solved this problem by overriding the default scope, and only selecting the expensive column when needed.
Help:
- Does anyone know of a way to aggregate multiple projects into one hudson build? A pivot currently has 4 hudson projects that he'd like to show as one status. If any one project fails to build, then the build should go red, but hudson should still build the other three.
Interesting:
- Time gotcha:
In 1.8.7 you'll see this:
> Time.now => Wed Dec 08 22:26:37 -0800 2010 > 1.day.ago => Wed, 08 Dec 2010 06:26:44 UTC +00:00 > 1.day.ago.to_date => Wed, 08 Dec 2010 > (Time.now - 1.day).to_date => Tue, 07 Dec 2010
In 1.9.2 you'll see this:
ruby-1.9.2-p0 > Time.now => 2010-12-08 23:28:26 -0800 ruby-1.9.2-p0 > 1.day.ago => Tue, 07 Dec 2010 23:28:26 PST -08:00 ruby-1.9.2-p0 > 1.day.ago.to_date => Tue, 07 Dec 2010 ruby-1.9.2-p0 > (Time.now-1.day).to_date => Tue, 07 Dec 2010
Interesting:
- salesforce acquires heroku: http://blog.heroku.com/archives/2010/12/8/the_next_level
Interesting:
- Tests won't run if
rspecis included in thetestgroup.rspecmust be included in the development group, or both. When a test run is started theRAILS_ENVisdevelopment. After some initialization theRAILS_ENVis changed totest- a point at which theGemfilehas already been evaluated.
Interesting Thing
- Dynamic use of Object#extend at runtime invalidates the global method cache, causing performance degradations. Consider a design that makes use of extend at class parse time. Here's a slide deck that explains in detail: What Makes Ruby Go
Help
*"Proxying Apache to Thin and getting 502 errors."
Interesting
Beware: Health check ping every 3 seconds * 15 mongrels * 1 week = millions of session rows. Create skip_filter entry for your health ping action.
Snow Leopard 10.6.2 is out. An unlucky upgrader attempted to go 10.6.1 -> 10.6.2 and it hosed the machine. This required the upgrader to reinstall Snow Leopard from disk, then upgrading to 10.6.2. Backup your data before upgrading!
Redefining an aliased method may not do what you expect: When the aliased method is invoked the original implementation executes.
def do_something puts "hello" end alias :do_something_else :do_something def do_something puts "goodbye" end do_something_else # prints "hello"
