Skip to content
Extraits de code Groupes Projets
Valider ba9df599 rédigé par Sarah Mei's avatar Sarah Mei
Parcourir les fichiers

Fix migration for ruby 1.9. Move YAML check into application.rb, and add guard for ruby 1.8.x.

parent f0eeb175
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -4,6 +4,14 @@ ...@@ -4,6 +4,14 @@
require File.expand_path('../boot', __FILE__) 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' require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems # If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production. # you've limited to :test, :development, or :production.
......
...@@ -14,10 +14,4 @@ rescue Bundler::GemNotFound => e ...@@ -14,10 +14,4 @@ rescue Bundler::GemNotFound => e
STDERR.puts e.message STDERR.puts e.message
STDERR.puts "Try running `bundle install`." STDERR.puts "Try running `bundle install`."
exit! exit!
end if File.exist?(gemfile) end if File.exist?(gemfile)
\ No newline at end of file
# 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
class DropAspectsOpen < ActiveRecord::Migration 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 def self.up
AddOpenToAspects.down AddOpenToAspects.down
end end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter