-
Notifications
You must be signed in to change notification settings - Fork 0
Installation from Ubuntu Image
- [Install](Installation from Ubuntu Image#install)
- [Prepare the VM](Installation from Ubuntu Image#prepare-the-vm)
- [Setup the LocalSupport development environment](Installation from Ubuntu Image#setup-the-localsupport-development-environment)
- [Run locally](Installation from Ubuntu Image#run-locally)
- [Run tests](Installation from Ubuntu Image#run-tests)
The following procedure can be used to install the LocalSupport development environment from a clean version of Ubuntu 12.04LTS. Make sure your computer has a good connection to the Internet throughout the installation as many packages are downloaded throughout the install procedure.
- Download the 32-bit Ubuntu 12.04 image from:
- Download and install the appropriate version of Oracle’s VirtualBox for your system (your system is the “host.”):
- Open VirtualBox and create a new virtual machine using Ubuntu 12.04:
- Click “New” to create a new machine
- Name: “LocalSupport”; Type: Linux; Version: Ubuntu
- Memory Size: Allocate a minimum of 1024MB. If you plan to use RubyMine, 2GB or more are recommended. (But remember that memory allocated to the virtual machine will not be available to your host computer while the VM is running.)
- Create a Virtual Hard Drive
- Choose VDI (Virtual Disk Image)
- Choose Dynamically Allocated
- Choose the hard disk space you want to allocate (20GB is good. More is better, especially if you might use this VM for other projects.)
- Now that the LocalSupport Virtual Machine (VM) is created, install Ubuntu 12.04.3 LTS (precise Pangolin):
- Click on and start the LocalSupport VM
- When prompted to choose a hard drive, browse to and select the Ubuntu iso file (downloaded previously)
- When you reach the Welcome window - choose “Install Ubuntu”
- Select “Erase Disk and Install Ubuntu” (Don’t worry - it’s only erasing and installing your virtual machine, not your regular hard drive!)
- Click “Install now” and follow instructions.
- Install with updates and 3rd party options
- Get a coffee or a sandwich while you wait...
- Once on the Ubuntu desktop, add Terminal and Gedit icons.
- optionally: Set Gedit as default editor with "sudo update-alternatives --config editor"
- optionally: Remove OpenOffice and Ubuntu One icons from launcher and add Terminal and Gedit icons.
- Change terminal to run command as a login shell so that it would run the bash_profile and RVM and rails would work properly:
- Menu > Edit > Profile Preferences > Title and Command. (The menu in Ubuntu is located at the very top of the screen. Mouse over the top bar to make the menu appear)
- Check the box next to: Run command as a login shell
- Install VirtualBox Guest Additions:
- VirtualBox menu > Devices > Insert Guest Additions CD image...
- Follow the prompts
- Reboot the VM.
-
To download and run the initial setup script for your VM
-
Open a Terminal window and execute:
wget -q https://raw.github.com/pchokron/LocalSupport/clean-ubuntu-install/clean-ubuntu-install-1.sh
- Give the file execute permissions:
chmod u+x clean-ubuntu-install-1.sh
- Run the script:
./clean-ubuntu-install-1.sh
Get another coffee... Note: This process takes several minutes (approx. 10-45 minutes) and requires that you provide the password multiple times.
- Close all terminal windows and open a new terminal session.
- Fork the http://github.com/tansaku/LocalSupport repo (fork button at top right of github web interface)
- Clone your new forked repo onto your VM. Run the following from a terminal window:
git clone https://github.com/<yourname>/LocalSupport.git
- A new LocalSupport folder will be created. cd into LocalSupport:
cd LocalSupport
-
Download and run the app install script:
-
Download with wget:
wget -q https://raw.github.com/pchokron/LocalSupport/clean-ubuntu-install/clean-ubuntu-install-2.sh
- Change permissions
chmod u+x clean-ubuntu-install-2.sh
- Run the script
./clean-ubuntu-install-2.sh
Note: This process takes another several minutes (approx. 10-45 minutes) and requires that you provide the password multiple times. With this much coffee in your system, this will test your patience, you've been warned!
- You can now delete the downloaded shell scripts
rm clean-ubuntu-install-2.sh
rm ../clean-ubuntu-install-1.sh
- Add Web Developer Addon to firefox from https://addons.mozilla.org/en-US/firefox/addon/web-developer/
- Add Chromium icon to Launcher
- Run Ubuntu updates
If you hit problems, ask us on Skype.
In principle, you can run rails server and see that app running locally.
rails s
The db/seeds.rb task that the app install script ran added some organizations and a local admin user that you can experiment with. Read that file for more information.
Also you should run the specs and cucumber features to make sure your installation is solid. The test database was prepared in the app install script. Run tests using following commands:
bundle exec rake spec
bundle exec rake cucumber
and then when you start any BDD or TDD ensure autotest is running in the background:
bundle exec rake autotest