Skip to content

Instantly share code, notes, and snippets.

@chadrien
Last active March 19, 2019 00:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadrien/c609cb8a0d06203aa7b3 to your computer and use it in GitHub Desktop.
Save chadrien/c609cb8a0d06203aa7b3 to your computer and use it in GitHub Desktop.
Install mailcatcher on AlwaysData
#!/bin/bash
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
rbenv install 1.9.3-p551
rbenv global 1.9.3-p551
gem install --no-ri --no-rdoc mailcatcher -v0.5.12
rbenv rehash
#!/bin/bash
cd $HOME/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/mailcatcher-0.5.12/
sed -i \
-e 's/\/javascripts\//\/mail\/javascripts\//' \
-e 's/\/favicon/\/mail\/favicon\//' \
-e 's/\/stylesheets\//\/mail\/stylesheets\//' \
views/index.haml
sed -i \
-e 's/\/messages/\/mail\/messages/' \
./public/javascripts/application.js
cd -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment