"expect errors" when compiling Ruby with clang
Compiled Ruby with clang and the compile output contained a warning to "expect errors". Has anyone experienced these alleged errors?
One member or our audience said that they had compiled the same way and not experienced any problems.
Update your rack gem
Nasty remote execution vulnerability.
parallel_tests prepare task does not drop tables
If you're using parallel_tests, be aware that, unlike rake db:test:prepare, the rake parallel:prepare task does not purge the databases before it loads the schema. You'll only notice this if you're dropping tables – the dropped tables will stay forever in the parallel databases.
We have a fork that works properly. (Pull request coming soon.)
02/15: Block Party
next Friday celebrating start ups in SF w/food trucks at lunch time.
“How do I not use VCR with Webmock in a spec?”
Use VCR.eject_cassette, see: docs
“Facebook now expires all tokens after 60 days. If you schedule a task with Facebook in the future it may use the expired token. Any solutions?”
Sadly there is nothing you can do. Send the user an email to re-auth.
“Good way to get replies on Twitter?”
Nope. Crawl thorough all your mentions, to get to your replies.
Is there a way to get MySql indexing to speed up queries involving greater and less than operators on date columns?
Postgres handles these operators a little bit better than MySql, but may not actually solve this problem.
Using millis instead of dates would give the DB the best chance of handling this scenario.
We are using Git’s subtree merge facility instead of submodules to stay synced to a different repository for part of our project. How do we push changes back to that repo?
See Tim Connor’s blog post “Git sub-tree merging back to the subtree for pushing to an upstream“. Early in that post is a pointer to an article describing the the subtree merge operation. Tim goes on to explain how to push your changes back through the chain.
Some cloud environments leave the names of temp files visible even when their contents are not accessible. Be sure to use obfuscated names for your temporary files!
The “Headless” gem allows you to easily set up an alternate “display” that allows programs to execute in a headless environment. See this blog post about how to use Headless to run Selenium tests on a CI box: http://www.aentos.com/blog/easy-setup-your-cucumber-scenarios-using-headless-gem-run-selenium-your-ci-server
Ccrb will bog down to painfully slow levels if more than a couple of CC Tray clients are pinging it repeatedly during a build.
Cron will not honor your .rvmrc file unless you do some work to set up the environment. If you set up your cron job like this:
0 6 * * * /bin/bash -l -c 'echo /home/someuser/.rvm/bin/rvm rvmrc trust ... && cd ...
the -l & -c parameters cause bash to load your environment as if your were logging in before running the specified commands. Someone also mentioned that rvm-shell can be used as a solution to this problem.
- Problem: Select includes “*” by default, so selecting by specific column names does not work
If you write:
class Thing < ActiveRecord::Base
class Post < ActiveRecord::Base
default_scope select(column_names - ['body'])
Thing.includes(:posts).all does the following for the posts query:
SELECT id, fk_column_id, column1, etc, posts.*
WHERE (pages.fk_column>in IN(1,2,3))
It takes the default select scope, but also appends posts.* to the end of it.
This is caused by the :select find_option in the find_associated_records inside of association_preload.rb. This is what it is now:
:select => preload_options[:select]
It seems like the third || case is not needed, since that is the default for any select and it causes the above behavior.
Joseph Palermo has filed a ticket with Lighthouse about this…
“How can I test route redirects in Rails 3?”
Capybara (a Webrat clone for Rails 3) will do the job but we’re looking for something a little more direct. It may be possible to test this by checking location headers and disabling automatic redirects in tools might increase visibility.