Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding example database yml, setup for bundler in boot process

  • Loading branch information...
commit 218bf5c4343d5b78ac97135f78a60bdc770bb1e8 1 parent 6299c6c
Chad Humphries and Jon Distad authored
View
1  .gitignore
@@ -6,3 +6,4 @@ public/javascripts/cache-application.js
public/stylesheets/cache-application.css
coverage.data
test/coverage
+.bundle
View
14 config/boot.rb
@@ -106,5 +106,19 @@ def read_environment_rb
end
end
+class Rails::Boot
+ def run
+ load_initializer
+
+ Rails::Initializer.class_eval do
+ def load_gems
+ @bundler_loaded ||= Bundler.require :default, Rails.env
+ end
+ end
+
+ Rails::Initializer.run(:set_load_path)
+ end
+end
+
# All that for this:
Rails.boot!
View
25 config/database.example.yml
@@ -0,0 +1,25 @@
+# SQLite version 3.x
+# gem install sqlite3-ruby (not necessary on OS X Leopard)
+development:
+ host: 127.0.0.1
+ adapter: mysql
+ database: clojuredocs
+ username: root
+ password:
+
+# Warning: The database defined as "test" will be erased and
+# re-generated from your development database when you run "rake".
+# Do not set this db to the same as development or production.
+test:
+ host: 127.0.0.1
+ adapter: mysql
+ database: clojuredocs_test
+ username: root
+ password:
+
+production:
+ host: 127.0.0.1
+ adapter: mysql
+ database: clojuredocs
+ username: root
+ password:
View
12 config/database.yml
@@ -11,15 +11,15 @@ development:
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
- host: 127.0.0.1
- adapter: mysql
- database: clojuredocs_test
- username: root
- password:
+ host: 127.0.0.1
+ adapter: mysql
+ database: clojuredocs_test
+ username: root
+ password:
production:
host: 127.0.0.1
adapter: mysql
database: clojuredocs
username: root
- password:
+ password:
View
45 config/environment.rb
@@ -8,52 +8,9 @@
require 'digest/md5'
Rails::Initializer.run do |config|
- # Settings in config/environments/* take precedence over those specified here.
- # Application configuration should go into files in config/initializers
- # -- all .rb files in that directory are automatically loaded.
-
- # Add additional load paths for your own custom dirs
- # config.load_paths += %W( #{RAILS_ROOT}/extras )
-
- # Specify gems that this application depends on and have them installed with rake gems:install
- # config.gem "bj"
- # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
- # config.gem "sqlite3-ruby", :lib => "sqlite3"
- # config.gem "aws-s3", :lib => "aws/s3"
-
-# config.gem "ruby-openid", :version => '2.1.2'
-# config.gem "rack-openid", :version => '1.0.3'
- config.gem "shoulda", :lib => "shoulda"
- config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org'
- config.gem 'levenshtein', :version => '0.2.0'
- config.gem 'rdiscount', :version => '1.6.5'
- config.gem 'chronic', :version => '0.2.3'
-# config.gem 'json_pure', :version => '1.4.3'
- config.gem 'flexmock', :version => '0.8.7'
-
-# config.gem 'rubytree', :version => '0.7.0'
-
- # Only load the plugins named here, in the order given (default is alphabetical).
- # :all can be used as a placeholder for all plugins not explicitly named
- # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
- # Skip frameworks you're not going to use. To use Rails without a database,
- # you must remove the Active Record framework.
- # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
-
- # Activate observers that should always be running
- # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
-
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
- # Run "rake -D time" for a list of tasks for finding time zone names.
config.time_zone = 'UTC'
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
- # config.i18n.default_locale = :de
-
config.action_controller.perform_caching = true
ROOT_URL = "http://localhost:3000"
-
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.