Rails log in chrome browser [SOLVED] - ruby-on-rails

ActionController::RoutingError (No route matches [GET] "/assets/bootstrap-datetimepicker-standalone.min.css.map"):
actionpack (5.1.7) lib/action_dispatch/middleware/debug_exceptions.rb:63:in call' web-console (3.5.1) lib/web_console/middleware.rb:135:in call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:in block in call' web-console (3.5.1) lib/web_console/middleware.rb:18:in catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:in call' actionpack (5.1.7) lib/action_dispatch/middleware/show_exceptions.rb:31:in call'
railties (5.1.7) lib/rails/rack/logger.rb:36:in call_app' railties (5.1.7) lib/rails/rack/logger.rb:24:in block in call'
activesupport (5.1.7) lib/active_support/tagged_logging.rb:69:in block in tagged' activesupport (5.1.7) lib/active_support/tagged_logging.rb:26:in tagged'
activesupport (5.1.7) lib/active_support/tagged_logging.rb:69:in tagged' railties (5.1.7) lib/rails/rack/logger.rb:24:in call'
sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:11:in block in call' activesupport (5.1.7) lib/active_support/logger_silence.rb:20:in silence'
activesupport (5.1.7) lib/active_support/logger.rb:63:in block (3 levels) in broadcast' activesupport (5.1.7) lib/active_support/logger_silence.rb:20:in silence'
activesupport (5.1.7) lib/active_support/logger.rb:61:in block (2 levels) in broadcast' sprockets-rails (3.2.2) lib/sprockets/rails/quiet_assets.rb:11:in call'
actionpack (5.1.7) lib/action_dispatch/middleware/remote_ip.rb:79:in call' actionpack (5.1.7) lib/action_dispatch/middleware/request_id.rb:25:in call'
rack (2.2.3) lib/rack/method_override.rb:24:in call' rack (2.2.3) lib/rack/runtime.rb:22:in call'
activesupport (5.1.7) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in call' actionpack (5.1.7) lib/action_dispatch/middleware/executor.rb:12:in call'
actionpack (5.1.7) lib/action_dispatch/middleware/static.rb:125:in call' rack (2.2.3) lib/rack/sendfile.rb:110:in call'
rack-mini-profiler (2.3.2) lib/mini_profiler/profiler.rb:237:in call' rack-cors (1.0.1) lib/rack/cors.rb:93:in call'
railties (5.1.7) lib/rails/engine.rb:522:in call' puma (3.11.0) lib/puma/configuration.rb:225:in call'
puma (3.11.0) lib/puma/server.rb:624:in handle_request' puma (3.11.0) lib/puma/server.rb:438:in process_client'
puma (3.11.0) lib/puma/server.rb:302:in block in run' puma (3.11.0) lib/puma/thread_pool.rb:120:in block in spawn_thread'
the above rails log creates only on chrome browser when right click & inspect. If i do not inspect, this will not appears on log file and also if happens only on chrome NOT on any other browser.
Any help would be appreciated.

I just removed commented code /*# sourceMappingURL=bootstrap-datetimepicker-standalone.min.css.map */ from css file & logs are fine now.

Related

No route matches [GET] "/javascripts/active_admin.js

