MS IZ set up mongoid and got rid of activerecord sqlite3 nonsense
This commit is contained in:
parent
0390bbde8a
commit
a663844eef
4 changed files with 36 additions and 7 deletions
7
Gemfile
7
Gemfile
|
|
@ -5,7 +5,10 @@ gem 'rails', '3.0.0.beta4'
|
|||
# Bundle edge Rails instead:
|
||||
# gem 'rails', :git => 'git://github.com/rails/rails.git'
|
||||
|
||||
gem 'sqlite3-ruby', :require => 'sqlite3'
|
||||
#gem 'sqlite3-ruby', :require => 'sqlite3'
|
||||
gem "mongoid", :git => "http://github.com/durran/mongoid.git"
|
||||
gem "bson_ext", "1.0.1"
|
||||
|
||||
|
||||
# Use unicorn as the web server
|
||||
# gem 'unicorn'
|
||||
|
|
@ -14,7 +17,7 @@ gem 'sqlite3-ruby', :require => 'sqlite3'
|
|||
# gem 'capistrano'
|
||||
|
||||
# To use debugger
|
||||
# gem 'ruby-debug'
|
||||
gem 'ruby-debug'
|
||||
|
||||
# Bundle the extra gems:
|
||||
# gem 'bj'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
require File.expand_path('../boot', __FILE__)
|
||||
|
||||
require 'rails/all'
|
||||
require "action_controller/railtie"
|
||||
require "action_mailer/railtie"
|
||||
require "active_resource/railtie"
|
||||
|
||||
# If you have a Gemfile, require the gems listed there, including any gems
|
||||
# you've limited to :test, :development, or :production.
|
||||
|
|
@ -31,11 +33,11 @@ module Diaspora
|
|||
# config.i18n.default_locale = :de
|
||||
|
||||
# Configure generators values. Many other options are available, be sure to check the documentation.
|
||||
# config.generators do |g|
|
||||
# g.orm :active_record
|
||||
config.generators do |g|
|
||||
g.orm :mongoid
|
||||
# g.template_engine :erb
|
||||
# g.test_framework :test_unit, :fixture => true
|
||||
# end
|
||||
g.test_framework :rspec
|
||||
end
|
||||
|
||||
# Configure the default encoding used in templates for Ruby 1.9.
|
||||
config.encoding = "utf-8"
|
||||
|
|
|
|||
24
config/mongoid.yml
Normal file
24
config/mongoid.yml
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
defaults: &defaults
|
||||
host: localhost
|
||||
# slaves:
|
||||
# - host: slave1.local
|
||||
# port: 27018
|
||||
# - host: slave2.local
|
||||
# port: 27019
|
||||
|
||||
development:
|
||||
<<: *defaults
|
||||
database: diaspora_development
|
||||
|
||||
test:
|
||||
<<: *defaults
|
||||
database: diaspora_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'] %>
|
||||
Loading…
Reference in a new issue