How to setup a development environment for Ruby on Ubuntu

You will execute Ruby scripts(written in a text editor like Sublime Text) from the terminal or you can use a full fledged IDE like Aptana Studio.

Below are the steps to install Ruby and its related IDE on Ubuntu.

Ruby Installation

  • Install Ruby using the command below.

sudo apt-get install ruby full

  • Verify the ruby install by running the next command on the terminal.

ruby -v

You will get an output like: ruby 2.3.3p222 (2016-11-21) [x86_64-linux-gnu]

 

Install the IDE: Aptana Studio

  • Download Aptana Studio for Linux from this site. A file like Aptana_Studio_3_Setup_Linux_x86_64_3.6.1.zip will be saved to your local Downloads folder.
  • Create an Applications folder inside your home directory.
  • Extract the contents of the above zip file to this Applications directory.
  • Create a link to the file AptanaStudio3 and move it the the desktop.
  • Double-click to launch Aptana Studio.

Screenshot at 2018-02-18 20-35-15

 

 

Advertisements

Windows Subsystem for Linux – install Ubuntu with xfce

Here are the steps to install Ubuntu on Windows 10 using Windows Subsystem for Linux (WSL).

  • On Windows 10, go to Settings.
  • Type insider and press enter.
  • Activate the developer mode.

2018-02-09 22_22_22-Settings

  • Still the Settings panel, type Windows Features. From the drop down, select Turn Windows Features on or off.

2018-02-09 22_29_42-Windows Features

  • Click on the Windows Start menu icon and type bash. Press Enter.

2018-02-09 22_31_46-C__Windows_System32_bash.exe

Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Windows Store:
https://aka.ms/wslstore
Press any key to continue…

2018-02-09 22_37_30-Microsoft Store

  • Click on Ubuntu.

2018-02-09 22_38_59-Microsoft Store

  • Click on Get.

This slideshow requires JavaScript.

  • Once installed, click on Launch.
  • Type a username and password.

This slideshow requires JavaScript.

  • Once you get to the terminal prompt, type the following commands.

sudo apt-get update
sudo apt-get upgrade

Now, the terminal bash can be run on Windows.

2018-02-10 09_47_40-pravin@DESKTOP-S7EGKR1_ _mnt_c_Windows_System32

Now to install xfce, follow the following steps.

  • On the bash terminal type the command below.

sudo apt install xfce4

  • In case there are errors, rerun the same command to continue the installation.

 

  • Edit the .bashrc file as follows.

nano .bashrc

  • Append the line below.

export DISPLAY=:0.0

  • Once done, go to the website https://sourceforge.net/projects/vcxsrv/.
  • Download the installer, the latest at this time is vcxsrv-64.1.19.6.0.installer.exe
  • Double-click and install the program.
  • Start XLaunch from the Windows desktop shortcut.

2018-02-09 23_35_14-Display settings

  • Choose “One large window” option.

2018-02-09 23_36_44-Client startup

  • Leave the default options and choose Disable access control.

2018-02-09 23_36_56-Extra settings

  • Click on Next and finish.

2018-02-09 23_37_42-Finish configuration

A black window will appear. Do not close it. This is the application window in which Ubuntu will run.

  • Go back to the bash terminal and type the next command.

xfce4-session

 

2018-02-10 10_09_00-pravin@DESKTOP-S7EGKR1_ _mnt_c_Windows_System32

The XLaunch window will show the Ubuntu with the xfce Display Manager.

2018-02-10 10_09_21-VcXsrv Server - Display DESKTOP-S7EGKR1_0.0

 

Note: I got some errors. So, I installed the xubuntu desktop with the command below.

sudo apt-get install xubuntu-desktop -y

The application menu bar does not start.

Open the bash terminal inside ubuntu and type the command below.

xfce4-panel &

2018-02-10 10_17_30-VcXsrv Server - Display DESKTOP-S7EGKR1_0.0

Close the bash terminal.

Now you can use the Applications menu without any problems.

2018-02-10 10_23_30-Mail