There are a few examples I have found online, but it took quite a while for me to get all the information I needed to actually make this work. So here is everything that I was able to find to get Cucumber up and running.

Start by creating a new folder for the project. Doesn’t really matter where you put this folder, but try keep things organised. Create a new folder called features and inside make a “sample”.feature file that contains the feature which is just a simple description

Here is the most common sample that has been floating around the web.


So the first thing you can do is attempt to run this file. You should get back errors, but at least you now know that everything is set-up and working correctly.

Cucumber sample.feature

This will give back 4 errors because the steps for this have not been implemented yet. Copy and paste the suggested empty stubs that cucumber returns and paste them into a .rb file. If you are using a standard windows command shell, you can right click on the window and click “mark”. This allows you to highlight text in the command shell window. This file needs to be put inside a folder called step_definitions. eg. myproject/features/step_definitions/steps.rb

Rerun the same feature and the result will be different. It should give an error for the first step telling you there has been no code implemented and then it will skip the rest of the tests.

Go back to the steps.rb file and now you can add some ruby code to the stubs that will successfully do what was described in the above scenario. Once this code has been added all of the codes will pass and uoi will be looking at a nice screen of green.


The default command prompt doesn’t allow for users to copy and paste text to and from the command shell. This can be really annoying if you don’t know how to get around this. In order to copy and paste content from a command shell window you can right click on the shell and use the mark option. This is not nearly as good as actually being able to copy and paste normally. Using mark will cause the line breaks to show up in place of the word wrapping.

Right click on the open window and select “mark”.
You will now be able to highlight text using your mouse cursor.
Once you have it selected, right click on the text and it will be saved to the clip board.


mark shell window

Upgrading to PHP 5.6 should be a quick and easy, but as most of us have experienced first hand, things don’t always go smoothly. If you are doing this on a live web server then I suggest you put all your sites into maintenance mode before doing anything here. If you don’t do this you could end up dumping raw php code onto the users screen which could be bad bad news if the wrong kind of person sees it. It can be risky doing this if you aren’t too sure what you are doing, but ya gotta do what ya gotta do!

PHP 5.6 is not supported officially, so you are going to need to use a 3rd party repo. There is no need to worry about this, it’s perfectly safe. Start by setting up the repo, by executing one of the following commands, depending on whatever version of CentOS or RHEAL you are using.

You now have things setup to install PHP 5.6 (easy right!). Before you install you should remove older versions of PHP to avoid any conflicts. You may still get conflicting plugins, but they are easy to sort once you know you are correctly running the latest version. So lets remove the current version of PHP.
!!!WARNING!!! This install is quick, but make sure you you have apache either disabled or any websites in maintenance mode. Your database info and raw php code may be served to the users browser if php is not installed when the request is made. Stopping apache is the quickest way around this, but a maintenance site is best advised.

The star will remove everything you have installed that is related to php. You will be reinstalling everything for php 5.6 after this so everything will be fine.

Now that any older PHP libraries and plugins are removed we can install the latest version of PHP. Before you do this make sure you aren’t running anything like cPanel that does not support this version of PHP. You shouldn’t have any issues if you keep your system up to date.

If you want to install any additional PHP libraries you can do so using yum, but make sure you specify “php56w” and not “php” on its own. You should know already what libraries you use, if you don’t know you will eventually get errors that should be easy to fix. If there are issues that mbstring or any php library is not installed you can install it by typing “php56w-name-of-lib”. Here are some sample libraries that you might need.

Missing dependencies after installing??
You will likely have some missing dependencies after the upgrade. There is no need to worry, you can reinstall them nice and easy. For example, after the upgrade you discover that scripts are failing when they try to process images. There is a good chance that it’s because the image GD library is missing. Running “yum install php56w-gd” will install the package and the errors will go away. The same applies to any other error messages you might be coming across for missing dependencies.

Installing Laravel is a simple setup, but it seems like a lot of simple things also go wrong and if you don’t know how to handle them it can get quite difficult to figure out what is the cause and how to fix it. One of the most common errors you are going to come across is “Laravel: command not found”. There is no need to worry! This error is common even if you have installed everything correctly. Nothing is actually wrong just a small quick fix.

On the official tutorial for Laravel, you will come across the following message that throws quite a few people off.
“Make sure to place the ~/.composer/vendor/bin directory in your PATH so the Laravel executable is found when you run the Laravel command in your terminal.” This means place the location of Laravel to your PATH file so that you can use the Laravel command. If you don’t do this you will see the following when you run a Laravel command.

I’m going to assume that you have used composer to install Laravel. If not then you will need to update the path below to the location of Laravel on your system. Everything else will remain the same. So the issue here is that the PATH file does not know where Laravel is installed. All you have to do is update PATH so that it knows where Laravel is.

I’m going to break this down a bit just in case you haven’t used composer to install Laravel. $PATH: contains the current contents of the PATH file. This is required so you don’t overwrite the current contents of the PATH. The content after PATH is the location of Laravel. If you use composer it is most likely installed in your users directory. e.g. “/root/.composer/vendor/bin”. You can change the directory to whatever directory you have Laravel installed to. The code below should work if you installed Laravel with composer.

You should now be able to use Laravel commands regardless of your working directory. To test if this is working, retry the following command.

When using SVN via command line you can view the details of previous revisions by viewing the SVN log. Call the log along with the number of revisions you want to have returned to you will display the message left when the file was committed, number of lines changed, user, date and a few other details. Ideally you would have access to a GUI tool such as tortoise SVN which will give you a much more feature rich log along with the ability to compare current revisions with past revisions.

In order for this to work you need to be in the directory of an SVN checkout. If you do this in a directory that is not a SVN folder you will get an error message due to an unrecognized directory.

If you want to display everything within a specific date range you can use the following

If you want to list everything (may not be all that good of an idea if you have a huge amount of revisions).

Ascending Order

Descending Order

In most cases Apaches log file will be located in “/var/log/httpd”, but this isn’t always the case. If you have checked this directory and the file is not present then you will have to check Apaches “httpd.conf” file in order to find out where it is writing the log files to. Alternatively use grep to find the location of the file.

There are 2 ways to open log files. Either a static view of the file or a live auto updating view of the log file. The following code can apply to any log file, it is not specific to Apache. You can replace the path variable to open any other log file for the same effect.

Display static contents of the log file.

Get live feed of from the log file. This will display the last few entries and update the command shell output as more data is written to the log file.