Instant Rails

1,205
-1

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
1,205
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Instant Rails

  1. 1. MIKAMI Yoshiyuki yoshuki@saikyoline.jp http://saikyoline.jp/
  2. 2. 127.0.0.1       localhost 127.0.0.1       mybookshelf
  3. 3. 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>
  4. 4. mybookshelf_development
  5. 5. mybookshelfpass
  6. 6. ¥ ¥ ¥ ¥ ¥ # 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
  7. 7. 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>
  8. 8. 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>
  9. 9. 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>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×