The error message is
ActionController::RoutingError (No route matches [GET] "/javascripts/active_admin.js"):
actionpack (5.2.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (5.2.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.2.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.2.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.5.0) lib/request_store/middleware.rb:19:in `call'
actionpack (5.2.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.2.3) lib/rack/method_override.rb:24:in `call'
rack (2.2.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
webpacker (3.6.0) lib/webpacker/dev_server_proxy.rb:22:in `perform_request'
rack-proxy (0.6.5) lib/rack/proxy.rb:57:in `call'
railties (5.2.2.1) lib/rails/engine.rb:524:in `call'
puma (4.3.5) lib/puma/configuration.rb:228:in `call'
puma (4.3.5) lib/puma/server.rb:713:in `handle_request'
puma (4.3.5) lib/puma/server.rb:472:in `process_client'
puma (4.3.5) lib/puma/server.rb:328:in `block in run'
puma (4.3.5) lib/puma/thread_pool.rb:134:in `block in spawn_thread'
Processing by ExceptionsController#show as */*
Completed 500 Internal Server Error in 30ms (ActiveRecord: 0.0ms | MongoDB: 0.0ms)
The solutions mentioned in here doesn't work for me. I have been looking around here and there and could not find anything.
how do I solve this ?
To generate active_admin assets run this command
rails generate active_admin:assets

Create User with Endpoint - Routing error

User must be created from an API endpoint it has only one attribute :nick
I sent the Post request with PostMan but I have a routing error
Here are my routes:
resources :users
In Users Controller I have new and createaction, like so:
def new
#user = User.new
end
def create
#user = User.new(user_params)
if #user.save!
head :created
else
head :no_content
end
end
In Postman :
I have selected Post and the url is http://localhost:3000/users/new
In Header I have:
Key Value
Content-Type Application/Json
Here is the body:
{
"data": {
"type": "user",
"attributes": {
"nick": "Liwis"
}
}
}
When I send the request it returns that:
ActionController::RoutingError (No route matches [POST] "/users/new"):
actionpack (6.0.0) lib/action_dispatch/middleware/debug_exceptions.rb:36:in `call'
web-console (4.0.1) lib/web_console/middleware.rb:132:in `call_app'
web-console (4.0.1) lib/web_console/middleware.rb:28:in `block in call'
web-console (4.0.1) lib/web_console/middleware.rb:17:in `catch'
web-console (4.0.1) lib/web_console/middleware.rb:17:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (6.0.0) lib/rails/rack/logger.rb:38:in `call_app'
railties (6.0.0) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (6.0.0) lib/active_support/tagged_logging.rb:80:in `block in tagged'
activesupport (6.0.0) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (6.0.0) lib/active_support/tagged_logging.rb:80:in `tagged'
railties (6.0.0) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.2.2) lib/rack/method_override.rb:24:in `call'
rack (2.2.2) lib/rack/runtime.rb:22:in `call'
activesupport (6.0.0) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/static.rb:126:in `call'
rack (2.2.2) lib/rack/sendfile.rb:110:in `call'
actionpack (6.0.0) lib/action_dispatch/middleware/host_authorization.rb:83:in `call'
webpacker (4.2.2) lib/webpacker/dev_server_proxy.rb:23:in `perform_request'
rack-proxy (0.6.5) lib/rack/proxy.rb:57:in `call'
railties (6.0.0) lib/rails/engine.rb:526:in `call'
puma (4.3.3) lib/puma/configuration.rb:228:in `call'
puma (4.3.3) lib/puma/server.rb:682:in `handle_request'
puma (4.3.3) lib/puma/server.rb:472:in `process_client'
puma (4.3.3) lib/puma/server.rb:328:in `block in run'
puma (4.3.3) lib/puma/thread_pool.rb:134:in `block in spawn_thread'

How to fix "Failed to load resource: the server responded with a status of 404 (Not Found)"?

I am trying to launch a ruby on rails application on my localhost and I receive the following error "Failed to load resource: the server responded with a status of 404 (Not Found)"
Added stack trace below
actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:65:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.7) lib/rack/method_override.rb:22:in `call'
rack (2.0.7) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.7) lib/rack/sendfile.rb:111:in `call'
railties (5.2.3) lib/rails/engine.rb:524:in `call'
puma (3.12.1) lib/puma/configuration.rb:227:in `call'
puma (3.12.1) lib/puma/server.rb:660:in `handle_request'
puma (3.12.1) lib/puma/server.rb:474:in `process_client'
puma (3.12.1) lib/puma/server.rb:334:in `block in run'
puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread'
Solved the error by putting favicon.io in the /public/ directory.

How to fix 'Errno::ENOENT (No such file or directory # realpath_rec - /home/admin/project/spec/mailers)' Ruby on rails?

The server is debian, using nginx web server. I see the logs, the error is because no file or directory. I don't understand. Please help!
It was good before but the I restarted my server and then cannot show the error page:
Here is the log:
Errno::ENOENT (No such file or directory # realpath_rec - /home/admin/project/spec/mailers):
listen (3.1.5) lib/listen/adapter/config.rb:17:in `realpath'
listen (3.1.5) lib/listen/adapter/config.rb:17:in `realpath'
listen (3.1.5) lib/listen/adapter/config.rb:17:in `block in initialize'
listen (3.1.5) lib/listen/adapter/config.rb:16:in `map'
listen (3.1.5) lib/listen/adapter/config.rb:16:in `initialize'
listen (3.1.5) lib/listen/backend.rb:25:in `new'
listen (3.1.5) lib/listen/backend.rb:25:in `initialize'
listen (3.1.5) lib/listen/listener.rb:47:in `new'
listen (3.1.5) lib/listen/listener.rb:47:in `initialize'
listen (3.1.5) lib/listen.rb:41:in `new'
listen (3.1.5) lib/listen.rb:41:in `to'
activesupport (5.2.3) lib/active_support/evented_file_update_checker.rb:96:in `boot!'
activesupport (5.2.3) lib/active_support/evented_file_update_checker.rb:73:in `block in updated?'
activesupport (5.2.3) lib/active_support/evented_file_update_checker.rb:71:in `synchronize'
activesupport (5.2.3) lib/active_support/evented_file_update_checker.rb:71:in `updated?'
railties (5.2.3) lib/rails/application/finisher.rb:159:in `map'
railties (5.2.3) lib/rails/application/finisher.rb:159:in `block (2 levels) in <module:Finisher>'
activesupport (5.2.3) lib/active_support/reloader.rb:81:in `check!'
activesupport (5.2.3) lib/active_support/reloader.rb:63:in `run!'
actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:22:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.7) lib/rack/method_override.rb:22:in `call'
rack (2.0.7) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.7) lib/rack/sendfile.rb:111:in `call'
webpacker (3.6.0) lib/webpacker/dev_server_proxy.rb:22:in `perform_request'
rack-proxy (0.6.5) lib/rack/proxy.rb:57:in `call'
railties (5.2.3) lib/rails/engine.rb:524:in `call'
puma (3.12.1) lib/puma/configuration.rb:227:in `call'
puma (3.12.1) lib/puma/server.rb:660:in `handle_request'
puma (3.12.1) lib/puma/server.rb:474:in `process_client'
puma (3.12.1) lib/puma/server.rb:334:in `block in run'
puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread'

raise ConnectionNotEstablished, "No connection pool with '#{spec_name}' found." unless pool LOCALHOST3000 not working

def retrieve_connection(spec_name) #:nodoc:
pool = retrieve_connection_pool(spec_name)
raise ConnectionNotEstablished, "No connection pool with '#{spec_name}' found." unless pool
pool.connection
end
I am working on a web app from scratch and found lots of errors in the ruby on rails code above. I installed all the gems required and install and connected home page in controller and route.rb but I can't find the solution for this problem.
activerecord (5.2.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:1009:in `retrieve_connection'
activerecord (5.2.2) lib/active_record/connection_handling.rb:118:in `retrieve_connection'
activerecord (5.2.2) lib/active_record/connection_handling.rb:90:in `connection'
activerecord (5.2.2) lib/active_record/migration.rb:554:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (5.2.2) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (5.2.2) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.2) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.2) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.2) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.2) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.2) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.6) lib/rack/method_override.rb:22:in `call'
rack (2.0.6) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.2) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.2) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.6) lib/rack/sendfile.rb:111:in `call'
railties (5.2.2) lib/rails/engine.rb:524:in `call'
puma (3.12.0) lib/puma/configuration.rb:225:in `call'
puma (3.12.0) lib/puma/server.rb:658:in `handle_request'
puma (3.12.0) lib/puma/server.rb:472:in `process_client'
puma (3.12.0) lib/puma/server.rb:332:in `block in run'
puma (3.12.0) lib/puma/thread_pool.rb:133:in `block in spawn_thread'
Check your database.yml file for invisible characters that might be throwing off the spacing. That'll produce the error you're referencing.

Resources