LoginSignup
3
3

More than 5 years have passed since last update.

Vagrantのubuntu/trusty64にRuby2.2.4とRailsとMySQLを入れる

Posted at

※最低限のものの他に自分が必要なものが入ってます

$ vagrant init ubuntu/trusty64
$ vagrant up --provider virtualbox
$ vagrant ssh

$ sudo apt-get update
$ sudo apt-get install -y git
$ sudo apt-get install -y libssl-dev
$ sudo apt-get install -y libsqlite3-dev
$ sudo apt-get install -y nodejs
$ sudo apt-get install -y libreadline-dev

$ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

$ source ~/.bash_profile

$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

$ rbenv install 2.2.4
$ rbenv rehash
$ rbenv global 2.2.4

$ gem install bundler
$ gem install rails --no-ri --no-rdoc

$ sudo apt-get install mysql-server
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