-3

I'm a new Ruby on Rails developer and currently following to learn the basics:
http://guides.rubyonrails.org/getting_started.html

I've run into a problem when I try to start the Rails server: $ rails server

I get a lengthy error message as follows:

=> Booting WEBrick
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/tyhomemac/Programming/rails_projects/blog/config/routes.rb:4:in `block (2 levels) in <top (required)>': undefined method `resoures' for #<ActionDispatch::Routing::Mapper:0x007ffee3b45188> (NoMethodError)
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1124:in `block in resources'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1406:in `block (2 levels) in resource_scope'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:618:in `scope'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1405:in `block in resource_scope'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1397:in `with_scope_level'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1404:in `resource_scope'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/mapper.rb:1123:in `resources'
    from /Users/tyhomemac/Programming/rails_projects/blog/config/routes.rb:3:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:289:in `instance_exec'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:289:in `eval_block'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:267:in `draw'
    from /Users/tyhomemac/Programming/rails_projects/blog/config/routes.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:40:in `load_paths'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:16:in `reload!'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:26:in `block in updater'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/file_update_checker.rb:78:in `call'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/file_update_checker.rb:78:in `execute'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:27:in `updater'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:9:in `rescue in execute_if_updated'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `instance_exec'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:30:in `run'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/initializable.rb:54:in `run_initializers'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:136:in `initialize!'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/tyhomemac/Programming/rails_projects/blog/config/environment.rb:5:in `<top (required)>'
    from /Users/tyhomemac/Programming/rails_projects/blog/config.ru:3:in `require'
    from /Users/tyhomemac/Programming/rails_projects/blog/config.ru:3:in `block in <main>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
    from /Users/tyhomemac/Programming/rails_projects/blog/config.ru:in `new'
    from /Users/tyhomemac/Programming/rails_projects/blog/config.ru:in `<main>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:46:in `app'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands/server.rb:70:in `start'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap'
    from /usr/local/rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

I've searched online and based on a response in: Ruby 1.9.2 and Rails 3 cannot open rails console

I tried the following code:

rvm pkg install readline
rvm remove 1.9.3
rvm install 1.9.3 --with-readline-dir=$rvm_path/usr

However, this did not solve the error messages and I am continuing to get the same problem.

I am running ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.3.0] and Rails 3.2.13.

Please let me know if I should provide any additional information.

Community
  • 1
  • 1
Ty S
  • 3
  • 2

2 Answers2

3

Either you've misspelled a resources declaration in your config/routes.rb file or a gem you're using has during a generator. Do a search for resoures in said file and replace it with resources.

That's what this error is referring to:

undefined method 'resoures'

d_ethier
  • 3,873
  • 24
  • 31
  • Thanks for the response. I ended up removing Ruby, RubyGems, Rails, etc and reinstalled using the Rails Installer. I did not get this error after that. Not sure why 'resources' was misspelled because that word was not used in the rails guide that I'm following. – Ty S May 06 '13 at 20:07
  • Oops, never mind. I see where I had made the misspelling. Thank you for your help. Hmm, I'm not able to vote up as it says I don't have enough reputation. – Ty S May 06 '13 at 20:13
0

there is a typo error. check spelling of "resources"

Kushal
  • 218
  • 2
  • 12