Thursday, January 13, 2011

The Power of Gratitude

The Power of Gratitude

Sunday, February 3, 2008

Keep an eye on this : Ruby and C++ are becoming playmates

The owner of this tutorial says its work in progress, I think something good is about to happen.
http://metaeditor.sourceforge.net/embed/

Sunday, January 27, 2008

Not Yet Hooked up with Sqlite ? get back to Mysql !

The lastest version of rails uses Sqlite ! Is that a problem ? Not at all!

After doing the usual installation (post your comment if you need installation instructions) of ROR and its dependencies now you want to create your first rails application ;

$rails -d mysql myapp

and database.yml should look like this:

# MySQL (default setup). Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql
# On MacOS X:
# gem install mysql -- --include=/usr/local/lib
# On Windows:
# gem install mysql
# Choose the win32 build.
# Install MySQL and put its /bin directory on your path.
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql
database: myapp_development
username: username
password: pwd
host: localhost

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
adapter: mysql
database: myapp_test
username: username
password: pwd
host: localhost

production:
adapter: mysql
database: myapp_production
username: username
password: pwd
host: localhost

Moving from Development to Production mode in RoR is as easy as ABC

Assuming that you have completed and tested your application now its time switch to production mode,
simple type the following to migrate to your production database

$ rake RAILS_ENV=production db:migrate

I have heard a lot of stories about how to do this one, whats your story ?

Also sometimes after modifying and adding attributes to the

class TableNames < ActiveRecord::Migration

and then doing rake db:migrate you realize that the database hasn't been updated.Simply go into the database schema and modify the tables .It isn't much pain anyway. I experienced this when managing my database using phpmyadmin.
Refresh the browser and there we are ......all good.

Thursday, January 24, 2008

Quick fixes for Ruby on Rails

Hi everybody,i just finished my first Rolling with Ruby on Rails tutorial and thought this might be very useful for those on the start up too.

I have included all the errors i have come across so that getting the Rails machine running is as fast as it should be

1. Starting the web server : In linux avoid the backslashes use /

change ruby script\server to ruby script/server

if this fails try : ./script/server this should get the server running.

2. As you progress with the tutorial you will meet this a couple of times :

change render_text to render :text =>

find_all to find(:all)

@params [] to params []

This will save you some great deal of time ,you will avoid the method not found and other errors

3. for pagination errors install the will_paginate with :

script/plugin install svn://errtheblog.com/svn/plugins/will_paginate

if this still fails try the classical_pagination

script/plugin install svn://errtheblog.com/svn/plugins/classic_pagination

Hope this helps someone out there.Will keep on posting the fixes as i Roll like everybody else!!!





Wednesday, January 23, 2008

Welcome to our Ruby Blog

This blog is simply driven by the spirit of brotherhood and the will of learning more. After an exposure to ROR at work I hooked up my brother to the hype , now we are seriously putting hype into test .Its the elder brother who is speaking , who is who ? Whoever , just care about sharing knowledge about this hype.Welcome !