Reputation: 6189
capistrano 3.19.1
rails 7.1.3
An application was deployed in two environments to different VPS.
The development deployment went off without a hitch.
But the production environment has two quirks:
• the first is a 'something went wrong' error... however, the bigger issue is
• there is no production.log to be found
Given a response is obtained, it appears nginx is routing the call correctly & passenger is not complaining either.
the deploy/[environment].rb
files direct to the proper directories and all files appear to be in place.
Even touch production.log
within th elog directory, then touch tmp/restart.txt
from the current directory does not result in any writing to the log file. Permission stand at -rw-rw-rw-
for the created production.log
.
$ RAILS_ENV=production bundle exec rails c
> Rails.logger
=>
#<ActiveSupport::BroadcastLogger:0x00007f1c625c0a78
@broadcasts=
[#<ActiveSupport::Logger:0x00007f1c625e73f8
@default_formatter=#<Logger::Formatter:0x00007f1c625cb9f0 @datetime_format=nil>,
@formatter=#<Logger::Formatter:0x00007f1c625c9a38 @datetime_format=nil>,
@level=1,
@level_override={},
@logdev=
#<Logger::LogDevice:0x00007f1c625e80c8
@binmode=false,
@dev=#<IO:<STDOUT>>,
@filename=nil,
@mon_data=#<Monitor:0x00007f1c625cb928>,
@mon_data_owner_object_id=4960,
@shift_age=nil,
@shift_period_suffix=nil,
@shift_size=nil>,
@progname=nil>],
@formatter=#<Logger::Formatter:0x00007f1c625c9a38 @datetime_format=nil>,
@progname="Broadcast">
Not having any logs puts one at a loss for debugging...
what should be explored?
Update
The logging was being registered in nginx logs /var/log/nginx.error.log
which revealed the 'something went wrong' problem.
ActionView::Template::Error (The asset "application.css" is not present in the asset pipeline.
this required a
RAILS_ENV=production bundle exec rails assets:precompile
to overcome the error.
Still, the compilation of assets should occur and the logging should not be registered in gninx's error log.
The conundrum remains whole: a single deploy.rb
file but different behaviours between development and production (requiring a re-titling of the question) ...
Upvotes: 0
Views: 52