Skip to content

Instantly share code, notes, and snippets.

@bvajda
Created August 13, 2011 12:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bvajda/1143798 to your computer and use it in GitHub Desktop.
Save bvajda/1143798 to your computer and use it in GitHub Desktop.
ruby/rails tips, tricks, solutions

Ruby and Rails Tips, Tricks and Solutions

  • 'normalize_yaml_input' error might be caused by wrong locale settings.

    # CLI
    locale
    # => "LC_ALL ="
    export LC_ALL="en_US" # (or your locale of choice)
    
  • "merge!': can't convert nil into Hash" error in Rails 3.1. Rails 3.1 uses Psych as a yaml parser. Change it back to syck:

    # config/application.rb
    YAML::ENGINE.yamler = "syck"
  • Remove database from rails 3: comment out

    # config/application.rb
    require "active_record/railtie"
  • `normalize_yaml_input' error: see rubygems/rubygems#149

    export LC_ALL="en_US"
    export LANG="ISOD-8859-1"
    
  • 'Warning: NLS_LANG is not set. fallback to US-ASCII.' when using oracle_enhanced:

    # in the Oracle database:
    select userenv('language') from dual; # => e.g. 'AMERICAN_AMERICAN.WE8ISO8859P15'
    # config/boot.rb
    ENV['NLS_LANG'] = 'AMERICAN_AMERICA.WE8ISO8859P15'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment