てぃーだブログ › Ruby 勉強会 › ruby環境のセットアップ(メモ)

ruby環境のセットアップ(メモ)

2016年05月10日


■rbenvをシステムワイドにインストールする
http://office.tsukuba-bunko.org/ppoi/entry/systemwide-rbenv

### rbenvを使ったrubyのインストール方法
sudo rbenv install -l
sudo rbenv install 2.1.5
sudo rbenv global 2.1.5
ruby -v


■.gemrcの--no-ri, --no-rdocの書き方新旧
http://qiita.com/atakigawa/items/5debe1c351ee9a51ed3d

### /root/.gemrc
install: --no-document
update: --no-document


■環境設定(bashの例)
### ~/.bash_profile
export RBENV_ROOT="//img02.ti-da.net/usr/local/rbenv"
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)”


■サンプルコード
cd /tmp
rails new myapp -TB
cd myapp
bundle install
rails g scaffold blog title content:text
rake db:migrate
rails s -b 0.0.0.0
# open http://192.168.1.1:3000/blogs/


タグ :ruby


Posted by kanedayo at 18:28│Comments(0)
上の画像に書かれている文字を入力して下さい
 
<ご注意>
書き込まれた内容は公開され、ブログの持ち主だけが削除できます。