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
510
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
460
Testbarkeit (in Ruby)
elitau
0
64
Testing Best Practices
elitau
2
460
Other Decks in Programming
See All in Programming
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.4k
品質ワークショップをやってみた
nealle
0
870
CSC305 Lecture 13
javiergs
PRO
0
340
Software Architecture
hschwentner
6
2.4k
Making Angular Apps Smarter with Generative AI: Local and Offline-capable
christianliebel
PRO
0
100
テーブル定義書の構造化抽出して、生成AIでDWH分析を試してみた / devio2025tokyo
kasacchiful
0
360
Register is more than clipboard
satorunooshie
1
330
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
10
2k
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
47k
퇴근 후 1억이 거래되는 서비스 만들기 | 내가 AI를 사용하는 방법
maryang
2
310
Blazing Fast UI Development with Compose Hot Reload (Bangladesh KUG, October 2025)
zsmb
2
440
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
480
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
44
8k
RailsConf 2023
tenderlove
30
1.3k
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
A better future with KSS
kneath
239
18k
Music & Morning Musume
bryan
46
6.9k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Raft: Consensus for Rubyists
vanstee
140
7.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
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