# Modules and Libraries
# FAQ
# How to list rake tasks?
rake -T
- https://batsov.com/articles/2012/03/08/ruby-tip-number-2-get-a-list-of-all-rake-tasks/ (opens new window)
- https://ruby.github.io/rake/ (opens new window)
# How to use map() function?
[1,2,3].map{ |x| puts(x) }
# return [nil, nil, nil]
[1,2,3].map{ |x| x+1 }
# return [2,3,4]
# How to find a gems?
By executing gem locally
gem search ${package_name}
By using official ruby gems website:
- https://rubygems.org
# How to set ruby environment variable?
RUBYLIB: A colon-separated list of directories that are added to Ruby's library load path ($:). Directories from this environment variable are searched before the standard load path is searched. e.g.:RUBYLIB="$HOME/lib/ruby:$HOME/lib/rubyext"RUBYOPT: Additional Ruby options. e.g.RUBYOPT="-w -Ke". Note that RUBYOPT can contain only -d, -E, -I, -K, -r, -T, -U, -v, -w, -W, --debug, --disable-FEATURE and --enable-FEATURE.RUBYPATH: A colon-separated list of directories that Ruby searches for Ruby programs when the -S flag is specified. This variable precedes the PATH environment variable.RUBYSHELL: The path to the system shell command. This environment variable is enabled for only mswin32, mingw32, and OS/2 platforms. If this variable is not defined, Ruby refers to COMSPEC.PATH: Ruby refers to the PATH environment variable on calling Kernel#system.https://manpages.debian.org/buster/ruby/ruby.1.en.html (opens new window)
https://manpages.debian.org/buster/ruby-bundler/bundle.1.en.html (opens new window)
https://bundler.io/v1.16/bundle_config.html#LIST-OF-AVAILABLE-KEYS (opens new window)
https://www.rubyguides.com/2019/01/ruby-environment-variables/ (opens new window)
# Where bundle is storing its configuration by default?
.bundle/config
# How to deal with backtrace?
- https://ruby-doc.org/core-2.7.0/Exception.html (opens new window)
- https://blog.appsignal.com/2018/02/06/reading-and-understanding-ruby-stack-traces.html (opens new window)
- https://blog.appsignal.com/2018/02/06/reading-and-understanding-ruby-stack-traces.html (opens new window)
- https://github.com/yegor256/backtrace (opens new window)
← アタエタ