Errors when running the local server

Hi all,

I’m running an application on my localhost, but the command “rails
server”
behaves very inconsistently. About an hour ago it ran well on another
app,
but got errors now.

According to the errors it seemed that the server began to run but the
there is something missing in the library. But I’m very new to Rails so
cannot figure out what do these lines mean:

129-97-231-189:rewrite liujunjun$ rails server
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on
http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in
load': /Users/liujunjun/rewrite/config/routes.rb:11: syntax error, unexpected kDO, expecting $end (SyntaxError) from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:inload’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in
load_dependency' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:innew_constants_in’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in
load_dependency' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:inload’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:in
load_paths' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:ineach’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:29:in
load_paths' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:13:inreload!’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/routes_reloader.rb:7:in
initialize' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/file_update_checker.rb:32:incall’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/file_update_checker.rb:32:in
execute_if_updated' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/finisher.rb:63 from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/finisher.rb:64:incall’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application/finisher.rb:64
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:30:in
instance_exec' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:30:inrun’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:55:in
run_initializers' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:54:ineach’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/initializable.rb:54:in
run_initializers' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/application.rb:96:ininitialize!’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in
send' from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:inmethod_missing’
from /Users/liujunjun/rewrite/config/environment.rb:5
from /Users/liujunjun/rewrite/config.ru:4:in require' from /Users/liujunjun/rewrite/config.ru:4 from /Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:51:ininstance_eval’
from
/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:51:in
initialize' from /Users/liujunjun/rewrite/config.ru:1:innew’
from /Users/liujunjun/rewrite/config.ru:1

Thanks you very much!

Regards,
Erica (XU Ziyin)
email: [email protected] [email protected]

School of Accounting and Finance &
Cheriton School of Computer Science
University of Waterloo

On 7 December 2011 00:36, Erica Xu
[email protected] wrote:

129-97-231-189:rewrite liujunjun$ rails server
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting

/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:234:in

`load’: /Users/liujunjun/rewrite/config/routes.rb:11: syntax error,
unexpected kDO, expecting $end (SyntaxError)

So what is at that line in routes.rb? If you can’t see it post the
start of the file here, up to about line 15. Look carefully at it
first though to see if you can see the error.

Colin

/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in

from
call' fromeach’

/Users/liujunjun/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in

from /Users/liujunjun/rewrite/config.ru:1:in `new’
University of Waterloo


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


gplus.to/clanlaw

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs