Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Problems on migrating from Ruby 1.8 to 1.9
Search
elitau
May 16, 2012
Programming
1
520
Problems on migrating from Ruby 1.8 to 1.9
Problems encountered on migration simfy codebase from ruby 1.8 to 1.9
Talk for @colognerb
elitau
May 16, 2012
Tweet
Share
More Decks by elitau
See All by elitau
Feature Toggles
elitau
0
480
Testbarkeit (in Ruby)
elitau
0
66
Testing Best Practices
elitau
2
480
Other Decks in Programming
See All in Programming
15年目のiOSアプリを1から作り直す技術
teakun
0
580
並行開発のためのコードレビュー
miyukiw
2
2.1k
2026/02/04 AIキャラクター人格の実装論 口 調の模倣から、コンテキスト制御による 『思想』と『行動』の創発へ
sr2mg4
0
660
Rubyと楽しいをつくる / Creating joy with Ruby
chobishiba
0
200
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
140
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
200
Raku Raku Notion 20260128
hareyakayuruyaka
0
430
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
380
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
280
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
100
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
13
7.6k
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Ethics towards AI in product and experience design
skipperchong
2
210
The Limits of Empathy - UXLibs8
cassininazir
1
240
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
360
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
The Spectacular Lies of Maps
axbom
PRO
1
580
sira's awesome portfolio website redesign presentation
elsirapls
0
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
71
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
50k
Prompt Engineering for Job Search
mfonobong
0
180
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Transcript
PROBLEMS ON MIGRATING FROM RUBY 1.8 TO 1.9 SEIT 2012
@hurx github.com/elitau
ENCODING • Each and every String needs an Encoding •
# encoding: UTF-8 • http://stackoverflow.com/questions/3291017/how-can-i-avoid- putting-the-magic-encoding-comment-on-top-of-every-utf-8- file-in • https://github.com/m-ryan/magic_encoding • http://blog.grayproductions.net/articles/ ruby_19s_three_default_encodings
LOAD PATHS • Ruby 1.9 removed “.” from load paths
• It was deemed a "security" risk • File.expand_path(__FILE__) • require_relative • require './filename' • http://stackoverflow.com/questions/2900370/why-does- ruby-1-9-2-remove-from-load-path-and-whats-the-alternative
MD5 • md5 module is gone • instead of MD5
it is now Digest::MD5
DEBUGGER • https://github.com/cldwalker/debugger • works with 1.9.2 and 1.9.3
YAML PARSING • Psych (the new ruby YAML parser) is
stricter with syntax • Fix your YAMLs • Dirty fix: in config/boot.rb require 'yaml' YAML::ENGINE.yamler = 'syck' • http://stackoverflow.com/questions/4980877/rails-error- couldnt-parse-yaml
PARSEDATE • Ruby 1.8 has a Parsedate module, gone in
1.9 • use Date.parse instead • http://stackoverflow.com/questions/4724417/ruby-where-has- parsedate-gone-in-1-9
CASE SYNTAX • Colons do not work in 1.9 anymore
• when ‘foo’ : ‘bar’ • when :foo then :bar
ARRAY.TO_S • ree-1.8.7-2011.03> [1,2,3].to_s => "123" • 1.9.3p125> [1,2,3].to_s =>
"[1, 2, 3]" • Do not use implicit conversions • Better: [1,2,3].join(‘’)
MORE RESOURCES • http://www.rubyinside.com/19walkthrough/ 19$, 3 hours, Screencast • http://www.google.com/search?q=ruby+1.8+1.9+difference