Sometimes in a newly created server you can get this error when starting a ruby app:
`encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)To fix simple export this variables or add to your ~/.bash_profile
export LANG=en_US.UTF-8| # Rails 4 Application Template | |
| # Remove normal files we don't want | |
| remove_file "README.rdoc" | |
| remove_file "public/index.html" | |
| remove_file "app/assets/images/rails.png" | |
| # Copy database.yml to sample | |
| inside "config" do | |
| run "cp database.yml database.yml.sample" | |
| end |
| #!/bin/sh | |
| # | |
| backupdir="./pg_backups" | |
| pgdump_args="-bF c" | |
| pgdumpall_globals_args="" | |
| pg_backup() { | |
| if [ ! -d ${backupdir} ]; then | |
| echo Creating $backupdir |
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.0.0.rc1' |
| gem 'koala' | |
| gem 'bitly', '~> 0.8.0' | |
| gem 'twitter' |
| group :production do | |
| gem 'unicorn' | |
| # Enable gzip compression on heroku, but don't compress images. | |
| gem 'heroku-deflater' | |
| # Heroku injects it if it's not in there already | |
| gem 'rails_12factor' | |
| end |
| #app/inputs/collection_check_boxes_input.rb | |
| class CollectionCheckBoxesInput < SimpleForm::Inputs::CollectionCheckBoxesInput | |
| def item_wrapper_class | |
| "checkbox-inline" | |
| end | |
| end |
| source 'https://rubygems.org' | |
| gem 'rails', '~>4.0.2' | |
| gem 'activerecord-session_store' | |
| gem 'pg' | |
| gem 'foreigner' | |
| gem 'airbrake' | |
| gem 'redcarpet' |
| convertPostGisToYandex = (point) -> | |
| coords = /POINT\s*\(\s*([0-9\.]+)\s*([0-9.]+)\s*\)/.exec point | |
| if coords.length != 2 | |
| console.error 'Bad parse PostGIS point data', point | |
| return [] | |
| return [parseFloat(coords[1]), parseFloat(coords[2])] |
| lastActionTime = new Date() | |
| syncInterval = 30000 | |
| $('*').on 'blur change click dblclick error focus focusin focusout hover keydown keypress keyup load mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup resize scroll select submit', -> | |
| lastActionTime = new Date() | |
| setInterval (-> | |
| currentTime = new Date() | |
| timeLimit = currentTime - lastActionTime |
Sometimes in a newly created server you can get this error when starting a ruby app:
`encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)To fix simple export this variables or add to your ~/.bash_profile
export LANG=en_US.UTF-8