diff --git a/config/application.rb b/config/application.rb index 87f80a1a22d001f665ccb0d8c642753b8a7c1785..e3c13ad267276e9bd60ac8ed08a3d2787d8f259a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -4,6 +4,14 @@ require File.expand_path('../boot', __FILE__) +# Needed for versions of ruby 1.9.2 that were compiled with libyaml. +# They use psych by default which doesn't handle having a default set of parameters. +# See bug #1120. +require 'yaml' +if RUBY_VERSION.include? '1.9' + YAML::ENGINE.yamler= 'syck' +end + require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. diff --git a/config/boot.rb b/config/boot.rb index 4d71749774560caeafbefb7329e7ff877e60ce55..fe6375db2584ca700986b7ccabc6bb6e6d4fcdc6 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -14,10 +14,4 @@ rescue Bundler::GemNotFound => e STDERR.puts e.message STDERR.puts "Try running `bundle install`." exit! -end if File.exist?(gemfile) - -# Use older yaml parser to fix issues with -# db:create and db:migrate failing with empty database -# See bug #1120 -require 'yaml' -YAML::ENGINE.yamler= 'syck' \ No newline at end of file +end if File.exist?(gemfile) \ No newline at end of file diff --git a/db/migrate/20110603233202_drop_aspects_open.rb b/db/migrate/20110603233202_drop_aspects_open.rb index 7cef9e57e089a7327bd2d2c58a91dc33d6b117b8..6bf015561327a1f96cee17e36d92c7fed12b8777 100644 --- a/db/migrate/20110603233202_drop_aspects_open.rb +++ b/db/migrate/20110603233202_drop_aspects_open.rb @@ -1,5 +1,5 @@ class DropAspectsOpen < ActiveRecord::Migration - require 'db/migrate/20110202015222_add_open_to_aspects' + require File.join(Rails.root, "db", "migrate", "20110202015222_add_open_to_aspects") def self.up AddOpenToAspects.down end