diff --git a/.gitignore b/.gitignore index a2e30ec7..d15ab181 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,8 @@ config/amazon_s3.yml config/initializers/recaptcha.rb config/config.yml config/initializers/site_keys.rb + +vendor/bundler_gems/gems +vendor/bundler_gems/specifications +vendor/bundler_gems/doc +vendor/bundler_gems/environment.rb diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..62d7424a --- /dev/null +++ b/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +ruby "1.8.7" +gem "rails", "2.3.15" + +# dependencies +gem "mysql", "2.9.1" +gem "geokit-rails", "1.1.4" +gem "image_science", "1.2.6" +gem "recaptcha", "0.3.6" +gem "will_paginate", "2.3.16" +gem "oa-openid", "0.3.2" +gem "httparty", "0.11.0" +gem "RubyInline" +gem "rdoc" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..d4f8fbfe --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,68 @@ +GEM + remote: https://rubygems.org/ + specs: + RubyInline (3.12.3) + ZenTest (~> 4.3) + ZenTest (4.10.1) + actionmailer (2.3.15) + actionpack (= 2.3.15) + actionpack (2.3.15) + activesupport (= 2.3.15) + rack (~> 1.1.3) + activerecord (2.3.15) + activesupport (= 2.3.15) + activeresource (2.3.15) + activesupport (= 2.3.15) + activesupport (2.3.15) + geokit (1.8.5) + multi_json (>= 1.3.2) + geokit-rails (1.1.4) + geokit (>= 1.5.0) + httparty (0.11.0) + multi_json (~> 1.0) + multi_xml (>= 0.5.2) + image_science (1.2.6) + RubyInline (~> 3.9) + json (1.8.1) + multi_json (1.10.1) + multi_xml (0.5.5) + mysql (2.9.1) + oa-core (0.3.2) + oa-openid (0.3.2) + oa-core (= 0.3.2) + rack-openid (~> 1.3.1) + ruby-openid-apps-discovery (~> 1.2.0) + rack (1.1.6) + rack-openid (1.3.1) + rack (>= 1.1.0) + ruby-openid (>= 2.1.8) + rails (2.3.15) + actionmailer (= 2.3.15) + actionpack (= 2.3.15) + activerecord (= 2.3.15) + activeresource (= 2.3.15) + activesupport (= 2.3.15) + rake (>= 0.8.3) + rake (10.3.2) + rdoc (4.1.1) + json (~> 1.4) + recaptcha (0.3.6) + ruby-openid (2.5.0) + ruby-openid-apps-discovery (1.2.0) + ruby-openid (>= 2.1.7) + will_paginate (2.3.16) + +PLATFORMS + ruby + +DEPENDENCIES + RubyInline + geokit-rails (= 1.1.4) + httparty (= 0.11.0) + image_science (= 1.2.6) + mysql (= 2.9.1) + oa-openid (= 0.3.2) + rails (= 2.3.15) + rdoc + recaptcha (= 0.3.6) + will_paginate (= 2.3.16) diff --git a/config/environment.rb b/config/environment.rb index 46bb9456..f0278927 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -27,17 +27,22 @@ Rails::Initializer.run do |config| # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" # config.gem "sqlite3-ruby", :lib => "sqlite3" - config.gem "mysql", :version => '~> 2.9.1' - #config.gem "json_pure" - config.gem "httparty", :version => '~> 0.11.0' - config.gem "geokit-rails", :version => '~> 1.1.4' - #config.gem "RubyInline" - config.gem "image_science", :version => '~> 1.2.6' - #Configure at config/initializers/recaptcha.rb, copy from recaptcha.rb.example - config.gem "recaptcha", :lib => "recaptcha/rails" - #config.gem "exifr" # didnt use as incompatible with ruby 1.8.6 - config.gem 'will_paginate', :version => '~> 2.3.16' - config.gem 'oa-openid', :version => '~> 0.3.2' + # commented these out in order to use the Gemfile instead + # config.gem "mysql", :version => '~> 2.9.1' + # #config.gem "json_pure" + # config.gem "httparty", :version => '~> 0.11.0' + # config.gem "geokit-rails", :version => '~> 1.1.4' + # #config.gem "RubyInline" + # config.gem "image_science", :version => '~> 1.2.6' + # #Configure at config/initializers/recaptcha.rb, copy from recaptcha.rb.example + # config.gem "recaptcha", :lib => "recaptcha/rails" + # #config.gem "exifr" # didnt use as incompatible with ruby 1.8.6 + # config.gem 'will_paginate', :version => '~> 2.3.16' + # config.gem 'oa-openid', :version => '~> 0.3.2' + + # Directs bundler where to find our gems + require 'vendor/bundler_gems/environment.rb' # add dependencies to load paths + Bundler.require_env :optional_environment # require the files # config.gem "rubyzip" # if you're going to use Amazon s3 for image storage: diff --git a/config/preinitializer.rb b/config/preinitializer.rb new file mode 100644 index 00000000..a730dae3 --- /dev/null +++ b/config/preinitializer.rb @@ -0,0 +1,22 @@ +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.\n" + +"Run `gem 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.\n" + +"Did you run `bundle install`?" +end \ No newline at end of file