When you exeucte gem command, you may see SSL error like bellow.

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

This error is produced because of changes in rubygems.org infrastructure.

How to solve it?

1. Downlaod update package

Download update package from bellow link.

Download : rubygems-update-2.6.7.gem

2. Update RubyGems using Command Prompt

Execute Command Prompt and go to download folder. (ex. C:)

And execute bellow command.

C:\>gem install --local C:\rubygems-update-2.6.7.gem
C:\>update_rubygems --no-ri --no-rdoc

After this, execute gem --version to check new version of RubyGems.

3. Uninstall rubygems-update gem

You can uninstall rubygems-update gem.

C:\>gem uninstall rubygems-update -x
Removing update_rubygems
Successfully uninstalled rubygems-update-2.6.7

Reference

To make development environment in programmers computer, There are so many applications which have to install.

But If we use Virtual development environment, we can install thoese applications to separeted operating system and also can manage per project.

1. Download and Install Vagrant

Vagrant is a tool for building complete developemnt environment.

Go to Download Page and install to your computer.

2. Download and Install VirtualBox

Go to Download Page and install to your computer.

3. Initialize Vagrant to Your Project

Scotch Box gives preconfigured Vigrant Box with a full array of LAMP Stack features. So we will use Scotch Box to prepare development environment.

3.1. Initialize Vagrant

$ vagrant init

Above command will make Vagrantfile file.

3.2. Setup `Vagrantfile’ file

You can edit Vagrantfile made by 3.1 by manual. Or just copy and pate from https://github.com/scotch-io/scotch-box.

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

    config.vm.box = "scotch/box"
    config.vm.network "private_network", ip: "192.168.10.100"
    config.vm.hostname = "my-project"
    config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]
    
    # Optional NFS. Make sure to remove other synced_folder line too
    #config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }

end

Update ip address and synced_folder to matching your project. Basically scotch-box uses /var/www/public folder as a document root of web server. So if your root folder is the main of web page, you have to set synced_folder to /var/www/public.

4. Run Vagrant

Run vigrant using bellow command:

$ vagrant up

5. Connet SSH

Connect ssh using bellow command:

$ vagrant ssh

6. Adding MSSQL Connection Support

By default, scotch-box doesn’t support MSSQL connection. So, if you want to connect to MSSQL exeucte bellow command:

$ sudo apt-get update
$ sudo apt-get php5-sybase

7. Enjoy Development

All done, You can connect virtual web server using ip address or hostname you defined in Vagrantfile.

Reference

/ ip firewall filter
add chain=input protocol=tcp dst-port=22 src-address-list=ssh_blacklist action=drop comment="Drop SSH Brute Forcers" disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage3 action=add-src-to-address-list address-list=ssh_blacklist address-list-timeout=1d comment="" disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage2 action=add-src-to-address-list address-list=ssh_stage3 address-list-timeout=1m comment="" disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new src-address-list=ssh_stage1 action=add-src-to-address-list address-list=ssh_stage2 address-list-timeout=1m comment="" disabled=no
add chain=input protocol=tcp dst-port=22 connection-state=new action=add-src-to-address-list address-list=ssh_stage1 address-list-timeout=1m comment="" disabled=no
/ ip firewall filter
add chain=input protocol=tcp dst-port=21 src-address-list=ftp_blacklist action=drop comment="Drop FTP Brute Forcers" disabled=no
add chain=input protocol=tcp dst-port=21 connection-state=new src-address-list=ftp_stage3 action=add-src-to-address-list address-list=ftp_blacklist address-list-timeout=1d comment="" disabled=no
add chain=input protocol=tcp dst-port=21 connection-state=new src-address-list=ftp_stage2 action=add-src-to-address-list address-list=ftp_stage3 address-list-timeout=1m comment="" disabled=no
add chain=input protocol=tcp dst-port=21 connection-state=new src-address-list=ftp_stage1 action=add-src-to-address-list address-list=ftp_stage2 address-list-timeout=1m comment="" disabled=no
add chain=input protocol=tcp dst-port=21 connection-state=new action=add-src-to-address-list address-list=ftp_stage1 address-list-timeout=1m comment="" disabled=no
/ ip firewall filter
add chain=input protocol=tcp dst-port=23 src-address-list=telnet_blacklist action=drop comment="Drop Telnet Brute Forcers" disabled=no
add chain=input protocol=tcp dst-port=23 connection-state=new src-address-list=telnet_stage3 action=add-src-to-address-list address-list=telnet_blacklist address-list-timeout=1d comment="" disabled=no
add chain=input protocol=tcp dst-port=23 connection-state=new src-address-list=telnet_stage2 action=add-src-to-address-list address-list=telnet_stage3 address-list-timeout=1m comment="" disabled=no
add chain=input protocol=tcp dst-port=23 connection-state=new src-address-list=telnet_stage1 action=add-src-to-address-list address-list=telnet_stage2 address-list-timeout=1m comment="" disabled=no
add chain=input protocol=tcp dst-port=23 connection-state=new action=add-src-to-address-list address-list=telnet_stage1 address-list-timeout=1m comment="" disabled=no