Unni Krishnan
2007-Jul-10 05:41 UTC
Commands to set up project ( including model & controller)
Create Project> rails project_namechange directory to ''project_name'' project_name> ruby script/server create 3 Databases databasename_development databasename_test databasename_production open database.yml in config folder and give the database details. I think , you only have to give the password. next, you have to create model project_name> ruby script/generate model Model_name edit /db.migrate/001_create_modelnames add commands for creating table for ex:- --------------------------- def self.up create_table :classifieds do |t| t.column :title, :string t.column :price, :float t.column :location, :string t.column :description, :text t.column :email, :string t.column :created_at, :timestamp t.column :updated_at, :timestamp end --------------------------- then, execute this against database projet_name> rake migrate next, creating controller project_name> ruby script/generate controller Controller_name -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---