Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2.rb is not compatible with ruby-1.9.x #112

Closed
davetchen opened this issue May 4, 2012 · 3 comments
Closed

ec2.rb is not compatible with ruby-1.9.x #112

davetchen opened this issue May 4, 2012 · 3 comments

Comments

@davetchen
Copy link

Hi, I'm trying to use appoxy/aws in a new project with Rails 3.2 and ruby-1.9.3-p125
and am getting an error on launch_instances()

Cannot find the method "to_a" in:
/usr/local/rvm/gems/ruby-1.9.3-p125@rails32x/bundler/gems/aws-62f71d007b5b/lib/ec2/ec2.rb:535:in `launch_instances'

We had no problems with an older project using ruby-1.8.7
Thanks for the gem and your help!

@davetchen
Copy link
Author

I found a (relatively) simple solution by changing

str.to_a

To:

str.lines.to_a

throughout the file.

@treeder
Copy link
Member

treeder commented May 5, 2012

Can you give us a pull request?

@davetchen
Copy link
Author

Hi treeder, I found a simpler work-around by making sure to call

EC2.launch_instances("ami-12345678", :group_ids => ["permissions"])

rather than

EC2.launch_instances("ami-12345678", :group_ids => "permissions")

It seems for ruby-1.9.x it is safer to pass in an Array at all times. I'll go ahead and Close this issue for now.
Thanks!
-dave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants