Note that there are some explanatory texts on larger screens.

plurals
  1. PORouting Error No route matches "/users" Ruby on Rails Tutorial: Learn Rails by Example, by Michael Hartl
    primarykey
    data
    text
    <p>I'm following Ruby on Rails Tutorial: Learn Rails by Example, by Michael Hartl.</p> <p><a href="http://ruby.railstutorial.org/chapters/a-demo-app#sec:a_micropost_microtour" rel="nofollow">http://ruby.railstutorial.org/chapters/a-demo-app#sec:a_micropost_microtour</a></p> <p>Problem started: So, when I typed:</p> <pre><code>$ rails generate scaffold Micropost content:string user_id:integer </code></pre> <p>the command went through fine.</p> <p>However, when I typed: <code>$ bundle exec rake db:migrate</code></p> <p>I get the errors below:</p> <pre><code>K-MacBook-Pro:demo_app ka$ bundle exec rake db:migrate WARNING: 'require 'rake/rdoctask'' is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead. at /Users/ka/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2.2/lib/rake/rdoctask.rb WARNING: Global access to Rake DSL methods is deprecated. Please include ... Rake::DSL into classes and modules which use the Rake DSL methods. WARNING: DSL method DemoApp::Application#task called at /Users/ka/.rvm/gems/ruby-1.9.2-p290@global/gems/railties-3.0.1/lib/rails/application.rb:214:in `initialize_tasks' == CreateUsers: migrating ==================================================== -- create_table(:users) -&gt; 0.0023s == CreateUsers: migrated (0.0024s) =========================================== </code></pre> <p>Info:</p> <pre><code>Rails -v: 3.0.1 gem list: abstract (1.0.0 ruby) actionmailer (3.0.1 ruby) actionpack (3.0.1 ruby) activemodel (3.0.1 ruby) activerecord (3.0.1 ruby) activeresource (3.0.1 ruby) activesupport (3.0.1 ruby) addressable (2.2.6) arel (1.0.1 ruby) builder (2.1.2 ruby) bundler (1.0.21) erubis (2.6.6 ruby) heroku (2.17.0) i18n (0.4.2 ruby) json (1.6.3) launchy (2.0.5) mail (2.2.19 ruby) mime-types (1.17.2 ruby) polyglot (0.3.3 ruby) rack (1.2.4 ruby) rack-mount (0.6.14 ruby) rack-test (0.5.7 ruby) rails (3.0.1 ruby) railties (3.0.1 ruby) rake (0.9.2.2, 0.8.7 ruby) rdoc (3.12) rest-client (1.6.7) rubyzip (0.9.5) sqlite3 (1.3.3) sqlite3-ruby (1.3.3, 1.2.5 ruby) term-ansicolor (1.0.7) thor (0.14.6 ruby) treetop (1.4.10 ruby) tzinfo (0.3.31 ruby) </code></pre> <p>What I have tried:</p> <p>I copied "gem "rake", "0.8.7"" to my Gemfile I ran <code>bundle update rake</code> Then I tried: <code>$ bundle exec rake db:migrate</code> (in /Users/ka/rails_projects/demo_app) After this it brings me back to the $prompt.</p> <p>When I open <a href="http://localhost:3000/users" rel="nofollow">http://localhost:3000/users</a> I get the following error:</p> <blockquote> <p>Routing Error No route matches "/users" No route matches "/Users"</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload