As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
web: | |
<<: *app | |
environment: | |
<<: *web_environment | |
PASSENGER_STARTUP_FILE: "spec/internal_test_hyku/config.ru" | |
PASSENGER_ENGINE: "builtin" | |
PASSENGER_APP_TYPE: "rack" | |
PASSENGER_ADDRESS: "0.0.0.0" | |
PASSENGER_PORT: "3000" | |
PASSENGER_FRIENDLY_ERROR_PAGES: "true" |
# Usage: | |
# | |
# Settings.configure do |c| | |
# c.foo = "biz" | |
# c.bar = "boo" | |
# end | |
# Test.config.foo | |
# => "biz" | |
# Test.configured? |
Installing the ruby PG gem requires Postgres to be instaled locally to install the gem, which is annoying and unnecessary if you're building inside of docker.
An error occurred while installing pg (1.2.3), and Bundler cannot continue.
Make sure that `gem install pg -v '1.2.3' --source 'https://rubygems.org/'` succeeds before bundling.
def my_method | |
# ... | |
rescue NoMethodError => e | |
Sentry.with_scope do |scope| | |
scope.set_tags(foo: "bar") # <= Searchable tags | |
scope.set_context('Model Attributes', @local_instance_variable.attributes) # <= Logs extra hash of data | |
Sentry.capture_message("A test message") # <= Your custom message | |
Sentry.capture_error(e) # <= Log the error | |
end | |
end |
$ rails console -e test --sandbox
require 'factory_bot'; include FactoryBot::Syntax::Methods
require 'benchmark' | |
require 'dry-struct' | |
require 'ostruct' | |
require 'hashie' | |
require 'active_support' | |
class ClassCar | |
attr_accessor :wheels, :mileage | |
end |
require 'nokogiri' | |
require 'uri' | |
require 'net/http' | |
require 'byebug' | |
require 'json' | |
# Block example | |
def requester(url, &block) | |
uri = URI(url) | |
res = Net::HTTP.get_response(uri) |