Skip to content

Instantly share code, notes, and snippets.

@falcon8823
Created April 23, 2012 15:57
Show Gist options
  • Save falcon8823/2471861 to your computer and use it in GitHub Desktop.
Save falcon8823/2471861 to your computer and use it in GitHub Desktop.
Rails mail receiver(postfix + rvm + bundler)
#!/usr/bin/env bash
app_home=/path/to/app
ruby_home=/path/to/rvm/gems/ruby-1.9.3-p0@bundler
bundle_path=$ruby_home/bin/bundle
export GEM_HOME=$ruby_home
export PATH=/path/to/rvm/bin:$ruby_home/bin:$PATH
cd $app_home
rvm 1.9.3@bundler do bundle exec script/rails runner 'HogehogeMailer.receive(STDIN.read)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment