You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.
Change your logging configuration in the production environment
Currently, console output in the production environment is still stored in the generated log file. In most situations, this isn't desirable, as the console should always print to STDOUT. If you would still like it to be stored in the log file, you can skip this step.
Additionally, if you would like to disable production logging entirely, you can still do this by using disable :log_file. This is often desirable on platforms such as Heroku which already handle logging.
If you wish for console output to be sent to STDOUT, simply modify your config/logging.rb:
configure:productiondoenable:logging# Output to log file except when running consoleset:log_file, !Eucalypt.console?end
Remove conditional IRB dependency
As IRB is not bundled by default in Ruby versions >= 2.6, a quick fix had to be done to include the gem in the Gemfile only if using versions >= 2.6. This was done in the following way:
Old:
source'https://rubygems.org'gem'sinatra','~> 2.0','>= 2.0.4',require: 'sinatra/base'gem'eucalypt','0.7.2'gem'rake','~> 12.3'gem'thin','~> 1.7'# IRB is not bundled in Ruby >= 2.6ifGem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')gem'irb',require: falseend
This should be removed and changed to the following (observe line 3), since this check was unnecessary:
Release 0.8.0 mainly focused on fixing some issues with Rake (specifically RSpec core Rake tasks being loaded in the production environment).
However, there are a few other things in addition to this that you might need to change in your application.
Remove RSpec core Rake tasks from
Rakefile
Old:
New:
Change the CI script in
.travis.yml
frombundle exec rake
tobundle exec rspec spec
This is because the old CI script attempts to use the Rake task that we just removed in the step above.
Old:
New:
Change your logging configuration in the production environment
Currently, console output in the production environment is still stored in the generated log file. In most situations, this isn't desirable, as the console should always print to STDOUT. If you would still like it to be stored in the log file, you can skip this step.
Additionally, if you would like to disable production logging entirely, you can still do this by using
disable :log_file
. This is often desirable on platforms such as Heroku which already handle logging.If you wish for console output to be sent to STDOUT, simply modify your
config/logging.rb
:Old:
New:
Remove conditional IRB dependency
As IRB is not bundled by default in Ruby versions
>= 2.6
, a quick fix had to be done to include the gem in theGemfile
only if using versions>= 2.6
. This was done in the following way:Old:
This should be removed and changed to the following (observe line 3), since this check was unnecessary:
New:
The text was updated successfully, but these errors were encountered: