Note that there are some explanatory texts on larger screens.

plurals
  1. POTry to print "Hello World" on webpage but something happened
    primarykey
    data
    text
    <p>I am a beginner in Ruby on Rails. Today, I want to have my first try to print "Hello World" on webpage but something happened.</p> <p>First of all,I create a "project" folder by "mkdir project" and then create new rails project in this folder by "rails new demo".</p> <p>Next,I type "rails server" and website shows good.</p> <p>Then,I type "rails generate controller welcome" and put this code</p> <pre><code>Demo::Application.routes.draw do get "welcome/say_hello" =&gt; "welcome#say" # ... end </code></pre> <p>into config/routes.rb .</p> <p>Then, I run "rails server" again and some problem happened like below.</p> <pre><code>C:\project\demo&gt;rails s =&gt; Booting WEBrick =&gt; Rails 4.0.0 application starting in development on http://localhost:3000/ =&gt; Run `rails server -h` for more startup options =&gt; Ctrl-C to shutdown server Exiting C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load': C:/project/demo/config/routes.rb:59: syntax error, unexpected keyword_end, expecting $end (SyntaxError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport4.0.0/lib/active_support/dependencies.rb:222:in `block in load' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport4.0.0/lib/active_support/dependencies.rb:222:in `load' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater' from C:65535:in `execute_if_updated' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in &lt;module:Finisher&gt;' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:150:in `block intsort_each' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:183:in `block (2 levels)in each_strongly_connected_component' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:219:in `each_strongly_connected_component_from' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:182:in `block in each_strongly_connected_component' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:180:in `each_strongly_connected_component' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/tsort.rb:148:in `tsort_each' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing' from C:/project/demo/config/environment.rb:5:in `&lt;top (required)&gt;' from C:/project/demo/config.ru:3:in `require' from C:/project/demo/config.ru:3:in `block in &lt;main&gt;' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize' from C:/project/demo/config.ru:in `new' from C:/project/demo/config.ru:in `&lt;main&gt;' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:199:in `app' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands/server.rb:48:in `app' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands/server.rb:75:in `start' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:78:in `block in &lt;top (required)&gt;' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.0/lib/rails/commands.rb:73:in `&lt;top (required)&gt;' from bin/rails:4:in `require' from bin/rails:4:in `&lt;main&gt;' </code></pre> <p>Is anyone know what happened??</p> <p>This is my routes filr as below:</p> <pre><code>Demo::Application.routes.draw do get "welcome/say_hello" =&gt; "welcome#say" # ... end </code></pre>
    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.
    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