Skip to content

Instantly share code, notes, and snippets.

@MeanderingCode
Created November 5, 2011 22:11

Revisions

  1. MeanderingCode revised this gist Nov 5, 2011. No changes.
  2. MeanderingCode created this gist Nov 5, 2011.
    67 changes: 67 additions & 0 deletions gistfile1.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    diff --git a/config/environment.rb b/config/environment.rb
    index 1fc8f03..246951b 100644
    --- a/config/environment.rb
    +++ b/config/environment.rb
    @@ -2,11 +2,26 @@
    # Uncomment below to force Rails into production mode

    # (Use only when you can't set environment variables through your web/app server)
    -# ENV['RAILS_ENV'] = 'production'
    + ENV['RAILS_ENV'] = 'production'
    +
    +if ENV['RAILS_ENV'] == 'production'
    + ENV['GEM_HOME'] = '/home/user/.rvm/gems/ruby-1.8.7-p352'
    + ENV['GEM_PATH'] = '/home/user/.rvm/gems/ruby-1.8.7-p352:/home/user/.rvm/gems/ruby-1.8.7-p352@global' + ':/usr/lib/ruby/gems/1.8'
    + ENV['BUNDLE_PATH'] = '/home/user/.rvm/gems/ruby-1.8.7-p352'
    +end

    # Bootstrap the Rails environment, frameworks, and default configuration
    require File.join(File.dirname(__FILE__), 'boot')

    +if ENV['RAILS_ENV'] == 'production'
    + ENV['GEM_HOME'] = '/home/user/.rvm/gems/ruby-1.8.7-p352'
    + ENV['GEM_PATH'] = '/home/user/.rvm/gems/ruby-1.8.7-p352:/home/user/.rvm/gems/ruby-1.8.7-p352@global' + ':/usr/lib/ruby/gems/1.8'
    + ENV['BUNDLE_PATH'] = '/home/user/.rvm/gems/ruby-1.8.7-p352'
    +end
    +
    +require 'rubygems'
    +Gem.clear_paths
    +
    require 'yaml'
    SITE_CONFIG = YAML.load_file(File.join(File.dirname(__FILE__), 'site.yml'))

    @@ -74,6 +89,8 @@ end

    # Include your application configuration below

    +require 'bundler'
    +Bundler.require

    require 'name_part_finder'
    require 'tracks/todo_list'
    diff --git a/config/initializers/mongrel_workaround.rb b/config/initializers/mongrel_workaround.rb
    index dcad693..bc32e4e 100644
    --- a/config/initializers/mongrel_workaround.rb
    +++ b/config/initializers/mongrel_workaround.rb
    @@ -13,7 +13,8 @@ begin
    end
    end

    -mongrel115 = check_mongrel_around_115
    +#mongrel115 = check_mongrel_around_115
    +mongrel115 = false

    if Rails.version == '2.3.14' && mongrel115 && self.class.const_defined?(:Mongrel)

    diff --git a/config/preinitializer.rb b/config/preinitializer.rb
    index a6b4d1e..6fc36c4 100644
    --- a/config/preinitializer.rb
    +++ b/config/preinitializer.rb
    @@ -13,6 +13,7 @@ end
    begin
    # Set up load paths for all bundled gems
    ENV["BUNDLE_GEMFILE"] = File.expand_path("../../Gemfile", __FILE__)
    + Gem.clear_paths
    Bundler.setup
    rescue Bundler::GemNotFound
    raise RuntimeError, "Bundler couldn't find some gems." +