diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..6f1e41c8 --- /dev/null +++ b/Gemfile @@ -0,0 +1,10 @@ +# A sample Gemfile +source "http://rubygems.org" + +gem "rails", '2.3.2' + +gem 'mysql' +gem "fastercsv" +gem "prawn", '<=0.6.3' +gem 'haml', '>=2.0.6' +gem 'routing-filter', '0.0.1', :require => 'routing_filter' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..20860087 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,45 @@ +GEM + remote: http://rubygems.org/ + specs: + actionmailer (2.3.2) + actionpack (= 2.3.2) + actionpack (2.3.2) + activesupport (= 2.3.2) + activerecord (2.3.2) + activesupport (= 2.3.2) + activeresource (2.3.2) + activesupport (= 2.3.2) + activesupport (2.3.2) + fastercsv (1.5.4) + haml (3.0.25) + mysql (2.8.1) + prawn (0.6.3) + prawn-core (>= 0.6.3, < 0.7) + prawn-format (>= 0.2.3, < 0.3) + prawn-layout (>= 0.3.2, < 0.4) + prawn-security (>= 0.1.1, < 0.2) + prawn-core (0.6.3) + prawn-format (0.2.3) + prawn-core + prawn-layout (0.3.2) + prawn-security (0.1.1) + rails (2.3.2) + actionmailer (= 2.3.2) + actionpack (= 2.3.2) + activerecord (= 2.3.2) + activeresource (= 2.3.2) + activesupport (= 2.3.2) + rake (>= 0.8.3) + rake (0.8.7) + routing-filter (0.0.1) + +PLATFORMS + ruby + +DEPENDENCIES + fastercsv + haml (>= 2.0.6) + mysql + prawn (<= 0.6.3) + rails (= 2.3.2) + routing-filter (= 0.0.1) diff --git a/config/boot.rb b/config/boot.rb index 0ad0f787..13ccb5c2 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -106,5 +106,20 @@ module Rails end end +# Bundler requirements +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! diff --git a/config/environment.rb b/config/environment.rb index 32c61685..bcc2cf35 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -55,13 +55,13 @@ Rails::Initializer.run do |config| # config.gem "sqlite3-ruby", :lib => "sqlite3" # config.gem "aws-s3", :lib => "aws/s3" # - # library for parsing/writing files from/to csv-file - config.gem "fastercsv" - config.gem "prawn", :version => '<=0.6.3' - config.gem "haml", :version => '>=2.0.6' - config.gem "routing-filter", :lib => "routing_filter" + # config.gem "fastercsv" + # config.gem "prawn", :version => '<=0.6.3' + # config.gem "haml", :version => '>=2.0.6' + # config.gem "routing-filter", :lib => "routing_filter" # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths. + # library for parsing/writing files from/to csv-file # All files from config/locales/*.rb,yml are added automatically. # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')] config.i18n.default_locale = :de diff --git a/config/preinitializer.rb b/config/preinitializer.rb new file mode 100644 index 00000000..85399f7c --- /dev/null +++ b/config/preinitializer.rb @@ -0,0 +1,20 @@ +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 \ No newline at end of file