Skip to content

Instantly share code, notes, and snippets.

@ardeearam
Created February 19, 2015 17:13
Show Gist options
  • Save ardeearam/b20a48ab10b0e7458c74 to your computer and use it in GitHub Desktop.
Save ardeearam/b20a48ab10b0e7458c74 to your computer and use it in GitHub Desktop.
# If you are running JRuby, and want to access AWS SQS via the AWS-SDK for Java,
# it's not as straightforward as it seems. There are JAR dependencies that need to be met
# before you can invoke SQS.
require 'java'
require 'jar/aws-java-sdk-1.9.20.1.jar'
require 'jar/commons-logging-1.2.jar'
require 'jar/jackson-databind-2.3.1.jar'
require 'jar/jackson-core-2.5.0.jar'
require 'jar/jackson-annotations-2.5.0.jar'
require 'jar/httpcore-4.4.jar'
require 'jar/httpclient-4.4.jar'
import('com.amazonaws.services.sqs.AmazonSQSClient')
sqs = AmazonSQSClient.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment