Using Ruby 2.0 on Amazon OpsWorks
Asked Answered
A

4

5

I'd like to use Ruby 2.0 on Amazon OpsWorks, so I'm trying the following:

This doesn't seem to have any effect, though.

  • Do custom cookbooks override their built in counterparts?
  • Does OpsWorks use the Ruby recipe from the cookbook for basic Ruby setup?
  • The same question applies to Nginx too - can I control versions and settings by changing my fork for the cookbooks?
Akkerman answered 20/5, 2013 at 12:43 Comment(0)
R
3

OpsWorks now fully supports Ruby 2.0, in Layer settings you can specify the version of Rails, Bundler and Rubygems.

OpsWorks Screenshot

Reportorial answered 2/12, 2013 at 20:36 Comment(0)
I
16

Opsworks already has support for Ruby 2.0, it's just not exposed through the UI. However, you can easily enable it by simply passing in the following custom JSON

{
  "opsworks" : {
    "ruby_version" : "2.0.0"
  }
}

That's it! No need to install any custom packages or anything.

Immanent answered 3/9, 2013 at 1:34 Comment(3)
That's awesome... will check it out. Is there some documentation for this and the other available options?Akkerman
Thank you very much for this, this should've been the questions answer because this actually works, you can even see that the AWS cookbooks show Ruby 2.0.0 support github.com/aws/opsworks-cookbooks/blob/master-chef-11.4/ruby/…Darbee
@SudhirJonathan Documentation on Ruby top-level attributes docs.aws.amazon.com/opsworks/latest/userguide/…Soucy
R
3

OpsWorks now fully supports Ruby 2.0, in Layer settings you can specify the version of Rails, Bundler and Rubygems.

OpsWorks Screenshot

Reportorial answered 2/12, 2013 at 20:36 Comment(0)
M
0

OpsWorks distributes some of their packages their own and Ruby 2.0 is not part of it right now. If you want to use Ruby 2.0 you have to install it your own.

Best, Daniel

Mychal answered 24/6, 2013 at 14:5 Comment(2)
To clarify, I don't even think Debian has included the 2.0 packages as of this writing. And I think Amazon Linux is based on Debian.Akkerman
It's not, it's based on RHEL. And yes, there are no official .deb packages right now out there. But in this special case if you use OpsWorks cookbooks you would only get amazon maintained packages.Mychal
H
0

Deploy ruby 2.0 with rails 4.0 on AWS opsworks

update stack json

{ "opsworks" : { "ruby_version" : "2.0.0" } }

update the rails app layer.

in your 'Rails App Layer', make sure you upgraded rubygem version to be 2.X (default is 1.8.24)

otherwise you will getting the require mysql2/mysql.rb [loadError] :(

LoadError: cannot load such file -- mysql2/mysql2

Herd answered 9/10, 2013 at 23:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.