How to use Rails Migrations - Part II
April 26th, 2007 by Yavor Ivanov

This article is part two of the series about Rails Migrations and it will explain on a deeper level how to use the Ruby on Rails migrations.
After we spoke about Migrations in our previous article found here we understood the basics needed to use Migrations in Ruby on Rails.
Now to begin with the code and something we did not mention earlier.
You see indexes are something that a good database design MUST contain!
This example shows how to add and remove an indexed field.
And now let’s take a look at some examples which might or might not be so obvious to make.
You like it? Digg it!
Developing a News site in Rails [Project 1] [Part 1]
April 22nd, 2007 by Yavor Ivanov
Recently I was asked the following question:
“How hard is it to build this project in Rails”
You can substitute this with anything. After a short period of time I realized that such a question can’t be really answered to a point where a programmer would agree completely if he/she didn’t even touched Ruby on Rails. In order to change that fact a person should see the whole process of developing and deploying a Rails application so he/she can realize the power and potential of a Rails application.
With all this in mind I hereby announce the Project type articles of RubyCorner.net. Those articles will represent an overview of the development process of a real working Rails web application. This article is the first of the series Project and it will begin not so briefly and give a more detailed overview of the things we will do. The next articles in the series will focus on more complex things and will skip those explained before assuming the knowledge was already obtained.
Let’s begin with our first web application project:
Project 1 – Developing a News site in Rails
parts count: 3 (this is a three day project)
Rails version used: 1.2.3 (used both on Windows and Linux platform)
Ruby version used: 1.8.5 (used both on Windows and Linux platform)
Knowledge of HTML and CSS: assumed
Knowledge of a Web Programming Language and Database: Basic-Advanced assumed
You like it? Digg it!
The Key For Ruby And Telnet Communication With Cisco
April 4th, 2007 by Stanislav Bozhkov
Have you ever had the need to programatically obtain information from a network device. In general when we deal with manageable network devices the smartest way is to use SNMP. However in some cases your head can get fired from problems concerning SNMP. Sometimes you would want just to obtain the output of a common terminal command. Well it could be a bit tricky when communicating with Cisco switches. I will share my experience now - problems and resolutions about this issue.
In my case I’m developing a webconsole application. It should have the feature to search for a mac address in the ARP tables of a couple of switches. Of course what I did first was to try doing it with SNMP. Read the rest of this entry »
You like it? Digg it!
How to use Rails Migrations - Part I
March 19th, 2007 by Yavor Ivanov

This article is part one of the series about Rails Migrations and it will explain on a basic level how to use the Ruby on Rails migrations.
1. What are Migrations ?
Migrations in Rails is a way of describing what the database should look like and synchronize it with the respective model.
Migrations are abstract to the database they are used with. This means that if you have used a MySQL database server when developing the application and the production database server is different let’s say Postgresql the database you defined within the migrations will remain intact and will run just fine on the new database server.
Migrations provide a way to make the database development SVN like… I will cover this latter on so just keep in mind this for now.
2. Creating and Running Migrations
A migration is a simple Ruby file in the db/migrate directory.
Each migration file has a name starting with three digits and an
underscore. Those digits are the representation of the migrations version (a bit like SVN),
because they define the sequence in which the migrations are applied.
To generate a migration type:
Notice: This will generate a model and a migration to it.
You like it? Digg it!