add rmagick

This commit is contained in:
2016-02-29 23:57:57 +08:00
parent 8ea2dd75fd
commit 20081d7d61
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -83,6 +83,7 @@ gem 'font-awesome-rails', '~> 4.4'
gem "sentry-raven" #, :github => "getsentry/raven-ruby"
gem "paranoia", "~> 2.0"
gem 'faraday'
gem 'rmagick'
group :development do
gem 'capistrano'
+2
View File
@@ -302,6 +302,7 @@ GEM
rest-client (1.7.3)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
rmagick (2.15.4)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
@@ -446,6 +447,7 @@ DEPENDENCIES
rails_12factor
redis (~> 3.2.1)
rest-client
rmagick
rspec-rails (~> 3.0)
rspec-sidekiq
rvm1-capistrano3
+2
View File
@@ -5,6 +5,8 @@ class Api::V1::OcrController < ApplicationController
API_URL = 'http://apis.baidu.com/idl_baidu/baiduocrpay/idlocrpaid'
def index
img = Magick::Image.read('/Users/twer/Desktop/1.jpg')
ap img
image_base_str = Base64.strict_encode64(IO.read('/Users/twer/Desktop/1.jpg'))
# conn = Faraday.new(:url => API_URL) do |faraday|
# faraday.request :url_encoded