[chef] Re: Re: application_ruby cookbook and rbenv


Chronological Thread 
  • From: Cassiano Leal < >
  • To:
  • Subject: [chef] Re: Re: application_ruby cookbook and rbenv
  • Date: Fri, 10 May 2013 21:54:08 -0300

Hi Mathieu,

Thanks for sharing. I don't see where passenger or unicorn get installed there, though. Is that done elsewhere in your workflow?

Does anyone have a working example of a cookbook where a specific version of Ruby gets installed, then all gems and other Ruby stuff uses that in a sane way? It seems like there's some rocket science involved to do this with Chef, whereas if I do it manually on a server it's a breeze (install rbenv and ruby, set the global ruby version and voilĂ !).

What am I missing? I must be missing something very obvious here, can anyone point me to it? :)

Thanks,
- cassiano

On Friday, May 10, 2013 at 19:14, Mathieu Martin wrote:

Hey Cassiano,

Not sure if this will apply to application_ruby, but you can see effective use of rbenv and both Unicorn and Passenger in github.com/teohm/rackbox.

Hope this helps,

Mat

On Friday, May 10, 2013, Cassiano Leal wrote:
Hi Graham,

As I said on IRC, your solution doesn't seem to apply to passenger.

I'm installing rbenv and Ruby using the rbenv cookbook found in the community site. It has an Ohai plugin that correctly reports my rbenv-installed Ruby in languages[:ruby], yet the gem still gets installed to the system Ruby, and when mod_rails tries to compile it uses that as well.

I'm very curious to understand how are people configuring and deploying Rails applications with Chef. If anyone can share how they're doing it, I'd appreciate that.

Thanks,
- cassiano

On Friday, May 10, 2013 at 15:02, Graham Christensen wrote:

Hi Cassiano,

I actually had to figure this out just today, but for Unicorn. I decided on creating a bundle wrapper script which sources the environment. see this gist for the wrapper: https://gist.github.com/grahamc/ea63999829ed220923cc

Unicorn allows passing in a custom bundler command which I did: 


  unicorn do
    bundler true
    bundle_command "#{base_dir}/bundle_wrapper.sh"
  end

I'm not sure if passenger has something similar which you can take advantage of.

-- 
Graham Christensen

On Friday, May 10, 2013 at 1:57 PM, Cassiano Leal wrote:

The content of the message has not been downloaded yet.





--

--

I'm the founder of Rock Solid Ops Inc, a web consultancy.

My main fields of expertise are Ruby on Rails web development, DevOps and a bit of mobile. If you need help scaling, understanding, securing or managing your web infrastructure (Rails or not), get in touch!

Connect with me and read testimonials on my LinkedIn, follow me on twitter @webmat, or check out my blog at programblings.com.

If you're a tech person, the following may make sense to you.

I'm the author of git_remote_branch. A tool that's been helping common mortals like me share git branches for 5 years. Downloaded 50 000 times.

I've also contributed to some of the popular libraries in the Rails, jQuery and PhoneGap ecosystems:

paperclip, active_admin, jquery-ujs, jquery-rails, kaminari, AssetSync, phonegap-plugin-facebook-connect, shoulda, woulda, jeweler.

If you visit them on GitHub, you'll see my face in the "Contributors" section :-)





Archive powered by MHonArc 2.6.16.

§