Skip to content
Mirv edited this page May 20, 2019 · 13 revisions

Install order

ruby on rails into windows file system

mscode

  • in compiler after you setup project space, save the project settings as file
  • add extensions for ruby, rails ... this is just the hook, not installer though

virtualbox

vagrant for virtualbox

cygwin

  • curl
  • rvm to handle ruby versions
  • bash
  • git
  • pip
  • python
  • ansible

return to ms code

verify installed

  • ruby -v, rails -v, bundler -v (gem install bundler it)
  • install issue found ...
  • gem install libv8 -v '{insert version}' -- --with-system-v8 fixes v8 install issues on win7 bundle install
  • it also seems to require having python installed - which is in C:\Cygwin64\bin for me due to cygwin as dl tool
  • gem install sqlite3 too
  • comment out ruby racer

aids & shortcuts

Win7

Set PATH=%PATH%;(your new path);

pip2 # forget pip Included C:\curl;C:\Cygwin\bin

need ansible to be in path now for the deploy

Bash needs to be wrapped for env/path so do ' "$PATH" ' without 's

Steps:

gem list bcrypt | cut -d" " -f1 | xargs gem uninstall -aIx


Remove:

/src/test_remove/*


Test -

Ansible - touch doesn't works in home (under base setup tasks, command) Next fake - rake or bash script to install ansible?

installing ansible

sudo apt-get update && sudo apt-get install software-properties-common
 - no effect since packages are new already from provisioning?
sudo apt-add-repository ppa:ansible/ansible
 - had to hit enter to dl 
 sudo apt-get update && sudo apt-get install ansible

rails

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
#  - had to y to continue

setup ruby install env

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

ruby install

rbenv install -v 2.2.3
rbenv global 2.2.3

disable logging to save time on gems

echo "gem: --no-document" > ~/.gemrc

gem install bundler
gem install rails
rbenv rehash

javascript for parts of rails

sudo add-apt-repository ppa:chris-lea/node.js
-  enter to continue

setup install files for node now

sudo apt-get update

run install of node

sudo apt-get install nodejs
-  Y to continue

ruby, rails, node, python, ansible

Success!


Phase 4 - virtubox with dual servers

Phase 5 - can i vagrant a virtualbox which brings up another virtualbox with ansible?


Ansible box controller -

$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible

Ansible ad - hoc Ansible host groups 2.0 versus below

Tests:

incremented ... IP, port, natdnshostresolver1 (then without natdns), reverted to no natdnshost, IP 2 off from first box, second tried just 2nd vm box & this worked - did ansibler start after - perhaps memory issue

  • no, but it's port issue if they are same - changed port's host 10122 to 10123 - success
targetbox.vm.network :private_network, ip: "192.168.100.187"
targetbox.vm.network :forwarded_port, guest: 23, host: 10123, id: "ssh"

config.vm.boot_timeout = 500