Creating rails application in NetBeans IDE

-----> Download the NetBeans IDE from the following website
http://www.netbeans.org/downloads/

-----> After installing the netbeans open the netbeans ide and go to file menu click on the new project. after clicking on the new project it opens the new project window.



-----> Select the Ruby On Rails application from the right pane and click on the next button. After clicking on the next button will get the following screen.



-----> Enter the project name in the text box, select the project location, we can select the database from the available databases in the databases list. After clicking on the next it generates the rails application folder.



-----> Right click on the sample project from the projects pane in the left side click on the generate will get the following screen.


-----> In rails generator window select the corresponding generator to generate the particular task. In the above screen it generates a scaffold for the post model with the corresponding attributes and data types. After clicking on the ok it will generate all the code files for the post model with default controller and action methods.


-----> Right click on the sample project and go to Run Rake Task -> db -> migrate. After clicking on the migrate it generates migrations.


-----> Right click on the sample project and click on the run. Start the browser and enter the data

No comments: