環境:
Ubuntu 14.04
Nginx
MySQL
passenger
rbenv
參考步驟:
1.主要:Deploy Ruby On Rails on Ubuntu 14.04 Trusty Tahr
2.輔助:setup production development
PYTHON、UBUNTU、MAC、CMS
Ubuntu 14.04
Nginx
MySQL
passenger
rbenv
1.主要:Deploy Ruby On Rails on Ubuntu 14.04 Trusty Tahr
2.輔助:setup production development
解決在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”
以前在Rails4 使用bootstrap2.3 沒有這樣問題,升級到bootstrap3.2 卻發生照官方文件引入icons卻無法順利顯示,只顯示方塊。
跑去bootstrap-sass的github查看了一下文件,引入以下原始碼就完成!
$subl app/assets/stylesheets/application.css.scss
@import "bootstrap-sprockets"; @import "bootstrap";
備註:
application.css
記得改成application.css.scss
不然還是無法顯示icon
不過網站從bootstrap2.3升級到bootstrap3.2,幾乎整個網站都得重寫過,改變很大!
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
Ubuntu 14.04
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).
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
Setup Ruby On Rails on Ubuntu 14.04 Trusty Tahr
move from rvm to rbenv