Witam
Zaczynam przerabiać pewną książkę i zatrzymałem się na samym początku.
Mam użyć polecenia scaffold.
Wygląda to tak:
ruby script/generate scaffold ticket name:string seat_iq_seq:string address:text price_paid:decimal email_address:string
Operuję jednak na railsach3 i dowiedziałem się, że muszę użyć rails generate zamiast ruby script/generate
…
Dostaję to:
imac-karol-piwowarczyk-2:tickets karolpiwowarczyk$ rails generate scaffold ticket name:string seat_id_seq:string address:text price_paid:normal:decimal email_address:string
exists
exists app/controllers
exists app/helpers
exists app/models
exists app/views/layouts
exists config/environments
exists components
exists db
exists doc
exists lib
exists lib/tasks
exists log
exists public/images
exists public/javascripts
exists public/stylesheets
exists script/performance
exists script/process
exists test/fixtures
exists test/functional
exists test/integration
exists test/mocks/development
exists test/mocks/test
exists test/unit
exists vendor
exists vendor/plugins
exists tmp/sessions
exists tmp/sockets
exists tmp/cache
exists tmp/pids
identical Rakefile
identical README
identical app/controllers/application.rb
identical app/helpers/application_helper.rb
identical test/test_helper.rb
identical config/database.yml
identical config/routes.rb
identical public/.htaccess
identical config/boot.rb
identical config/environment.rb
identical config/environments/production.rb
identical config/environments/development.rb
identical config/environments/test.rb
identical script/about
identical script/breakpointer
identical script/console
identical script/destroy
identical script/generate
identical script/performance/benchmarker
identical script/performance/profiler
identical script/process/reaper
identical script/process/spawner
identical script/process/inspector
identical script/runner
identical script/server
identical script/plugin
overwrite public/dispatch.rb? [Ynaqd] y
a przy odpaleniu: localhost:3000/tickets
Routing Error
No route matches [GET] “/tickets”
Co robię nie tak?