Step down at my blog with your ideas,comments,suggestions on Ruby on Rails, PHP or Web2.0 Technology.

Wednesday, July 12, 2006

Configuring RoR

Configuring the Application :
Just follow these steps below:

C:\ruby\work>rails student

C:\ruby\work>cd student

C:\ruby\work\student>mysql -uroot

mysql> show databases;
mysql> create database student;

mysql>use student;

mysql> grant all on student.* to 'root'@'localhost';

mysql> exit

===== here you need to create the sql file i.e create.sql ....\work\student\db\create.sql ===

C:\ruby\work\student>mysql student
C:\ruby\work\student>mysql -uroot

mysql> use student;


mysql> show tables;

mysql> desc participants;

mysql> insert into participants values(111,'satish','pune');

mysql> insert into participants values(222,'rajesh','bangalore');


mysql> select * from participants;

mysql> exit;


Now open a file .........\work\student\config\database.yml
If you are getting database name as student_development
change it from
database: student_development to database: student
and save this file.


Run the weBrick server now by prompting below line:
c:/rails/work/student>ruby script/server

Now scaffold should work:
c:/rails/work/student>ruby script/generate scaffold Participant Admin

Open bowser
http://localhost:3000/student

OR go through this link
http://www.esnips.com/web/Programmingstuff
OR
just click on the icon right side of this blog "
rail_config_steps.txt"

1 Comments:

Blogger SatishTalim said...

Raj, I have linked your blog from the Member Blogs page at the new PuneRuby blog at http://www.puneruby.com/blog/
Kindly check the text and would appreciate a link back to the PuneRuby blog.

Also, I am unable to access my gmail a/c and have created a new email id satish.talim1@gmail.com

Please email me there. Thanks/Satish

6:40 PM

 

Post a Comment

<< Home