title: Can't create extensions for Postgres
body: <p>I'm using postgres (PostgreSQL) 9.3.5 with my Rails (4.0.1) app and Ruby (2.0.0-p451), and one of the migrations looks like: </p>
  
  <pre><code>class CreateExtensions&lt; ActiveRecord::Migration
      def up
          connection = ActiveRecord::Base.connection
          extensions = %w(fuzzystrmatch hstore plpgsql postgis postgis_tiger_geocoder postgis_topology)
          ext_query = extensions.map {|e| "CREATE EXTENSION IF NOT EXISTS #{e};" }.join
          connection.execute(ext_query)
      end
  end
  </code></pre>
  
  <p>Whenever I try to run the migration file I get the following error: </p>
  
  <pre><code>CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;CREATE EXTENSION IF NOT EXISTS hstore;CREATE EXTENSION IF NOT EXISTS plpgsql;CREATE EXTENSION IF NOT EXISTS postgis;CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;CREATE EXTENSION IF NOT EXISTS postgis_topology;
  PG::UndefinedFile: ERROR:  could not open extension control file "/usr/local/Cellar/postgresql/9.3.5_1/share/postgresql/extension/postgis.control": No such file or directory
  : CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;CREATE EXTENSION IF NOT EXISTS hstore;CREATE EXTENSION IF NOT EXISTS plpgsql;CREATE EXTENSION IF NOT EXISTS postgis;CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;CREATE EXTENSION IF NOT EXISTS postgis_topology;
  ActiveRecord::StatementInvalid: PG::UndefinedFile: ERROR:  could not open extension control file "/usr/local/Cellar/postgresql/9.3.5_1/share/postgresql/extension/postgis.control": No such file or directory
  : CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;CREATE EXTENSION IF NOT EXISTS hstore;CREATE EXTENSION IF NOT EXISTS plpgsql;CREATE EXTENSION IF NOT EXISTS postgis;CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;CREATE EXTENSION IF NOT EXISTS postgis_topology;
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `async_exec'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:128:in `block in execute'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.1/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/activerecord-4.0.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:127:in `execute'
      from (irb):14
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.1/lib/rails/commands/console.rb:90:in `start'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.1/lib/rails/commands/console.rb:9:in `start'
      from /Users/info/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.1/lib/rails/commands.rb:62:in `&lt;top (required)&gt;'
      from bin/rails:4:in `require'
      from bin/rails:4:in `&lt;main&gt;'
  </code></pre>
  
  <p>I installed Postgres using Homebrew, Any idea what am I doing wrong here? </p>