Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
mailcatcherのレシピ(gem eventmachineをダウングレードして動かす)
# Cookbook Name:: app
# Recipe:: mailcatcher
# Copyright 2015, YOUR_COMPANY_NAME
# All rights reserved - Do Not Redistribute
# rubyとgem は既に入っている想定
# ruby -v => 2.0.0p598
# gem -v => 2.0.14
# 下記 /usr/local/bin/gem 及び、IPは適宜書き換える
# mailcatcher install
# version 0.5.12
execute "mailcatcher install" do
user "root"
command "/usr/local/bin/gem install mailcatcher"
not_if "/usr/local/bin/gem list | grep mailcatcher"
# @link
execute "gem install eventmachine -v 1.0.3" do
user "root"
command "/usr/local/bin/gem install eventmachine -v 1.0.3"
not_if "/usr/local/bin/gem list | grep \"eventmachine (1.0.3)\""
execute "gem uninstall eventmachine -v 1.0.4" do
user "root"
command "/usr/local/bin/gem uninstall eventmachine -v 1.0.4"
only_if "/usr/local/bin/gem list | grep \"eventmachine (1.0.4\""
# start
execute "mailcatcher --http-ip" do
command "mailcatcher --http-ip"
not_if "ps aux | grep [m]ailcatcher"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment