文章

[Ubuntu] 設置rails的deploy環境

環境:

Ubuntu 14.04
Nginx
MySQL
passenger
rbenv

參考步驟:

1.主要:Deploy Ruby On Rails on Ubuntu 14.04 Trusty Tahr
2.輔助:setup production development

閱讀更多

[Linux] 修改ubuntu的locale設定

緣由:

解決在Ubuntu14.04環境下的ls: error initializing month strings錯誤訊息。

設定過程:

$ sudo nano /etc/default/locale

修改LC_TIME這個欄位。

LANG=”zh_TW.UTF-8″
LANGUAGE=”zh_TW:zh:en_US:en”
LC_NUMERIC=”zh_TW”
LC_TIME=”zh_TW.UTF-8
LC_MONETARY=”zh_TW”
LC_PAPER=”zh_TW”
LC_NAME=”zh_TW”
LC_ADDRESS=”zh_TW”
LC_TELEPHONE=”zh_TW”
LC_MEASUREMENT=”zh_TW”
LC_IDENTIFICATION=”zh_TW”

[MySQL] 更改預設編碼成UTF-8

前由:

MySQL預設編碼為latin1,但我希望建立新的tables時,預設編碼為utf8_unicode_ci連線校對。

環境:

Ubuntu 14.04
MySQL 5.5

設定過程:

$ sudo nano /etc/mysql/my.cnf

在[client]區塊加入
default-character-set = utf8

把[mysqld]區塊加入
character-set-server = utf8
collation-server = utf8_unicode_ci

[Rilas4] 從rvm轉到rbenv的過程

環境:

Ubuntu 14.04

操作過程:

1. 刪除RVM

rvm implode
其他注意事項:

Note you may need to manually remove /etc/rvmrc and ~/.rvmrc and ~/.rvm if they exist still.
Please check all .bashrc .bash_profile .profile and .zshrc for RVM source lines and delete or comment out if this was a Per-User installation.
Also make sure to remove ‘rvm’ group if this was a system installation.
Finally it might help to relogin / restart if you want to have fresh environment (like for installing RVM again).

2. 簡單兩步驟安裝rbenv

First you install rbenv, and then ruby-build

$ cd ~
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ exec $SHELL

$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
$ exec $SHELL

$ rbenv install 2.1.2
$ rbenv global 2.1.2
$ ruby -v

3. 參考網址:

Setup Ruby On Rails on Ubuntu 14.04 Trusty Tahr
move from rvm to rbenv

[Linux]在ubuntu13.10安裝Cinnamon2.0

2013-12-26-120626

我的工作很常有機會用到Linux,使用的發行版是Ubuntu。

不過一般都使用它的server版,因為只要使用ssh連進去機器,不管要設定還是新增檔案都很方便,就不安裝x-windows來將大部分效能都留給server。

後來入手了一台Macbook air 2013,更是將所有的工作都使用Macbook air處理,無論寫程式、作網站、教學備課方面..還是使用Macbook air比較順手。Ubuntu部分只有架設server和backup的時候才會上場。

閱讀更多