Skip to content

Instantly share code, notes, and snippets.

@shageman
Created February 18, 2010 23:00
Show Gist options
  • Save shageman/308184 to your computer and use it in GitHub Desktop.
Save shageman/308184 to your computer and use it in GitHub Desktop.
diff --git a/Gemfile b/Gemfile
index e69de29..4da2bc8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -0,0 +1,43 @@
+source 'http://gemcutter.org'
+
+gem 'builder', '2.1.2'
+gem 'mysql', '2.8.1'
+
+gem 'tmail', '1.2.6'
+gem 'rails', '2.3.5', :require => nil
+gem 'capistrano', '2.5.14'
+
+gem 'will_paginate', '2.3.12'
+
+gem 'youtube-g', '0.5.0', :require => 'youtube_g'
+
+gem 'i18n', '0.3.3'
+gem 'translator', '1.0.0'
+gem 'tzinfo', '0.3.16'
+
+gem 'warden', '0.9.0'
+gem 'devise', '0.9.2'
+
+group :development do
+ gem 'ruby-debug'
+ gem 'mocha', '0.9.8'
+end
+
+group :production do
+ gem 'exception_notification'
+end
+
+group :test do
+ gem 'factory_girl', '1.2.3'
+
+ gem 'launchy', '0.3.5'
+ gem 'polyglot', '0.2.9'
+ gem 'database_cleaner', '0.4.3'
+ gem 'capybara', '0.3.0'
+ gem 'cucumber-rails', '0.2.4'
+ gem 'cucumber', '0.6.2'
+
+ gem 'rspec', '1.3.0'
+ gem 'pickle', '0.2.1'
+end
+
diff --git a/config/boot.rb b/config/boot.rb
index a577cce..aff9d6e 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -106,6 +106,19 @@ module Rails
end
end
+begin
+ # Require the preresolved locked set of gems.
+ require File.expand_path('../../.bundle/environment', __FILE__)
+rescue LoadError
+ raise RuntimeError, "You have not locked your bundle. Run `bundle lock`."
+
+ # Fallback on doing the resolve at runtime.
+ # This does not work with rails 2.3.5 as of bundler 0.9.5.
+ require "rubygems"
+ require "bundler"
+ Bundler.setup
+end
+
# All that for this:
Rails.boot!
diff --git a/config/preinitializer.rb b/config/preinitializer.rb
index e69de29..1945f45 100644
--- a/config/preinitializer.rb
+++ b/config/preinitializer.rb
@@ -0,0 +1,13 @@
+begin
+ # Require the preresolved locked set of gems.
+ require File.expand_path('../../.bundle/environment', __FILE__)
+rescue LoadError
+ raise RuntimeError, "You have not locked your bundle. Run `bundle lock`."
+
+ # Fallback on doing the resolve at runtime.
+ # This does not work with rails 2.3.5 as of bundler 0.9.5.
+ require "rubygems"
+ require "bundler"
+ Bundler.setup
+end
+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment