first application on Ruby on Rails -


im begginer in ror. me please. use windows xp, ruby 1.9.2, sqlite 3.7.5 r steps creating new.


  1. install ruby
  2. gem install rails
  3. rails new c:\tm\test
  4. sqlite3.dll, sqlite3.exe
  5. gem install sqlite3-ruby
  6. in database.yml:

    development: adapter: sqlite3 dbfile: db/test.db

  7. c:\tm\test>sqlite3 -init db.sql test.db
  8. rails generate model article
  9. rails generate controller article
  10. in test\app\controllers\article_controller.rb: class articlecontroller < applicationcontroller scaffold :article end
  11. rails server in firefox http://localhost:3000/article

and have trouble on page: argumenterror no database file specified. missing argument: database must seeinterface work table

in cmd after see: argumenterror (no database file specified. missing argument: database):


in cmd after: rails generate scaffold article article


i spend this: missing type attribute 'article'. example: 'article:string' string type. me please

it's database in yml, not dbfile anymore. try following yml in database.yml:

development:   adapter: sqlite3   database: db/test.db 

here guide configure database on rubyonrails.org.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -