Ask for Help
“The Twitter API has callbacks which return tweet IDs; however, we’re not seeing the IDs.”
“nginx upload module: does it buffer to memory and then stream to disk?”
The upload module by itself streams to disk; have used it to upload multi-gigabyte files, which would have caused problems if it was buffering to memory.
“Is there a way to undelete stories in tracker?”
Look at the history, it will show what stories were recently deleted. Export/import might help, too. Try contacting the Tracker team.
- Webmock + RubyMine == fail. This applies both to RubyMine-stable and RubyMine-EAP. You can monkeypatch around it by writing your own initializer. It may be a require-order problem.
Ask for Help
“Does anyone really understand character encoding in Ruby? Certain gmails are causing exceptions in our applications, and it seems to be a problem with gmail specifying the wrong encoding. Whatever is causing it, it’s fixed in 1.9.2.”
“When calling render_to_string in an AJAX request, rails does not find partials ending in .html.erb. Is there anyway to force it to find them other than requesting a filename.html.erb?”
“What’s better to use to handle attachments—paperclip or CarrierWave?”
They’re both good. It seems that CarrierWave is better and more recently updated.
Ask for Help
“Reloading of models under spork?”
From hybrid-cutlery expert Sobo:
Spork requires you to divide your spec helper into two phases, before fork and after fork.
Before fork, you want to do time consuming things like loading the Rails environment, so you don’t have to pay that cost on each test run.
If you end up requiring model classes or other volatile files before forking, then they won’t be reloaded for each test run.
This can happen, for example, when you use Devise route helpers, which touch the User constant during route evaluation.
This causes user.rb to be auto-required before fork.
Since the User constant is defined after forking, Rails won’t autoload changes to User, forcing you to restart the Spork server every time you change it.
There are two solutions:
- The first is simply to avoid loading models or other code you want to auto-reload before fork.
- If you must refer to models before fork, as is the case with the Devise route helpers, then put an explicit
require because it won’t load the file if it’s already been loaded) in your after fork block for the files that were loaded before fork.
This will force them to be reloaded.
- It’s open season on open enrollment. SF will have an info session today at 12:30. Pizza will be served. Y’all have between now and December 9th to make changes.
- Those with mohawks and staches in SF are encouraged to take a picture at the Vermehr e-mail station (closest e-mail station to the bathrooms).
Ask for Help
“Postgres SELECT * GROUP BY insists that all selected fields must either appear in the GROUP BY or be aggregated.”
Many agreed that this is, in fact, how a database should behave and that MySQL’s leniency on this matter is faulty. If you select a field that you don’t group by, you must tell Postgres how to combine the sub-set of values that fall in a given group into a single result (should it take the max? the min? the mean? the most purple?).
- Upgrading to Rails 3 from 2.3.14 results in rails not being able to reference named fixtures, so you actually have to force them. For ex:
asset_id: <%= Fixtures.identify(:work_sample_asset) %> # works
asset: work_sample_asset # doesn't work
- Ruby license has switched from dual license Ruby License / GPL3 for v1.9.2 to Ruby License / BSD for v1.9.3.
Riak v1.0 has been released, release party this evening
On Lion, Ctrl-F7 allows you to toggle keyboard access between “all controls” and “text boxes and list only”
SF Public Department is running an AIDS risk level assessment, feel free to join up if interested.