Dart programming is a language optimized for building user interfaces used in the Flutter mobile framework. It combines the world of OOP and functional. I am a big fan of functional programming, One of the problems in Dart I found boring and inconvenient is to write the built-in List#map API…


class ShipmentItem < ApplicationRecord  has_one_attached :image  validates :width, presence: true, if: ->(item) { !item.image.attached?}end
it 'is valid if image is attached' do file = Rails.root.join('spec', 'support', 'assets', 'shipment_item', 'wine-box.jpeg')image = ActiveStorage::Blob.create_after_upload!( io: File.open(file, 'rb'), filename: 'wine-box.jpeg', content_type: 'image/jpeg' # Or figure it out from `name` if you have non-JPEGs).signed_id shipment_item = ShipmentItem.new(image: image) expect(shipment_item.valid?).to eq trueend


From time to time I have this warning

Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4

Now I can inspect

gem list bundler

The…


Building a non-refresh web app with a desktop-like experience is not that hard, you just need a right tool.

Introduction

Vuejs is a great javascript framework, but building a full functionality web app is not easy. It lacks an architectural structure and its router generates a lot of boilerplate code. This…


The new macOS Catalina 10.15 with default openssl@1.1 build failed.

use the following to install it.

RUBY_CONFIGURE_OPTS=”-with-openssl-dir=/usr/local/opt/openssl” rbenv install 2.3.1

gem libv8 issue in macOS 10.15 Catalina

Install libv8 v=6.7.288.46.1 get stuck with macOS Catalina. Update mini_racer to depend on the libv8 version greater than 7.x.x.

I had gem ‘mini_racer’, ‘~> 0.2.4’ which depends on libv8(6.7.288.46.1).

#…


Docker is a great tool to isolation your env from the host machine. You can consider Docker as a virtual machine like VMWare or VirtualBox but with a much lighter and more friendly and flexible.

This blog is dedicated for Ruby on Rails apps, but you might find it usually…


I’ve been through some of the problems that were hard enough for me that I was not even sure if an optimal solution existed.

After having solved those problems, I have seen a pattern that is useful for solving general problem especially when the problem is abstract or you are…


Elasticbeantalk is a great service to deploy your app with minimum setup and you get app auto-scale out of the box without a need set up your own application load balancer from scratch.

In a web application, there is always a need to choose a domain as your primary domain…


Last weekend I was exploring a solution to a daily problem of one of my friends to see how can technology help make life easier.

If you happen to travel from city to city using public transportations and you are not at the edge of where the fleet departs, you…


ObEE is an open source, next generation Media Streaming end to end solution that supports modern streaming protocol HLS, Dash, WebRTC running on Linux, Nginx, FFMpeg and Janus.

The application runs on Erlang VM that support on demand video streaming, video broadcasting, live streaming, video and audio call, media annotation…

Ly Channa

A Software engineer and an Agile practitioner. My daily tasks: nodejs, rubyonrails, TDD, SQL, Bash, AWS, Circleci Js and more.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store