I trying to run for app on server and log file give me an error
You may have mistyped the address or the page may have moved.
and in log file
[2014-03-12T09:50:22.614788 #1647] INFO -- : Started GET "/" for
84.38.185.44 at 2014-03-12 09:50:22 +0000
F, [2014-03-12T09:50:22.771502 #1647] FATAL -- :
ActionController::RoutingError (No route matches [GET] "/"):
actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:21:in call'
actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:incall'
railties (4.0.2) lib/rails/rack/logger.rb:38:in call_app'
railties (4.0.2) lib/rails/rack/logger.rb:20:inblock in call'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in block in tagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:intagged'
activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in tagged'
railties (4.0.2) lib/rails/rack/logger.rb:20:incall'
actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in call'
rack (1.5.2) lib/rack/methodoverride.rb:21:incall'
rack (1.5.2) lib/rack/runtime.rb:17:in call'
activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:incall'
rack (1.5.2) lib/rack/sendfile.rb:112:in call'
railties (4.0.2) lib/rails/engine.rb:511:incall'
railties (4.0.2) lib/rails/application.rb:97:in call'
unicorn (4.7.0) lib/unicorn/http_server.rb:580:inprocess_client'
unicorn (4.7.0) lib/unicorn/http_server.rb:660:in worker_loop'
unicorn (4.7.0) lib/unicorn/http_server.rb:527:inspawn_missing_workers'
unicorn (4.7.0) lib/unicorn/http_server.rb:153:in start'
unicorn (4.7.0) bin/unicorn:126:in'
/usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:in load'
/usr/local/rvm/gems/ruby-2.0.0-p353/bin/unicorn:23:in'
/usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in
eval'
/usr/local/rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in
'
that can i do with it?
Seems that the root route is not defined. Open your route.rb ad check if there's something like this:
root :to => "controller#index"
Could you try to add the following line (posts for example)?
# config/routes.rb
root to: 'posts#index'
Related
When I try my page i.e, localhost:3000/home - it shows this error.
This is the error thrown in the console:
ActionController::RoutingError (No route matches [GET] "/home"):
web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:22:in `middleware_call'
web-console (2.0.0.beta3) lib/action_dispatch/debug_exceptions.rb:13:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.2.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `block in call'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `block in tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:26:in `tagged'
activesupport (4.2.2) lib/active_support/tagged_logging.rb:68:in `tagged'
railties (4.2.2) lib/rails/rack/logger.rb:20:in `call'
actionpack (4.2.2) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
rack (1.6.4) lib/rack/runtime.rb:18:in `call'
activesupport (4.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
I think there is some problem with the railties. But I am not sure what it is?
content of my routes.rb :
Rails.application.routes.draw do
get 'static_pages/home'
get 'static_pages/help'
end
You should define your route like this:
get 'home' => 'static_pages#home'
or:
root 'static_pages#home'
If you want to make it root path for your application.
I see this error many times in my Ruby on Rails log file. I don´t know where does it come from?
F, [2015-07-13T13:03:00.178740 #22638] FATAL -- :
ActionController::RoutingError (No route matches [GET] "/manager/html"):
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
puma (2.10.1) lib/puma/configuration.rb:74:in `call'
puma (2.10.1) lib/puma/server.rb:490:in `handle_request'
puma (2.10.1) lib/puma/server.rb:361:in `process_client'
puma (2.10.1) lib/puma/server.rb:254:in `block in run'
puma (2.10.1) lib/puma/thread_pool.rb:96:in `call'
puma (2.10.1) lib/puma/thread_pool.rb:96:in `block in spawn_thread'
These errors represent lame attempts by hackers to exploit various
known vulnerabilities in other applications.
See more details about it here.
I´m checking my Ruby on Rails log files and I wonder why do I have request like this one (my app doesn´t have any request like this):
I, [2015-07-13T11:45:26.004933 #22638] INFO -- : Started GET "/Ringing.at.your.dorbell!" for 186.116.51.54 at 2015-07-13 11:45:26 +0000
F, [2015-07-13T11:45:26.005954 #22638] FATAL -- :
ActionController::RoutingError (No route matches [GET] "/Ringing.at.your.dorbell!"):
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
puma (2.10.1) lib/puma/configuration.rb:74:in `call'
puma (2.10.1) lib/puma/server.rb:490:in `handle_request'
puma (2.10.1) lib/puma/server.rb:361:in `process_client'
puma (2.10.1) lib/puma/server.rb:254:in `block in run'
puma (2.10.1) lib/puma/thread_pool.rb:96:in `call'
puma (2.10.1) lib/puma/thread_pool.rb:96:in `block in spawn_thread'
This just looks like someone is poking your system with a script, or just poking to see if that URL exists. Have you double checked that you're serving up the proper 404 response?
I have a rails app where all the feature specs pass for signing up however for some reason when I run rails server I keep getting this error
Started POST "/index.html" for 127.0.0.1 at 2013-10-03 22:17:29 +0300
ActionController::RoutingError (No route matches [POST] "/index.html"):
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/static.rb:64:in `call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
/Users/brozturk/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
/Users/brozturk/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
/Users/brozturk/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'
Here are my routes
resources :users
root 'users#new'
Why would the app try to post index.html?And why would my tests pass but when I run the server it would not work?I had devise installed but then decided not to use it so I did a git reset --hard and continued that way.could that be the issue?How can I fix this?
I'm just starting to use Ruby on Rails and I am going through a tutorial to get started. I have everything working for testing, so I can use a rails server command in the directory to make it show the basic "Welcome aboard" page that I want to see; however, when I change this to rails server -e production I suddenly only see the "The page you were looking for doesn't exist." page. When this happens, the command prompt shows:
[2013-08-07 19:54:26] INFO WEBrick 1.3.1
[2013-08-07 19:54:26] INFO ruby 1.9.3 (2013-06-27) [i386-mingw32]
[2013-08-07 19:54:26] INFO WEBrick::HTTPServer#start: pid=12664 port=3000
I, [2013-08-07T19:54:26.515238 #12664] INFO -- : Started GET "/" for 127.0.0.1
at 2013-08-07 19:54:26 -0700
F, [2013-08-07T19:54:26.752394 #12664] FATAL -- :
ActionController::RoutingError (No route matches [GET] "/"):
actionpack (4.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `c
all'
actionpack (4.0.0) lib/action_dispatch/middleware/show_exceptions.rb:30:in `ca
ll'
railties (4.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `block in call'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `block in tag
ged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:25:in `tagged'
activesupport (4.0.0) lib/active_support/tagged_logging.rb:67:in `tagged'
railties (4.0.0) lib/rails/rack/logger.rb:21:in `call'
actionpack (4.0.0) lib/action_dispatch/middleware/request_id.rb:21:in `call'
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call'
rack (1.5.2) lib/rack/runtime.rb:17:in `call'
activesupport (4.0.0) lib/active_support/cache/strategy/local_cache.rb:83:in `
call'
railties (4.0.0) lib/rails/engine.rb:511:in `call'
railties (4.0.0) lib/rails/application.rb:97:in `call'
rack (1.5.2) lib/rack/lock.rb:17:in `call'
rack (1.5.2) lib/rack/content_length.rb:14:in `call'
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service'
C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
C:/Ruby193/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
This may seem very similar to a number of other questions, but I have tried a number of solutions that have all failed. Thank you for any possible help.
Indeed, this is the default behaviour for an application that has no routes.
The "Welcome aboard" page is just an introduction for developers and is only shown in the development environment.