Btw, for any other onlooker, sorry for the broken link, it should have been
GitHub - teohm/rackbox-cookbook: Setup a Rack-based application server to run Unicorn & Passenger apps.. For more background, now that I'm on my
computer, here's the
articlehttp://teohm.github.io/blog/2013/04/17/chef-cookbooks-for-busy-ruby-developers/where
the author presents his trio of cookbooks {app,rack,data}box.
Cassiano, to answer your specific question: I also looked around a bit
before it clicked.
Thishttps://github.com/teohm/rackbox-cookbook/blob/a755b46dfc6be5996b06ed11fd255557dc9e2e3c/recipes/ruby.rb#L16is
the only gem installed by the cookbook. Then either Unicorn or
Passenger
are installed as gems from each project's Gemfiles
Now the reason why the Passenger installation as a project gem works out,
is that the cookbook then starts Passenger
standalonehttps://github.com/teohm/rackbox-cookbook/blob/a755b46dfc6be5996b06ed11fd255557dc9e2e3c/templates/default/sv-passenger-run.erb#L9instead
of having it as an Apache or nginx module
Now it may not work for everyone*, but I find the approach pretty nice in
that it makes things much simpler to get going.
For the record, I personally decided on Unicorn for my current project. All
my app boxes are dedicated to one single app, so I didn't need Passenger's
flexibility. So your mileage may vary with this approach.
Mat
- Having Passenger standalone download the nginx source and compiling it
every time you update the gem may not be everyone's cup of tea...
--
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
LinkedInhttp://ca.linkedin.com/in/mathieumartin/,
follow me on twitter @webmat http://twitter.com/webmat, or check out my
blog at programblings.comhttp://www.programblings.com?utm_source=email+signature
.
If you're a tech person, the following may make sense to you.
I'm the author of
git_remote_branchhttps://rubygems.org/gems/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
On Fri, May 10, 2013 at 8:54 PM, Cassiano Leal cassianoleal@gmail.comwrote:
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,
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,
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: bundle_wrapper.rb · GitHub
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 LinkedInhttp://ca.linkedin.com/in/mathieumartin/,
follow me on twitter @webmat http://twitter.com/webmat, or check out my
blog at programblings.comhttp://www.programblings.com?utm_source=email+signature
.
If you're a tech person, the following may make sense to you.
I'm the author of git_remote_branchhttps://rubygems.org/gems/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