Skip to content

Commit

Permalink
setting up to run in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Fitzgerald committed Aug 16, 2010
1 parent 453f034 commit 916be2e
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
1 change: 1 addition & 0 deletions example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem 'rails', '3.0.0.rc'
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'mysql'

gem 'mongoid', ">= 2.0.0.beta.16"
gem 'bson_ext'
Expand Down
4 changes: 3 additions & 1 deletion example/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: /Users/fitz/Projects/mongoid_session_store
specs:
mongoid_session_store (0.0.1)
mongoid_session_store (0.0.2)
actionpack (>= 3.0.0.rc)
mongoid (>= 2.0.0.beta.16)

Expand Down Expand Up @@ -56,6 +56,7 @@ GEM
mongo (~> 1.0.3)
tzinfo (~> 0.3.22)
will_paginate (~> 3.0.pre)
mysql (2.8.1)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.9)
Expand Down Expand Up @@ -90,5 +91,6 @@ DEPENDENCIES
bson_ext
mongoid (>= 2.0.0.beta.16)
mongoid_session_store!
mysql
rails (= 3.0.0.rc)
sqlite3-ruby
25 changes: 17 additions & 8 deletions example/config/database.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)

# development:
# adapter: sqlite3
# database: db/development.sqlite3
# pool: 5
# timeout: 5000

development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
adapter: mysql
database: example_development
username: root
password: root
host: localhost

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
Expand All @@ -16,7 +24,8 @@ test:
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
adapter: mysql
database: example_development
username: root
password: root
host: localhost
4 changes: 0 additions & 4 deletions example/config/initializers/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@

# Example::Application.config.session_store :cookie_store, :key => '_example_session'
Example::Application.config.session_store :mongoid_store

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
# Example::Application.config.session_store :active_record_store
6 changes: 1 addition & 5 deletions example/config/mongoid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,4 @@ test:
# set these environment variables on your prod server
production:
<<: *defaults
host: <%= ENV['MONGOID_HOST'] %>
port: <%= ENV['MONGOID_PORT'] %>
username: <%= ENV['MONGOID_USERNAME'] %>
password: <%= ENV['MONGOID_PASSWORD'] %>
database: <%= ENV['MONGOID_DATABASE'] %>
database: example_production

0 comments on commit 916be2e

Please sign in to comment.