ruby 1.9系でもgemのjsonを使っている
ujihisa opened this issue · comments
ujihisa commented
ruby 1.9系でもgemのjsonを使っているため、
/Users/ujihisa/git/ruby193/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
といった警告がでてしまいます。
以下のパッチで回避できました。
diff --git Gemfile Gemfile
index 7429a22..4188eed 100644
--- Gemfile
+++ Gemfile
@@ -4,7 +4,7 @@ source "http://rubygems.org"
gemspec
gem "oauth"
-gem "json"
+gem "json" if RUBY_VERSION < '1.9'
gem "hashie"
group :development do
diff --git tumblife.gemspec tumblife.gemspec
index 0da1003..c7c0906 100644
--- tumblife.gemspec
+++ tumblife.gemspec
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.rubyforge_project = "tumblife"
s.add_dependency("oauth")
- s.add_dependency("json")
+ s.add_dependency("json") if RUBY_VERSION < '1.9'
s.add_dependency("hashie")
s.files = `git ls-files`.split("\n")
Kazuya Takeshima commented
ありがとうございます。
私の環境では警告がでなかったものの
読み込まれてる json が標準ライブラリのものになってたことを確認しました。
上記パッチ適当させて頂きました。