14Jan

Learning Rails – Step 1

Hi all,
some info before to start: my development environment is on a Linux machine and I use Aptana RadRails as IDE and MySql as database.




I thought to divide the project in four areas:

  1. default pages: home, about, support, login
  2. user registration and management
  3. contacts management
  4. lists management

Each area will be developed step by step.

First of all we must create a new Rails project: menu File->New->Rails project.




Then fill the Project name field with “EmailMkt”, check “Generate…skeleton” checkbox and select Mysql.



Now click “Finish” and RadRails will generate the application skeleton.



Now we have to modify the content of database.yml file. In this file there are 3 sections: development, test, production.
In each one of these sections we must change the database name and insert the correct username and password to access to MySql.



Now we must create the database. In RadRails you can do this or typing the “rake db:create:all” command in the Rails shell console or using Rake Task window or clicking the right mouse button and using the menu.



Ok, now we are ready to see if the application works: menu Run ->Run As -> Rails Application.



Wow! It works.



That’s all for now.

-->

One Response to “Learning Rails – Step 1”

  1. [...] Learning Rails – Step 1 (code4dotnet.com) [...]

Leave a Reply