¿Qué es este error de enrutamiento y error de rutas de rake?

I am new to Ruby on Rails. After fiddling around with it for a week I decided to give it ago, bought a book. Reinstalled it all. And now when I thought I fixed it, I get an error saying:

Routing Error

No route matches "/index"

Así que lo hice

rake routes

And that resulted in the error list below.

/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/version.rb:4:
warning: already initialized constant MAJOR
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/version.rb:5:
warning: already initialized constant MINOR
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/version.rb:6:
warning: already initialized constant BUILD
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/version.rb:3:
warning: already initialized constant NUMBERS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/version.rb:9:
warning: already initialized constant VERSION
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake.rb:26:
warning: already initialized constant RAKEVERSION
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/early_time.rb:17:
warning: already initialized constant EARLY
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/alt_system.rb:32:
warning: already initialized constant WINDOWS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:28:
warning: already initialized constant DEFAULT_RAKEFILES WARNING:
Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already
exists
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/task_arguments.rb:73:
warning: already initialized constant EMPTY_TASK_ARGS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/invocation_chain.rb:49:
warning: already initialized constant EMPTY
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:10:
warning: already initialized constant RUBY
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_utils.rb:84:
warning: already initialized constant LN_SUPPORTED
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/dsl_definition.rb:143:
warning: already initialized constant Commands
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:44:
warning: already initialized constant ARRAY_METHODS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:47:
warning: already initialized constant MUST_DEFINE
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:51:
warning: already initialized constant MUST_NOT_DEFINE
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:55:
warning: already initialized constant SPECIAL_RETURN
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:61:
warning: already initialized constant DELEGATING_METHODS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:364:
warning: already initialized constant DEFAULT_IGNORE_PATTERNS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/file_list.rb:370:
warning: already initialized constant DEFAULT_IGNORE_PROCS
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake.rb:64:
warning: already initialized constant FileList
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake.rb:65:
warning: already initialized constant RakeFileUtils rake aborted!
stack level too deep
/Users/dennisbuizert/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2/lib/rake/rake_module.rb:25

preguntado el 27 de agosto de 11 a las 22:08

Format the stack trace using the Code button in edit view in SO, not the Quote button -

1 Respuestas

Try to install an older version of rake.

gem install rake -v=0.8.7

You might get a warning message when using rake.

WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods.

You can just add "include Rake::DSL" to the Rakefile before the applications load_tasks were called.

I found a post to fix that issue. El acceso global a los métodos Rake DSL está en desuso

contestado el 23 de mayo de 17 a las 14:05

Thanks! That fixed the issue. So glad I am discovering the issues now rathe then later on and thinking I am doing perfect haha - dbuizert

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.