Permalink
Browse files

First step to PG integration

  • Loading branch information...
mirouhh committed Mar 5, 2012
1 parent 4ab1ebe commit 2f1d6a8db4638c4609c9b2b523841965f51693e4
Showing with 14 additions and 14 deletions.
  1. +2 −0 .bundle/config
  2. +3 −11 Gemfile
  3. +2 −0 Gemfile.lock
  4. +7 −3 config/database.rb
View
@@ -0,0 +1,2 @@
+---
+BUNDLE_WITHOUT: production
View
14 Gemfile
@@ -1,8 +1,8 @@
source :rubygems
-# Server requirements (defaults to WEBrick)
-# gem 'thin'
-# gem 'mongrel'
+group :production do
+ gem 'pg'
+end
# Project requirements
gem 'rake'
@@ -21,11 +21,3 @@ gem 'rack-test', :require => "rack/test", :group => "test"
# Padrino Stable Gem
gem 'padrino', '0.10.5'
-
-# Or Padrino Edge
-# gem 'padrino', :git => 'git://github.com/padrino/padrino-framework.git'
-
-# Or Individual Gems
-# %w(core gen helpers cache mailer admin).each do |g|
-# gem 'padrino-' + g, '0.10.5'
-# end
View
@@ -58,6 +58,7 @@ GEM
padrino-mailer (0.10.5)
mail (~> 2.3.0)
padrino-core (= 0.10.5)
+ pg (0.13.1)
polyglot (0.3.3)
rack (1.4.1)
rack-protection (1.2.0)
@@ -95,6 +96,7 @@ DEPENDENCIES
bcrypt-ruby
haml
padrino (= 0.10.5)
+ pg
rack-test
rake
sass
View
@@ -20,9 +20,13 @@
}
ActiveRecord::Base.configurations[:production] = {
- :adapter => 'sqlite3',
- :database => Padrino.root('db', "padrino_sample_blog_production.db")
-
+ :adapter => 'postgresql',
+ :encoding => 'utf8',
+ :database => postgres.path[1..-1],
+ :username => postgres.user,
+ :password => postgres.password,
+ :host => postgres.host
+
}
ActiveRecord::Base.configurations[:test] = {

0 comments on commit 2f1d6a8

Please sign in to comment.