Monday, 26 August 2013

Solving "The requested URL was not found on this server."

In my busy schedule of multiple projects in Multiple programming languages, I upgraded my laptop and installed all the software's and tools needed in my day today programming. Having worked for about a month with the new laptop, mostly programming MSSQL SERVER and .NET 2012, I decided to finish my small payroll system I had started but never got the time to finish.

The project was in php using laravel 4 framework. So the first shock I got was when I attempted to load one of the pages and I got "The requested URL was not found on this server." I quickly checked apache error log and found the following error and which pointed me to the rewrite_module setting that I had not enabled.


And voila, my page opened. Hope this post helps someone else.

Sunday, 21 April 2013

MYSQL C# string and byte confusion

While creating an application with C# and MYSQL as the back end  i encountered a problem where I expected the c# to return value as a string but then ended up getting  a {byte[]} as the result.

To get around this issue, and after lots of googling, i discovered the problem could easily be sorted from the connection string. Just add  "respect binary flags=false;" in your connection string. i.e

Server=svrName;Database=dbName;Uid=Usrname;Pwd=pwdName;respect binary flags=false;

Monday, 20 February 2012

Unable to launch visual studio's localhost web server

I am not new to Microsoft’s development products and I have been using Visual studio for some time now. While developing a new web application project recently, I was shocked to see a pop up screen: “Unable to launch Visual Studio’s localhost Web server on port XXXX”.
I did some googling and found sites with useful information on how to get my development site up and running. There were many suggestions:
  • ·         Restart my computer
  • ·         Restarting Visual Studio
  • ·         Changing the port number etc.
Some even suggested I telnet, but then I thought telnet is not my thing. In all the suggestion I found on the net, only 1 worked. And it was actually very simple. The anti-virus on my machine was Node32. What the anti-virus was doing was setting visual studio as a web browser. The solution was very simple. Go to the Setup of ESET Nod32. Under the advanced program setting expand the web browsers tree. You will see a display like the one shown below:

Uncheck visual studio and you are good to go.

Friday, 2 September 2011

Installing Ruby


Installing ruby on rails is very easy. But don’t be mistaken, i made many errors before I finally managed to make it work.
Visit http://rubyonrails.org/download and download the latest rubyonrails windows installer. At the time of writing this article, it was 1.9.2. Download the rubygems zip files. You will find the download link on the same page.
Run the windows installer. After installing the ruby on rails, extract the rubygems and put them at an easy to find path e.g d:\ruby gems. Using the command prompt, navigate to the path where we have the setup.rb file. Then run :
D:\rubygems>Ruby setup.rb. You will see a screen like the one below.

Since ruby is now installed, we can now install all of Rails and its dependencies through the command line:
gem install rails
Congratulations, you have managed to install ruby on rails on your machine.


Thursday, 1 September 2011

My dreams with Ruby on Rails


When I heard about Ruby, I thought it was one of the Mexican soap opera that was airing on a Kenyan Television channel at the time. At the time, the ‘on rails’ part didn’t make any sense.

I ignored rails for some time until I landed on ‘Redmine’ when asked to search for a project management system to be used by our company. For those who don’t know, Redmine is an open source project management system written in Ruby on Rails.

Even though I was earmarked to work on the project, I dint think about it much. I somehow managed to install with assistance of google search. The project was later handed over to someone else to manage it.

Recently, in one of the codeproject daily newsletters, there was an article that caught my attention. http://rubysource.com/why-should-a-net-developer-look-into-ruby-or-ruby-on-rails/. I searched online for information about ruby and it is on that day that I installed ruby on my machine. The rest of this blog will discuss my struggles, my finding and all the snippets that helped me succeed in my projects. 

I am planning to build a ruby on rails project from scratch. Technologies I am planning to use include MYSQL Stored Procedures, Javascript, Css,AJAX, Json and anything interesting that will come along. So, welcome aboard my journey and wish luck.