After gem install aws-sdk-core
, you will get an error if you execute code that reads only the following:
Could you tell me where to find the cause or how to solve it?
require 'rubygems'
require 'aws-sdk-core'
↓Error Message
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `gem_original_require':/usr/local/lib/ruby/gems/1.8/gems/jmespath-1.0.2/lib/jmespathematter.rb.rb:expector: 37: expector: expector:
...File.open(path, 'r', encoding: 'UTF-8') {|f|f.read})
^
/usr/local/lib/ruby/gems/1.8/gems/jmespath-1.0.2/lib/jmespath.rb:37:syntax error, unexpected')', expecting kEND
...(path, 'r', encoding: 'UTF-8') {|f|f.read})
^
/usr/local/lib/ruby/gems/1.8/gems/jmespath-1.0.2/lib/jmespath.rb:37:syntax error, unexpected '}', expecting kEND
...oding: 'UTF-8') {|f|f.read})
^
from/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `require'
from s3_test.rb:2
The versions are as follows:
#ruby-v
=>ruby 1.8.6 (2010-09-02 patchlevel420) [i686-linux]
Ruby's running version is out of date, so it doesn't seem to support the new hash notation.
Note: http://qiita.com/yukimura1227/items/8c972efb27667dfac5cd#2-3
First, upgrade the Ruby version (at least 1.9 or higher, preferably the latest 2.2.2) and try again.
581 PHP ssh2_scp_send fails to send files as intended
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
914 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.