網頁

顯示具有 Redmine 標籤的文章。 顯示所有文章
顯示具有 Redmine 標籤的文章。 顯示所有文章

2014年10月20日 星期一

升級到 ruby 2.1 遇到 could not find a temporary directory

如果在升級 ruby 到 2.1 之後撞到這種錯誤訊息:
/usr/local/lib/ruby/2.1/tmpdir.rb:34:in `tmpdir': could not find a temporary directory (ArgumentError)
就把 /tmp 的 Sticky bit 加上去吧
chmod +t /tmp
最近怎麼老是被 server 咬呢 :~~

2014年10月15日 星期三

FreeBSD 上 uwsgi 的 Ruby plugin

卡了一下,發現他其實不會編出 rack_plugin.so ,老闆說他是參考這篇做的,所以簡單說就是:

cd /usr/ports/www/uwsgi
make patch
vim work/uwsgi-2.0.7/buildconf/default.ini
make install clean
這樣 uwsgi 就可以用 rack 惹
default.ini 目前長這樣:
[uwsgi]
main_plugin = python,rack,gevent
inherit = base

2014年7月31日 星期四

解決 redmine 透過 sendmail 送信結果被 google 擋掉的方法

本來是照著 redmine 官方的這篇 EmailConfiguration 做設定,後來不知道又為什麼死掉了,不小心看到直接把 sendmail 換成  SecureSSMTP 的方法,就做個紀錄。

從 redmine 的設定將 E-Mail 用 Google Apps 寄出:
  
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: 587
      domain: "your.domain"
      authentication: :plain
      user_name: "youraccount@your.domain"
      password: "yourpassword"

中間有個小插曲,因為 configuration.yml 的設定不可以用 tab ,而且有前後順序的問題,寫在上面的 production: 就是不會動,後來搬到 default: 裡面就好了。有遇到神秘現象的朋友可以看看是不是這問題。

一勞永逸直接把 sendmail 換成 SSMTP 之後設定檔改成這樣:
  
  email_delivery:
    delivery_method: :sendmail
    sendmail_settings:
      arguments: '-i'
後看一看 maillog 有這常運作的話就可以收工了。 這樣總不會又被 google 把信丟到黑洞裡去了吧.....。