1.install ruby
download from http://www.ruby-lang.org/en/news/2009/12/07/ruby-1-9-1-p376-is-released/
2.install rails
ruby gem install rails --include-dependencies
3.install mysql
download from http://sourceforge.net
ruby gem install mysql
1-3 can be down by download InstantRails from http://rubyforge.org/frs/?group_id=904 <InstantRails2.0.2>
4. create depot application:
ruby> rails --database=mysql depot
mysqladmin -u root create depot_development
ruby> rake db:migrate
ruby> ruby script/generate scaffold product title:string description:text image_url:string
ruby> ruby script/server webrick
IE: http://localhost:3000/product like below:
Listing products
Title | Description | Image url | |||
---|---|---|---|---|---|
NO1product | no1 product input by myself | Show | Edit | Destroy |
New product
5.then can do modify the depot application........
Notice:
1-3 mybe failed, it result is Rails2.3.4 hte lastest version.
InstantRails 2.0.2 is more better for most pepole