Skip to content

Instantly share code, notes, and snippets.

@QB
Last active August 29, 2015 14:24
Show Gist options
  • Save QB/c7b22831bcd766e6cfc1 to your computer and use it in GitHub Desktop.
Save QB/c7b22831bcd766e6cfc1 to your computer and use it in GitHub Desktop.
Ubuntuの環境構築が面倒くさすぎるので、自分用の環境をすぐ作れるようにまとめておいた。

Ubuntu環境構築

Ubuntuの環境構築が面倒くさすぎるので、自分用の環境をすぐ作れるようにまとめておいた。

とりあえずVagrantで仮想マシンを作る

この記事に書いてある方法でおk

OSの一覧

便利なコマンド

$ dpkg --list #インストールされているパッケージの一覧
$ uname -a #OSの情報を調べる

最低限必要なもの

$ sudo apt-get install vim emacs24 tree git mecab

rbenvの準備

$ sudo apt-get update
$ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
$ cd
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

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

rbenvがインスコできたら

$ rbenv install -v 2.2.2
$ rbenv global 2.2.2

などのようにすればRubyの準備は完了なので、あとはruby -v等で確認。

$ sudo gem install mechanize twitter bundle rake sinatra sinatra-contrib rails haml sass mecab

必要そうなgemをインストールしたら終了。

Herokuの準備

$ wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh

公開鍵の準備

$ ssh-keygen

GitHub、Herokuぐらいに登録しておけば大丈夫かな。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment