Skip to content

Instantly share code, notes, and snippets.

@george
Created March 9, 2011 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save george/862447 to your computer and use it in GitHub Desktop.
Save george/862447 to your computer and use it in GitHub Desktop.
for thinking_sphinx google group "uninitialized constant ThinkingSphinx::Mutex" post
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module Bwfa
class Application < Rails::Application
# 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.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# config.autoload_paths << 'lib'
config.autoload_paths += Dir["#{config.root}/lib/**/"] # include all subdirectories
# 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 ]
# 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. Default is UTC.
config.time_zone = 'Eastern Time (US & Canada)'
# 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}').to_s]
# config.i18n.default_locale = :de
# JavaScript files you want as :defaults (application.js is always included).
config.action_view.javascript_expansions[:defaults] = %w()
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = 'utf-8'
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
if Rails.env == 'production'
config.middleware.use('Rack::GoogleAnalytics', :web_property_id => 'UA-XXXXXXX-X')
end
config.generators do |g|
g.test_framework :rspec, :fixture => true, :views => false
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
end
end
end
ActionDispatch::Callbacks.after do
# Reload the factories
return unless %w(development test cucumber).include?(Rails.env)
unless Factory.factories.blank? # first init will load factories, this should only run on subsequent reloads
Factory.factories.clear
Factory.find_definitions.each do |location|
Dir["#{location}/**/*.rb"].each { |file| load file }
end
end
end
source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'mysql2'
# gem 'ck_fu', :git => 'git@github.com:george/ck_fu.git'
gem 'configatron', '~> 2.6.4'
gem 'db_populate', '~> 0.2.6'
gem 'fastercsv' # TODO: delete (only needed for initial DB migration)
gem 'hoptoad_notifier', '~> 2.4.6'
gem 'jquery-rails', '~> 0.2.7'
gem 'query_reviewer'
gem 'thinking-sphinx', '~> 2.0.2', :require => 'thinking_sphinx'
gem 'tiny_mce', '~> 0.1.4'
gem 'validates_email_format_of'
gem 'will_paginate', '~> 3.0.pre2'
group :development do
gem 'elif'
gem 'ParseTree' # TODO: delete after migration to Rails 3
gem 'rails-footnotes', :git => 'git://github.com/romanvbabenko/rails-footnotes.git', :branch => 'rails3'
gem 'ruby2ruby' # TODO: delete after migration to Rails 3
end
group :cucumber, :development, :test do
gem 'autotest-rails', '~> 4.1.0'
gem 'capybara', '~> 0.4.1.2'
gem 'cucumber-rails', '~> 0.3.2'
gem 'email_spec', '~> 1.1.1'
gem 'factory_girl_rails', '~> 1.0.1'
gem 'launchy'
gem 'rb-appscript'
gem 'rspec-rails', '~> 2.5.0'
gem 'ruby-debug'
gem 'spork', '~> 0.9.0.rc'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'watchr'
gem 'ZenTest', '~> 4.5.0'
end
group :production do
gem 'rack-google_analytics', :require => 'rack/google_analytics'
end
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
require 'rake'
Bwfa::Application.load_tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment