Your SlideShare is downloading. ×
0
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
InstantRails how to
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

InstantRails how to

1,805

Published on

2007/08/11 ワイズノット社内勉強会

2007/08/11 ワイズノット社内勉強会

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,805
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
83
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 127.0.0.1       localhost 127.0.0.1       mybookshelf
  • 2. C:¥InstantRails¥rails_apps>rails mybookshelf create create  app/controllers create  app/helpers . . . create  log/production.log create  log/development.log create  log/test.log C:¥InstantRails¥rails_apps>
  • 3. mybookshelf_development
  • 4. mybookshelfpass
  • 5. ¥ ¥ ¥ ¥ ¥ # 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: mybookshelf_development username: mybookshelf password: mybookshelfpass host: localhost encode: utf8 # Warning: The database defined as 'test' will be erased and
  • 6. C:¥InstantRails¥rails_apps¥mybookshelf>ruby script¥generate model Book isbn:string title:string review:text exists  app/models/ exists  test/unit/ exists  test/fixtures/ create  app/models/book.rb create  test/unit/book_test.rb create  test/fixtures/books.yml create  db/migrate create  db/migrate/001_create_books.rb C:¥InstantRails¥rails_apps¥mybookshelf>
  • 7. C:¥InstantRails¥rails_apps¥mybookshelf>rake db:migrate (in C:/InstantRails/rails_apps/mybookshelf) == CreateBooks: migrating ================================= ‐‐ create_table(:books) ‐> 0.0400s == CreateBooks: migrated (0.0400s) ======================== C:¥InstantRails¥rails_apps¥mybookshelf>
  • 8. C:¥InstantRails¥rails_apps¥mybookshelf>ruby script¥generate scaffold Book exists  app/controllers/ exists  app/helpers/ create  app/views/books . . . create  app/helpers/books_helper.rb create  app/views/layouts/books.rhtml create  public/stylesheets/scaffold.css C:¥InstantRails¥rails_apps¥mybookshelf>

×