Start Rails server with a require statement by passing an argument -
sometimes use pry , pry-debug debug rails application. problem if use additional ruby processes, in case use sidekiq.
in order make sidekiq code debugable have add following statement
require sidekiq/testing/inline
this fine, it's cumbersome comment every time in , out. there way automate this? thought maybe it's idea create sub-class environment this. take parameters :development
environment, add requirement , start so
$ rails server -e debug
does make sense? don't know how clone or subclass environment, create debug.rb
in config/environments
, , then?
first solution comes mind little bit hackish, @ least should work ;).
require sidekiq/testing/inline if env['debug_env']
then just:
$ debug_env=1 rails server
i go debug environmenr if have more things change.
Comments
Post a Comment