error with trace
** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! undefined method `[]' for :users:Symbol /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/builder.rb:157:in `build' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:263:in `add_route' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set:271:in `add_named_route' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:55:in `method_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/option_merger.rb:14:in `__send__' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/option_merger:14:in `method_missing' /home/zach/apps/gessner/config/routes.rb:7 /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb:63:in `with_options' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:49:in `namespace' /home/zach/apps/gessner/config/routes:6 /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set:210:in `draw' /home/zach/apps/gessner/config/routes.rb:1 /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies:521:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:142:in `load' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:255:in `load_routes!' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set:236:in `load!' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:250:in `reload' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:472:in `initialize_routing' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer:176:in `process' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run' /home/zach/apps/gessner/config/environment:13 /usr/local/lib/site_ruby/1.8/rubygems/custom_require:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in ` /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies:521:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in ` /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:617:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:578:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:588:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:577:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:564:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:2005:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:1999:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake:1974:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19
migration
create_table :users do |t| t :name, :string, :limit => 100, :default => '', :null => true t :email, :string, :limit => 100 t :crypted_password, :string, :limit => 40 t :salt, :string, :limit => 40 t :created_at, :datetime t :updated_at, :datetime t :remember_token, :string, :limit => 40 t :remember_token_expires_at, :datetime t :activation_code, :string, :limit => 40 t :activated_at, :datetime t :role_id, :integer end add_index :users, :email, :unique => true end drop_table "users" end end
routes
ActionController do |map| map '/logout', :controller => 'sessions', :action => 'destroy' map '/login', :controller => 'sessions', :action => 'new' #map.resources :users map :admin do |admin| admin :users end map :session # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # map.resources :products # Sample resource route with options: # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } # Sample resource route with sub-resources: # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller # Sample resource route with more complex sub-resources # map.resources :products do |products| # products.resources :comments # products.resources :sales, :collection => { :recent => :get } # end # Sample resource route within a namespace: # map.namespace :admin do |admin| # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) # admin.resources :products # end # You can have the root of your site routed with map.root -- just remember to delete public/index.html. # map.root :controller => "welcome" # See how all your routes lay out with "rake routes" # Install the default routes as the lowest priority. # Note: These default routes make all actions in every controller accessible via GET requests. You should # consider removing the them or commenting them out if you're using named routes and resources. map ':controller/:action/:id' map ':controller/:action/:id.:format' end
