Posts Tagged Tutorial

How to safely kill rails WEBrick server running in daemon mode

Ruby on rails and the WEBrick Daemon are great for testing however there are times when you start a WEBrick server in daemon mode and later find you need to stop this without restarting the box. This can sometimes be troublesome, especially if you accidently kill a live server. In this tutorial I’ll go through ensuring you kill the correct process. Read the rest of this entry »

, , , , , , , , , , , , ,

No Comments

Ruby On Rails, dynamic table’s & add button using nested_attributes

So here’s the problem, you want to create several items that belong to one item, normally you would just the the has_many and belongs_to (OneToMany) relation in rails. Using this model you create the primary model (such as purchase order) then create several sub items (such as item) and attach them to the primary model. The problem with this is its time consuming and does not always make sense to do things this way, take the Purchase order and Items scenario, it makes much more sense to create the Purchase order and assciated Items in the same form. This is possible in rails uing nested_attributes.

Read the rest of this entry »

, , , , ,

No Comments

Installing Ruby on Rails Ubuntu 12.04 LTS using RVM and Ruby 1.9.3

Ruby Rails is a Web application framework created in 2004 intended as a rapid development web framework that runs the Ruby programing language. The latest version of the Ruby is ‘Ruby 1.9.2‘ and was realised in August 2011, it brings many new features and bug fixeses. The most signifiant changes are Block local variables, An additional lambda syntax, Per-string character encodings are supported and a new New socket API (IPv6 support). You can find a great walkthrough of all the new features at Ruby Inside. coinciding with the release of Ruby 1.9 is the Rails 3.1 framework which requires Ruby 1.8.7 or higher. RubyonRails 3.1 brings many new features, most notably: jQuery as default, HTTP Streaming, a new assets pipeline powered by Sprockets 2.0. So this is all good stuff and I’m sure you want to be working with the latest version of Ruby and RubyonRails, especially if you setting up a new server. Read the rest of this entry »

, , , , , , , , , , , ,

4 Comments

How To Install Ruby on Rails Ubuntu Server 11.10

Ruby Rails is a Web application framework created in 2004 intended as a rapid development web framework. It was intended to emphasize Convention over Configuration (CoC) meaning the developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called sales by default. It is only if one deviates from this convention, such as calling the table “products sold”, that the developer needs to write code regarding these names. It has also been designed around the “Don’t repeat yourself” principle. Both of these ways of thinking allow you, with Ruby Rails, to create excellent, dynamic websites very quickly. So to get started we need to setup a Ruby Rails development server on Ubuntu (Ubuntu 11.04, Ubuntu 11.10) Read the rest of this entry »

, , , , , , , , , , , , ,

1 Comment

Installing and Configuring Nagios Ubuntu 11.04

Nagios Logo

Nagios is the Industry Standard Network Monitoring Engine. OK great so what’s that mean, well Nagios is a server that monitors your hosts and services and will inform you if something goes wrong and when it is fixed again. It can monitor network services, host resources and even network probes such as temperature and moisture.

These features as well as many more make Nagios, by far, the most complete open-source Network Monitoring tool on the market, however with all these features comes complexity and Nagios has obviously been designed with the experienced Network Administrator in mind. But don’t worry too much, its not that difficult to learn as long as you take it one step at a time, and in today’s tutorial we’re going to look at the first step, actually getting it installed Read the rest of this entry »

, , , , , , , , , ,

No Comments

Setting up FTP for your website Ubuntu 11.04

File Transfer Protocol (FTP) is a standard network protocol used to transfer files from one host to another over a TCP-based network, such as the Internet. Its most common use is uploading your website files to your webserver, allowing you to develop your website, upload it via FTP then refresh the page to see the updated page. If you’re setting up your own webservers its essential you have some way of uploading files and the best way to do this is with FTP. First you need to setup and configure an ftp server on your webserver, in this tutorial we are going to be using ProFTP. ProFTPD is a proven, high-performance and scalable FTP server, with a focus toward simplicity, security, and ease of configuration. Read the rest of this entry »

, , , , , , , , , , ,

No Comments

Nagios Memeory Check Plugin – download & install

When I noticed that Nagios had no memory check plugin I decided to make a simple bash plugin for Nagios to check how much memory my machines were using. It works by reading /proc/meminfo so it should work on every system were you can read /proc/meminfo (most Linux and Unix based systems) Read the rest of this entry »

, , , , , , , , , , , ,

No Comments

Backup Gmail on Linux

In this tutorial I am going to discuss how to backup your Gmail emails to your own computer. Now personally I trust Google and keep allot of data on their services, but when it comes to emails I like to be doubly sure. It’s extremely rare but on occasion even Gmail has some problems, for example read this news article about some data loss at Gmail. When I read this I thought, “dam what would I do if I lost my emails“, well that scared the hell out of me, I’m always going back though old emails to find information (password, email addr’s, phone numbers, etc..) and this important information is only stored in my emails. So following the rule that “data only exists if its stored in three places” I thought I would add my own step to Google’s backup solution, just to be safe, and this is how I did it. Read the rest of this entry »

, , , , , , , , , , ,

No Comments

Ubuntu Rsync Tutorial (ubuntu)

Rsync is a great lightweight backup utility for Linux and windows, its selling point over other backup solutions is that it only copies the diffs of the files that have changed, therefore only transmitting the bare minimum of data. This makes it great for running backups into the cloud & to over internet services.

Rsync has two modes, daemon & client. The Rsync server runs in daemon mode, this listens for requests on port 873 and can serve these requests in Rsync’s own protocol or via remote shell (RSH or SSH), thus making it a very secure way to backup your files. The Rsync client is pretty simple and normally runs as a simple executable. What makes Rsync more remarkable is its huge array of features, to name a few: Read the rest of this entry »

, , , , , , , , , ,

No Comments

Can I connect to an amazon instance and create more instances?

Can I connect to an amazon instance and create more instances? I have heard this question several times now and the answer is yes. You are limited to running 20 On-Demand and 100 Spot Instances per region with Amazon EC2. If that not enough for you then you’ll need to file a Request to Increase the EC2 Instance Limit, to use more instances.

Each instance is basically a virtual machine running on amazons infrastructure, and each instance is allocated its own address allowing you to connect to it. Because each instance runs independently you can connect to as many as you want simultaneously. Read the rest of this entry »

, , , , , , , , , , , , ,

No Comments