News for hackers. Stuff that matters.

jeremykemper

Re:Making MySQL Better at GitHub on Wednesday September 03, 2014 @12:05PM (#8263657)
SQLite is the Rails default, in fact.

In October 2013, NewRelic reported that 53% of their customers are using PostgreSQL: http://blog.newrelic.com/2013/10/10/infographic-state-stack-...

In July 2014, Planet Argon's Rails survey showed a surge in preference for PostgreSQL since 2012: http://rails-hosting.com/Results/2014/index.html#Database

Neither captures the distribution of usage from small- to large-scale apps, but it does look like the community has already moved both in mindshare and number of production deployments. I'd wager that Heroku's PostgreSQL default is responsible for much of that.

Re:HTTP Caching in Ruby with Rails on Tuesday December 04, 2012 @09:46PM (#4874600)
Nice fix!

Declared ETags, together with Russian Doll caching, take the next step: automatically mixing your template and asset versions into your ETags.

To include the template's version in the ETag:

  # Incorporate the cache version for this action into our ETag.
  # This allows template changes to bubble up into HTTP cache
  # freshness and bust browser caches when we make changes.
  etag do
    begin
      CacheDigests::TemplateDigestor.digest(
        "#{controller_name}/#{action_name}",
        request.format.try(:to_sym), lookup_context)
    rescue ActionView::MissingTemplate => e
      '' # Ignore missing templates
    end
  end
Similarly, for your JavaScript and CSS assets:

  ASSET_FRESHNESS_PATHS = %w( application.js application.css )

  # HTML pages cached by the browser should be updated whenever we change
  # our assets, so we include application.css and application.js digests
  # in ETags for HTML pages.
  etag do
    if request.format.try(:html?)
      ASSET_FRESHNESS_PATHS.map { |p| asset_digest_for_etag(p) }.join('-')
    end
  end

  # Check precompiled asset manifest (production) or compute the digest (dev).
  def asset_digest_for_etag(logical_path)
    if manifest = Rails.application.config.assets.digests
      manifest[logical_path]
    else
      Rails.application.assets[logical_path].digest
    end
  end
This avoids the need to use global versions that blow all browser caches. Neatly contains the scope of "freshness fallout" when you tweak a view and deploy.
Re:Work has started on Ruby 2.0 on Wednesday October 19, 2011 @11:23AM (#3130535)
Rails 3.x will maintain 1.8.7 support.

Rails 4 will drop Ruby 1.8 for good.

Check out how quickly 1.9.2 has been adopted in production Rails apps: http://blog.newrelic.com/2011/09/28/state-of-the-stack-a-rub...

Brian, I'm on the receiving end of [email protected] and @rubyonrails.org. I read your post with great dismay, to put it mildly. You're understandably pissed: we whiffed on our response to you by changing venue to Rails security without keeping you in the loop.

This is my fault. I identified it as a Rails issue and requested that you forward your findings to the Rails security team so we could investigate in concert.

Craig here at 37s narrowed down a root fix with Michael, Rails' security ombudsman, who then enlisted Manfred's help to track down and repair the root cause. What you see today is the end result of those efforts. The security process worked, but you only saw the Rails arm of it. The apparent 37signals arm of it amounted to runaround. Completely not OK.

We now have a security-only email and PGP key at http://37signals.com/security. Next time, no runaround.