3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

勉強用にrails4インストール済みのbox作った (ubuntu13.10)

Last updated at Posted at 2013-11-01

前回作ったboxを元にインストール手順の通りインストールし、画面が表示されました。
インストールにちょっと時間がかかったのでbox化しときます。

ダウンロード

Saucy64_rails4_VirtualBox4.3.box 787MB

box名をsaucyとする。

box作り方メモ
$ vagrant init saucy
$ vim Vagrantfile で、以下記入
config.vm.network :forwarded_port, guest: 3000, host: 3000
$ vagrant up
# ここでrails4のインストールを行った。
$ vagrant halt
$ vagrant package (今の状態でpackage.boxを作成)

rails4インストール手順

ruby2.0

必須パッケージインストール
$ sudo apt-get update
$ sudo apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev
rvmでのインストール
$ sudo apt-get install -y libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
$ curl -L https://get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
$ rvm install 2.0.0-p247
$ rvm use 2.0.0-p247 --default
$ ruby -v
$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
gitの設定
$ git config --global color.ui true
$ git config --global user.name "tukiyo"
$ git config --global user.email "tukiyo3@gmail.com"
$ ssh-keygen -t rsa -C "tukiyo3@gmail.com"
# https://github.com/settings/ssh にアクセスしてid_rsa.pubの中身を貼り付ける。
$ ssh -T git@github.com

rails4

$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install -y nodejs
$ gem install rails
$ rails -v

mysql

$ sudo apt-get install -y mysql-server mysql-client libmysqlclient-dev

動作確認

$ mkdir local && cd local
$ rails new myapp -d mysql
$ cd myapp
$ rake db:create
$ rails server

http://localhost:3000 にアクセス。

次すること

dotinstallでrails4の勉強

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?