Skip to content

Instantly share code, notes, and snippets.

@indirect
Created August 11, 2010 18:21
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 indirect/c9ee56967eab270d72de to your computer and use it in GitHub Desktop.
Save indirect/c9ee56967eab270d72de to your computer and use it in GitHub Desktop.
>> What version of bundler you are using
$ bundle -v
Bundler version 1.0.0.rc.3
>> What version of Ruby you are using
$ ruby -v
ruby 1.8.7 (2010-04-19 patchlevel 253) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2010.02
>> Whether you are using RVM, and if so what version
Yes.
$ rvm -v
rvm 0.1.43 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
>> Your Gemfile
source :rubygems
source :rubyforge
source :gemcutter
gem "rails", "~> 2.3.8"
gem 'mysql'
gem 'newrelic_rpm', :require => false
gem 'bullet'
gem 'searchlogic'
gem 'facebooker'
gem 'paths_of_glory', :require => false
gem 'whenever'
gem 'sanitize'
gem 'authlogic'
gem 'tzinfo'
gem 'fastercsv'
gem 'hoptoad_notifier'
gem 'breadcrumbs_on_rails'
>> Your Gemfile.lock
GEM
remote: http://rubygems.org/
remote: http://rubygems.org/
remote: http://rubygems.org/
specs:
actionmailer (2.3.8)
actionpack (= 2.3.8)
actionpack (2.3.8)
activesupport (= 2.3.8)
rack (~> 1.1.0)
activerecord (2.3.8)
activesupport (= 2.3.8)
activeresource (2.3.8)
activesupport (= 2.3.8)
activesupport (2.3.8)
authlogic (2.1.5)
activesupport
breadcrumbs_on_rails (1.0.1)
bullet (1.7.6)
chronic (0.2.3)
hoe (>= 1.2.1)
facebooker (1.0.74)
json_pure (>= 1.0.0)
fastercsv (1.5.3)
hoe (2.6.1)
rake (>= 0.8.7)
rubyforge (>= 2.0.4)
hoptoad_notifier (2.3.2)
activesupport
json_pure (1.4.3)
mysql (2.8.1)
newrelic_rpm (2.12.3)
nokogiri (1.4.3.1)
paths_of_glory (0.1.5)
rack (1.1.0)
rails (2.3.8)
actionmailer (= 2.3.8)
actionpack (= 2.3.8)
activerecord (= 2.3.8)
activeresource (= 2.3.8)
activesupport (= 2.3.8)
rake (>= 0.8.3)
rake (0.8.7)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
sanitize (1.2.1)
nokogiri (~> 1.4.1)
searchlogic (2.4.21)
activerecord (>= 2.0.0)
tzinfo (0.3.22)
whenever (0.5.0)
chronic (>= 0.2.3)
PLATFORMS
ruby
DEPENDENCIES
authlogic
breadcrumbs_on_rails
bullet
facebooker
fastercsv
hoptoad_notifier
mysql
newrelic_rpm
paths_of_glory
rails (~> 2.3.8)
sanitize
searchlogic
tzinfo
whenever
>> If you are on 0.9, whether you have locked or not
N/A
>> If you are on 1.0, the result of bundle config
$ bundle config
Settings are listed in order of priority. The top value will be used.
disable_shared_gems
Set for your local app (/Users/username/rails/repo/.bundle/config): "1"
path
Set via $BUNDLE_BUNDLE_PATH: "/Users/username/.rvm/gems/ree-1.8.7-2010.02"
>> The command you ran to generate exception(s)
Tried to load application after commenting out config.gem command for Paths of Glory gem. Running Passenger w/ REE on Mac OS X Snow Leopard.
>> The exception backtrace(s)
NameError (uninitialized constant MyBadgeSystem::Achievement):
activesupport (2.3.8) lib/active_support/dependencies.rb:105:in `const_missing'
app/models/business_rules/my_badge_system.rb:5:in `apply_logic'
app/models/rule_alternative.rb:15:in `apply_logic'
activerecord (2.3.8) lib/active_record/associations/association_proxy.rb:215:in `send'
activerecord (2.3.8) lib/active_record/associations/association_proxy.rb:215:in `method_missing'
app/models/rule.rb:26:in `apply_logic'
app/controllers/application_controller.rb:51:in `apply_rules'
vendor/plugins/will_paginate/lib/will_paginate/finder.rb:168:in `method_missing'
activerecord (2.3.8) lib/active_record/associations/association_collection.rb:369:in `method_missing_without_paginate'
activerecord (2.3.8) lib/active_record/associations/association_proxy.rb:215:in `each'
activerecord (2.3.8) lib/active_record/associations/association_proxy.rb:215:in `send'
activerecord (2.3.8) lib/active_record/associations/association_proxy.rb:215:in `method_missing'
activerecord (2.3.8) lib/active_record/associations/association_collection.rb:369:in `method_missing_without_paginate'
vendor/plugins/will_paginate/lib/will_paginate/finder.rb:168:in `method_missing'
app/controllers/application_controller.rb:49:in `apply_rules'
app/controllers/application_controller.rb:11
activesupport (2.3.8) lib/active_support/callbacks.rb:182:in `call'
activesupport (2.3.8) lib/active_support/callbacks.rb:182:in `evaluate_method'
activesupport (2.3.8) lib/active_support/callbacks.rb:166:in `call'
actionpack (2.3.8) lib/action_controller/filters.rb:225:in `call'
actionpack (2.3.8) lib/action_controller/filters.rb:629:in `run_before_filters'
actionpack (2.3.8) lib/action_controller/filters.rb:615:in `call_filters'
actionpack (2.3.8) lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
actionpack (2.3.8) lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
activesupport (2.3.8) lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Users/username/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/1.8/benchmark.rb:308:in `realtime'
activesupport (2.3.8) lib/active_support/core_ext/benchmark.rb:17:in `ms'
actionpack (2.3.8) lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
actionpack (2.3.8) lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
actionpack (2.3.8) lib/action_controller/flash.rb:151:in `perform_action_without_newrelic_trace'
/Users/username/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:253:in `perform_action'
/Users/username/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/method_tracer.rb:141:in `trace_execution_scoped'
/Users/username/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/newrelic_rpm-2.12.3/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:246:in `perform_action'
actionpack (2.3.8) lib/action_controller/base.rb:532:in `send'
actionpack (2.3.8) lib/action_controller/base.rb:532:in `process_without_filters'
actionpack (2.3.8) lib/action_controller/filters.rb:606:in `process'
actionpack (2.3.8) lib/action_controller/base.rb:391:in `process'
actionpack (2.3.8) lib/action_controller/base.rb:386:in `call'
actionpack (2.3.8) lib/action_controller/routing/route_set.rb:438:in `call'
actionpack (2.3.8) lib/action_controller/dispatcher.rb:87:in `dispatch'
actionpack (2.3.8) lib/action_controller/dispatcher.rb:121:in `_call'
actionpack (2.3.8) lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
vendor/plugins/bullet/lib/bulletware.rb:10:in `call'
vendor/plugins/bullet/lib/bulletware.rb:10:in `call'
actionpack (2.3.8) lib/action_controller/string_coercion.rb:25:in `call'
rack (1.1.0) lib/rack/head.rb:9:in `call'
rack (1.1.0) lib/rack/methodoverride.rb:24:in `call'
actionpack (2.3.8) lib/action_controller/params_parser.rb:15:in `call'
facebooker (1.0.74) lib/rack/facebook.rb:43:in `call'
actionpack (2.3.8) lib/action_controller/session/abstract_store.rb:128:in `call'
activerecord (2.3.8) lib/active_record/query_cache.rb:29:in `call'
activerecord (2.3.8) lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
activerecord (2.3.8) lib/active_record/query_cache.rb:9:in `cache'
activerecord (2.3.8) lib/active_record/query_cache.rb:28:in `call'
activerecord (2.3.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/Users/username/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/hoptoad_notifier-2.3.2/lib/hoptoad_notifier/rack.rb:27:in `call'
actionpack (2.3.8) lib/action_controller/failsafe.rb:26:in `call'
rack (1.1.0) lib/rack/lock.rb:11:in `call'
rack (1.1.0) lib/rack/lock.rb:11:in `synchronize'
rack (1.1.0) lib/rack/lock.rb:11:in `call'
actionpack (2.3.8) lib/action_controller/dispatcher.rb:114:in `call'
actionpack (2.3.8) lib/action_controller/reloader.rb:34:in `run'
actionpack (2.3.8) lib/action_controller/dispatcher.rb:108:in `call'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/utils.rb:252:in `safe_fork'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:163:in `start'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/Users/username/.rvm/gems/ree-1.8.7-2010.02/gems/passenger-2.2.15/bin/passenger-spawn-server:61
>> If you are using Rails 2.3, please also include:
>> Your boot.rb file
# Don't change this file!
# Configure your app in config/environment.rb and config/environments/*.rb
RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
module Rails
class << self
def boot!
unless booted?
preinitialize
pick_boot.run
end
end
def booted?
defined? Rails::Initializer
end
def pick_boot
(vendor_rails? ? VendorBoot : GemBoot).new
end
def vendor_rails?
File.exist?("#{RAILS_ROOT}/vendor/rails")
end
def preinitialize
load(preinitializer_path) if File.exist?(preinitializer_path)
end
def preinitializer_path
"#{RAILS_ROOT}/config/preinitializer.rb"
end
end
class Boot
def run
load_initializer
Rails::Initializer.run(:set_load_path)
end
end
class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end
end
class GemBoot < Boot
def load_initializer
self.class.load_rubygems
load_rails_gem
require 'initializer'
end
def load_rails_gem
if version = self.class.gem_version
gem 'rails', version
else
gem 'rails'
end
rescue Gem::LoadError => load_error
$stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
exit 1
end
class << self
def rubygems_version
Gem::RubyGemsVersion rescue nil
end
def gem_version
if defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION
elsif ENV.include?('RAILS_GEM_VERSION')
ENV['RAILS_GEM_VERSION']
else
parse_gem_version(read_environment_rb)
end
end
def load_rubygems
require 'rubygems'
min_version = '1.3.1'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
end
rescue LoadError
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end
def parse_gem_version(text)
$1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
end
private
def read_environment_rb
File.read("#{RAILS_ROOT}/config/environment.rb")
end
end
end
end
#Add the config code for bundler
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!
>> Your preinitializer.rb file
#this is for bundler
begin
require "rubygems"
require "bundler"
rescue LoadError
raise "Could not load the bundler gem. Install it with `gem install bundler`."
end
if Gem::Version.new(Bundler::VERSION) <= Gem::Version.new("0.9.24")
raise RuntimeError, "Your bundler version is too old for Rails 2.3." +
"Run `gem install bundler` to upgrade."
end
begin
# Set up load paths for all bundled gems
ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
Bundler.setup
rescue Bundler::GemNotFound
raise RuntimeError, "Bundler couldn't find some gems." +
"Did you run `bundle install`?"
end
>> Your environment.rb file
# Be sure to restart your server when you modify this file
#make unicode friendly
$KCODE = 'u'
# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
ENV['RAILS_ENV'] ||= 'production'
#RAILS_ENV = 'development'
# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
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.
# See Rails::Configuration for more options.
#setup gems
#TODO: figure out how to get paths of glory to work with bundler
#config.gem 'paths_of_glory', :lib => false #implementation of badges
# Make Active Record use UTC-base instead of local time
config.active_record.default_timezone = :utc
#Define US Eastern timezone for the application
#config.time_zone = "Eastern Time (US & Canada)"
#Define GMT timezone for the application
config.time_zone = "UTC"
# Skip frameworks you're not going to use (only works if using vendor/rails).
# To use Rails without a database, you must remove the Active Record framework
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
# Only load the plugins named here, in the order given. By default, all plugins
# in vendor/plugins are loaded in alphabetical order.
# :all can be used as a placeholder for all plugins not explicitly named
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/extras
# Force all environments to use the same logger level
# (by default production uses :info, the others :debug)
# config.log_level = :debug
# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
config.action_controller.session = {
:session_key => '_app_session_id'
}
# 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')
config.action_controller.session_store = :active_record_store
#configure ip spoofing protection to be off
#config.action_controller.ip_spoofing_check = false
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment