Rubyland

news, opinion, tutorials, about ruby, aggregated
Sources About
Scott Watermasysk 

Vcr And Chromium Updates

I noticed today that VCR was reporting a request I was not expecting1.

In this project, I am using Chrome via the webdrivers gem. I did not dig too deeply, but it appears this is just a check to see if there is a new version available. I set this up a month or so again, so my guess is it was triggered by a change in the date.

I do not want this check happening in the tests. Nor do always need the latest version of Chromium. So I added this to my rails_helper:

Webdrivers::Chromedriver.required_version = "76.0.3809.126"

In the future, if I run into any Chrome specific issues or need to test a newer browser feature, I can update then.

  1. If you are not familiar with VCR it…

RubyGuides 

7 Best Ruby Gems That Most People Haven’t Heard About

What are the best Ruby gems that you can use in your Rails projects?

That’s what you’ll discover in this article!

I’m going to give you 7 gems, but not the same old gems that you’ve seen a million times, I’m going to be sharing with you some gems that are very helpful, but little-known.

But before we do that…

A warning.

I’ve seen developers that pull in a gem for just about everything.

If it remotely sounds like it could be helpful.

Without taking a moment to think if that gem solves the problem they have, if it’s the best option, well-maintained & documented, etc.

That’s a mistake.

Why?

Because the more things your project depends on, the more likely it’s to break when things change.

And…

RubyMine Blog 

Ending Support for RubyMotion and Heroku Integration Plugins

Dear all,

We plan to discontinue support for the following plugins in RubyMine v2019.3:

Unfortunately, these plugins have gained very little traction and are seldom used, coupled with the impractical maintenance they need, we feel that our efforts would be best spent elsewhere.

The end of support means that these plugins will be incompatible with v2019.3 and newer, and they will no longer be updated. Therefore, new feature requests and bug reports will also not be accepted.

We are publishing the source code for the RubyMotion support plugin in case you want to customize it for your own needs or contribute to it and support it for the community: https…

Remote Ruby 

StimulusReflex with Nate Hopkins

Appfolio Engineering 

Benchmarking Fibers, Threads and Processes

Awhile back, I set out to look at Fiber performance and how it's improved in recent Ruby versions. After all, concurrency is one of the three pillars of Ruby 3x3! Also, there have been some major speedups in Ruby's Fiber class by Samuel Williams.

It's not hard to write a microbenchmark for something like Fiber.yield. But it's harder, and more interesting, to write a benchmark that's useful and representative.

Wait, Wait, Wait - What?

And don’t get me started on parallelism…

And don’t get me started on parallelism…

Okay, first a quick summary: what…

Julia Evans 

Taking a year to explain computer things

I’ve been working on explaining computer things I’m learning on this blog for 6 years. I wrote one of my first posts, what does a shell even do? on Sept 30, 2013. Since then, I’ve written 11 zines, 370,000 words on this blog, and given 20 or so talks. So it seems like I like explaining things a lot.

tl;dr: I’m going to work on explaining computer things for a year

Here’s the exciting news: I left my job a month ago and my plan is to spend the next year working on explaining computer things!

As for why I’m doing this – I was talking through some reasons with my friend Mat last night and he said “well, sometimes there are things you just feel compelled to do”. I think that’s all there…

RubyMine Blog 

RubyMine 2019.3 EAP is Open!

Hi everyone,

RubyMine 2019.3 EAP (build 193.2956.44) is now open! In this release, our main focus has been on your feedback and the IDE quality: we’ve added a mapping of Rubocop severities to RubyMine inspection severities, fixed up navigation to usages of class or module constants, resolved a number of issues related to find usages and polymorphic association code insight, and so on. We’ve also polished some of the editor capabilities related to Ruby 2.7 support.

Here’s the list of improvements that have been made:

JetRockets 

How to parse CSV with double quote (") character in Crystal

JetRockets 

How to use Rails translations for Reform attributes

Awesome Ruby Newsletter 

💎 Issue 173 - Euruko 2019: How Netflix is using Ruby on Rails

AkitaOnRails.com 

[Akitando] #36 - O Mercado de TI para Iniciantes em Programação | Série "Começando aos 40"

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

O ano virou e eu resolvi tirar 2 semanas de "férias" pra mim mesmo, mas agora estou de volta!

Me fizeram uma pergunta interessante: como uma pessoa de 40 anos pode mudar de carreira e entrar no mercado de programação?

Não dá pra responder isso de forma curta, então resolvi tentar produzir uma mini-série, e hoje vou iniciar com o Primeiro Episódio apresentando rapidamente um panorama do mercado como um todo e algumas…

AkitaOnRails.com 

[Akitando] #37 - A Dimensão do TEMPO para Iniciantes em Programação | Série "Começando aos 40"

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Este é o 2o episódio da série "Começando aos 40" e hoje quero ajudar a aliviar um pouco a ansiedade dos programadores iniciantes.

Começando agora você não sabe por onde começar. Devo aprender mobile? Devo aprender Web? Se for Web, devo aprender PHP? Ou então Java? Mas e Machine Learnine? E Big Data?

Antes de tentar explicar um pouco desses assuntos vocês precisam entender como chegamos até aqui.

Mais importante, entender…

AkitaOnRails.com 

[Akitando] #42 - Entendendo Apple, GPL e Compiladores

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Finalmente! Chegamos no episódio 42!

Se você é geek que nem eu sabe que 42 é um número especial. Segundo o sábio profeta Douglas Adams o número 42 é a resposta da vida, do universo e de tudo. Se não acreditam leiam a bíblia do Guia do Mochileiro das Galáxias. De curiosidade é por isso que minha empresa se chama Codeminer 42. E em especial este ano eu vou completar meus 42 anos. Mas chega de numerologia, vamos começar a…

AkitaOnRails.com 

[Akitando] #41 - Entendendo Back-End para Iniciantes em Programação (Parte 2) | Série "Começando aos 40"

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Esta é a Parte 2 do tema de Back-end para Iniciantes. Desta vez vamos olhar com mais cuidado sobre gerenciamento de dependências, o que diabos são dependências, e linguagens como Groovy, Scala, Elixir, Go e um pouco de Ruby e Ruby on Rails também.

Provavelmente este vai ser o episódio mais difícil deste canal até agora, se você é iniciante, e você vai precisar ver e rever várias vezes, mas se você está levando a sério se…

AkitaOnRails.com 

[Akitando] #40 - Entendendo Back-End para Iniciantes em Programação (Parte 1) | Série "Começando aos 40"

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Este é o 5o episódio da série "Começando aos 40". Você deve assistir os episódios anteriores da série pra entender onde estamos e recomendo assistir os 2 vídeos da série "Sua Linguagem Não É Especial". No episódio de hoje vou começar a introduzir os conceitos básicos para o que chamamos de "back-end", que na prática é a própria introdução à programação.

A intenção do vídeo não é serem aulas nem tutoriais, mas conectar os…

AkitaOnRails.com 

[Akitando] #39 - A História do Front-End para Iniciantes em Programação | Série "Começando aos 40"

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Este episódio vai testar a paciência de vocês. Desta vez quero explorar um pouco os diversos assuntos que são associados com a tal carreira de "Front-End" no mundo de desenvolvimento Web.

Se já começaram a estudar o assunto devem ter visto que existe uma infinidade de sopas de letrinhas, coisas como SASS, CSS, React, Vue, e muito mais. Por que existem tantas letrinhas assim? Quais escolher?

Obs: eu fico falando "Webpacker" o…

AkitaOnRails.com 

[Akitando] #38 - Conhecimentos Básicos para Iniciantes em Programação | Série "Começando aos 40"

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Neste terceiro episódio da série "Começando aos 40" vou finalmente começar a tocar em assuntos mais práticos, pra começar o que eu considero que é o absolutamente básico que você precisa começar a dominar o quanto antes.

Neste e nos próximos 2 episódios, pelo menos, vou dar uma visão mais estruturada do que considero que a carreira de "desenvolvedor Web" envolve para que você tenha uma idéia 'macro' do que deve planejar para…

AkitaOnRails.com 

[Akitando] #34 - Você não sabe nada de Enterprise. Conhecendo a SAP!

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Certamente ninguém ia ver video ontem, então fica meu presente de natal hoje mesmo :-) (26/12)

Finalmente, um dos episódios mais longos da minha carreira. Vamos entender um dos mercados menos compreendidos por toda a comunidade de programação.

Quase nenhum programador de agência, startup, tem idéia do que realmente é o tão temido mercado "enterprise".

Então em vez de ficar falando mal sem saber, vou explicar o que diabos…

Ruby on Rails Podcast 

286: SQL Smart with Nancy Sheleheda

Nancy Sheleheda, Senior Director of Application Development at PCT, joined Brittany to discuss why it is important to learn SQL, to engage in a debate on differences between a developer and a DBA and introduce some great resources to leveling up on SQL.

Links for this episode:

Brought to you by:

Datadog

Datadog is a monitoring and analytics platform for cloud-scale infrastructure, applications and logs. Datadog integrates seamlessly with more than 350 technologies, so you can track every layer of your complex microservice architecture, all in one place.

See for yourself - start a 14-day free trial today and Datadog will send you a free T-shirt!…

Passenger - Phusion Blog 

Passenger 6.0.3 Restarting the Releases

Passenger 6.0.3 Restarting the Releases

Version 6.0.3 of the Passenger application server has been released. As you may have noted this release took much longer than usual and delayed support for Ubuntu 19.04, we have our CI system back up and running, and can cut releases again.

Passenger 6, introduced Generic Language Support, or: the ability to support any and all arbitrary apps.

Specify Spawn Dir Location

Passenger 6.0.3 adds an option to specify the app spawn directory during startup, which is specifically useful for CageFS users. Contributed by @plmnikulin.

- Apache: `PassengerSpawnDir`
- Nginx: `passenger_spawn_dir`

This addition closes issue GH-2145.

Updates & improvements

  • [Nginx] Bumps the preferred Nginx version to…

AkitaOnRails.com 

[Akitando] #33 - Problemas de Confiança para Pessoas inseguras

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Falar sobre problemas psicológicos sempre é um risco, mas vou evitar cair na psicologia de bar.

O episódio desta semana vai ser um pouco "auto-ajuda" mesmo, mas como eu sou eu, vai ser contando minha perspectiva num relacionamento profissional e pessoal estando dos dois lados e como uma pessoa insegura e introvertida como eu (sim, se você não sabia), lida com isso,

Script

Olá pessoal, Fabio Akita

O episódio de hoje vai ser…

AkitaOnRails.com 

[Akitando] #32 - Como eu aprendi Inglês? E entendendo "padrões"!

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Errata a 25:16 a legenda está "colégio" mas é "faculdade" :-)

Novamente um episódio que ficou um pouco longo então será o único desta semana.

Desta vez quero explorar como eu aprendi inglês e aproveitar pra explicar porque é tão importante inglês na nossa área e também porque NÃO é tão complicado como muita gente pensa. Trabalhoso, sim. Caro ou complicado, não.

Uma tangente neste assunto será tocar no que muita gente pensa…

AkitaOnRails.com 

[Akitando] #31 - Manifesto Anti-Parasita: Seja um Criador

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Disclaimer: este episódio é bem "atípico", não espere que eu faça esse formato sempre, é só hoje, uma indulgência a mim mesmo :-D É só uma coisa que tive vontade de testar. E a música vai ser mais alta mesmo, de propósito pra dar mais peso no texto.

Hoje resolvi fazer uma coisa um pouco diferente, eu ia gravar isso eventualmente mas por razões pessoais decidi que ia ser agora.

Esse discurso me motiva toda vez que eu me sinto…

AkitaOnRails.com 

[Akitando] #30 - Minha Máquina do Tempo | Meus Sites de Anime

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Uma coisa que recomendo que todo mundo faça: backups. Faça backup de todos os seus trabalhos. Daqui 20, 30 anos, você vai se agradecer por ter feito isso.

Aproveitando a dica, quero abrir uma pequena janela pra um hobby que eu tinha nos anos 90: os sites de anime que eu fazia.

E ainda terminando com uma confusão que deu até boletim de ocorrência :-D

Links:

  • Meu Passado Otaku – A revista de anime que publicou… um Boletim de…
AkitaOnRails.com 

[Akitando] #29 - O que eu devo estudar? Vou conseguir emprego?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Uma das maiores dúvidas de jovens programadores é sobre que linguagem aprender primeiro. Qual vai ter mais chances de ter emprego e ter mais oportunidades?

Parece que se aprender linguagens novas como Go ou Elixir vão ter menos oportunidades, mas porém parecem ser o futuro. Como conciliar aprender linguagens novas que tem menos mercado ao mesmo tempo que trabalhar com linguagens mais tradicionais como Java?

Vou dar meus 2…

AkitaOnRails.com 

[Akitando] #28 - Sua Vida em Anime: KAIJI

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Por coincidência, depois dos episódios sobre Talento e Matar Semi-Deuses da semana passada, comecei a assistir este anime de 2007: Kaiji.

Fiquei impressionado com a forma como eles montaram uma alegoria que descreve como é a vida real da maioria das pessoas.

Este episódio vai continuar explicando o meu conceito de "prática deliberada" usando a história deste anime como pano de fundo.

Assista no Crunchyroll:…

AkitaOnRails.com 

[Akitando] #27 - Talento: Matando Semi-Deuses (Parte 2)

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

No episódio anterior vocês entenderam o que aconteceria se Einstein ou Darwin não tivessem existido.

Mas se ainda resta dúvidas, hoje vamos desconstruir Mozart e na sequência, através das pesquisas condensadas por Geoff Colvin, definir o que de fato diferencia uma má prática de uma boa prática se o objetivo é um dia alcançar níveis de Mozart.

Esta segunda parte conclui a primeira etapa do que eu chamo de "Aprendendo a…

AkitaOnRails.com 

[Akitando] #26 - Talento: Matando Semi-Deuses (Parte 1)

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Finalmente vou começar a estruturar um pouco minha idéia sobre "Aprendendo a Aprender" que eu venho soltando nos vídeos anteriores. Esta semana vou contar algumas histórias e matar alguns conceitos que vocês talvez ainda tenham.

Antes de começar, você precisa esvaziar seu copo, e a única forma de fazer isso é quebrar algumas coisas que você acreditava que eram verdade até agora, e só então construir em cima disso.

Muitos…

AkitaOnRails.com 

[Akitando] #25 - Sua Linguagem É Especial? Parte 2 em 2001

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Recapitulando, na série "Sua Linguagem NÃO é especial" expliquei porque tudo que você acha que é diferente e moderno na sua linguagem já existia décadas atrás.

No episódio anterioe eu comecei a explorar um pouco o outro lado: ninguém disse que você não pode gostar da sua linguagem e, mais importante, dominá-la até o fim.

Veja o que eu fazia quando estava no começo da minha carreira e compare com o que você faz hoje em dia.

AkitaOnRails.com 

[Akitando] #24 - Sua Linguagem É Especial? Parte 1 em 2001

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Muito bem, na série "Sua Linguagem NÃO é especial" expliquei porque tudo que você acha que é diferente e moderno na sua linguagem já existia décadas atrás.

MAS, isso dito, nesta nova série eu quero explorar um pouco o outro lado: ninguém disse que você não pode gostar da sua linguagem e, mais importante, dominá-la até o fim.

Veja o que eu fazia quando estava no começo da minha carreira e compare com o que você faz hoje em…

AkitaOnRails.com 

[Akitando] #23 - The MM-M: O Melhor Livro de Software?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Vocês vão encontrar dezenas de listas de "Top 10 Livros sobre desenvolvimento de Software". Mas como realmente confiar numa lista? Vou explicar um dos critérios que eu uso para escolher.

E aproveitando o gancho do vídeo anterior, de porque blockchains não são balas de prata pra tudo, vamos ver a origem da frase Balas de Prata.

O livro The MM-M é possivelmente um dos livros que eu consideraria obrigatório a qualquer um que…

AkitaOnRails.com 

[Akitando] #22 - Blockchains servem pra Eleições?

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

As eleições acabaram de acabar, independente do resultado (eu gravei este vídeo um dia antes da votação) o assunto é relevante do mesmo jeito. Muitos se perguntam: é possível usar blockchains nas eleições públicas?

Na minha conferência THE CONF, que aconteceu no fim de Setembro deste ano, tivemos a ilustre presença do professor Diego Aranha. A gravação de sua palestra sairá em breve no canal da InfoQ Brasil. Mas juntando o…

AkitaOnRails.com 

[Akitando] #21 - Entendendo Blockchain em São Francisco

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Finalmente, para finalizar minha "Peregrinação Blockchain" pelo mundo, eu termino em São Francisco. Participei do evento Epicenter do SF Blockchain Week nos dias 8 e 9 de Outubro de 2018.

Neste episódio, além de descrever a situação atual dos Estados Unidos do ponto de vista de investidores ocidentais e orientais, vou explicar conceitos que NINGUÉM explica da forma certa em nenhum canal do Brasil. Os evangelistas brasileiros…

AkitaOnRails.com 

[Akitando] #20 - Malta: A Ilha do Blockchain

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Nos dias 4 e 5 de Outubro de 2018 eu fui visitar a Ilha de Malta para assistir à conferência Delta Summit, a maior conferência de blockchain e criptomoedas do país neste ano. O evento lança a promulgação das leis do país específicas para blockchains e torna a Ilha um lugar propício para empresas neste mercado.

O evento foi aberto por ninguém menos que o primeiro-ministro de Malta, Dr. Joseph Muscat e o primeiro-ministro…

AkitaOnRails.com 

[Akitando] #19 - Devo fazer Faculdade? (Eu, 22 anos depois)

Disclaimer: esta série de posts são transcripts diretos dos scripts usados em cada video do canal Akitando. O texto tem erros de português mas é porque estou apenas publicando exatamente como foi usado pra gravar o video, perdoem os errinhos.

Descrição no YouTube

Continuando no tema de "Devo fazer faculdade?" e de histórias pessoais hoje quero falar um pouco da minha faculdade e meu início de carreira, mais de 20 anos atrás, como era a minha época. E vocês sabendo como eu estou hoje, veja o contraste de como era pra mim e como isso afetou o que faço até hoje.

  • Os Bastidores da Internet no Brasil (https://www.amazon.com.br/Os-Bastidores-Internet-no-Brasil/dp/8520417086)

Os links…

Julia Evans 

New zine: HTTP: Learn your browser's language!

Hello! I’ve released a new zine! It’s called “HTTP: Learn your browsers language!”

You can get it for $12 at https://gum.co/http-zine. If you buy it, you’ll get a PDF that you can either read on your computer or print out.

Here’s the cover and table of contents:

why http?

I got the idea for this zine from talking to Marco Rogers – he mentioned that he thought that new web developers / mobile developers would really benefit from understanding the fundamentals of HTTP better, I thought “OOH I LOVE TALKING ABOUT HTTP”, wrote a few pages about HTTP, saw they were helping people, and decided to write a whole zine about HTTP.

HTTP is important to understand because it runs the entire…

Ruby Weekly 

An interview with Ruby Object Mapper's Piotr Solnica

#467 — September 12, 2019

Read on the Web

In issue 460 we included an interview with benchmarking expert Noah Gibbs. A lot of you loved how it came out.. so we're back with a new interview with Piotr Solnica of ROM and dry-rb fame! Find it at the end of the issue.

Ruby Weekly

▶  A Plan Towards Types in Ruby 3 Types — Ruby core team member Yusuke Endoh (who is famed for his prowess in the IOCCC) presents an update on progress to supporting the static analysis of types in Ruby 3, currently in a way that doesn’t hugely change the simple Ruby development experience we know and love.

Yusuke Endoh

Running GitHub on…

Semaphore 

How to Release Faster with Continuous Delivery for Google Kubernetes

In the beginning, Google created Kubernetes. “Let it be open source,” Google said, and the sources opened. And Google saw that it was good. All kidding aside, if anyone knows about Kubernetes, it’s Google.

In this hands-on post, we’ll learn to deliver continuously a demo application to Google Kubernetes using Semaphore CI/CD. By the end, you’ll know how Semaphore and Google Cloud can work together and, even better, you’ll have a continuous delivery pipeline to play with.

Prerequisites

Before we begin, you’ll need to sign up a few services: Google Cloud Platform will be our cloud provider, as well as GitHub for the application code and Semaphore for the CI/CD.

In this section,…

Blog 

Ruby vs. Elixir —Which One to Choose and When?

Over the past couple of years, we wrote extensively about Ruby (and Ruby on Rails), so you know we like it quite a bit. We’ve also dabbled some in Elixir (and Phoenix), but never before have we compared the two side by side to see which one is a better fit and when. So here it goes.

Prathamesh Sonpatki 

Making friends with RuboCop

At Memory.ai, we started using RuboCop heavily. This is a story of how we integrated RuboCop into our existing app.

This is not an introductory post to RuboCop. Check out what RuboCop is before diving into our experience report.

We started with rubocop, rubocop-performance, rubocop-rails and rubocop-rspec gems. We enabled all cops by default, this was our initial configuration in rubocop.yml

require:
  - rubocop-rspec
  - rubocop-rails
  - rubocop-performance

AllCops:
  EnabledByDefault: true
  TargetRubyVersion: 2.6.3
  Exclude:
    - 'app/views/**/*'
    - 'db/**/*'
    - 'bin/**/*'
    - 'csv/**/*'
    - 'slate/**/*'
    - 'vendor/bundle/**/*'
    - 'node_modules/**/*'

If you enable all…

BigBinary Blog 

Rails 6 marks arrays of translations as trusted safe by using the '_html' suffix

This blog is part of our Rails 6 series. Rails 6.0 was recently released.

Before Rails 6

Before Rails 6, keys with the _html suffix in the language locale files are automatically marked as HTML safe. These HTML safe keys do not get escaped when used in the views.

# config/locales/en.yml

en:
  home:
    index:
      title_html: <h2>We build web & mobile applications</h2>
      description_html: We are a dynamic team of <em>developers</em> and <em>designers</em>.
      sections:
        blogs:
          title_html: <h3>Blogs & publications</h3>
          description_html: We regularly write our blog. Our blogs are covered by <strong>Ruby Inside</strong> and <strong>Ruby Weekly…
<!-- app/views/home/index.html.erb -->

<%= t('.title_html') %>
<%= t('.description_html') %>

<%= t('.sections.blogs.title_html') %>
<%= t('.sections.blogs.description_html') %>

Once rendered, this page looks like this.

rails-6-supports-marking-arrays-of-translations-as-html-safe/before-rails-6-i18n-_html-suffix-without-array-key.png

This way of…

Semaphore 

iOS 13: The Top 5 Features Your App Needs Now

At WWDC 2019, Apple announced many improvements for iOS 13, such as the much-hyped Dark Mode and increased privacy capabilities. Apple tends to highlight apps in the App Store that implement new features, so now is the time to optimize your apps for the new iOS 13 features.

Today, I will highlight the five most important features that you, as an iOS developer, should plan to implement.

1. Dark Mode

Prepare your apps for the Dark Mode feature in iOS 13. Apple is putting so much emphasis on Dark Mode that the WWDC 2019 event environment was totally dark. 

Before this update, you have likely seen apps emulating this capability by creating their own themes using the UIAppearence cl…

All Ruby Podcasts by Devchat.tv 

MRS 095: Daniel Gruesso

Episode Summary

This episode of My Ruby Story is coming to you live from OSCON. Joining Charles Max Wood is Daniel Gruesso from GitLab to talk about developing in the Open Source and the Developer Report.

GitLab works with an open core model, Daniel talks about the trade - offs of having code open to public, the first of which is having everything up-to-date so any contributions made will work with the latest version. Daniel calls this the "bus-factor" where if one of the team members gets hit by a bus, the rest of the team will have everything to work with.

They then talk about the GitLab 2019 Global Developer Report results. One of the most interesting results of this survey with over…

All Ruby Podcasts by Devchat.tv 

RR 429: Mechanical Confidence with Adam Cuppy

Episode Summary

Adam Cuppy is the cofounder and current chief operating officer at Zeal, web and mobile app consultancy. Today the panel is discussing the talk he gave at Rails Conf called Mechanically Confident. Adam has a hypothesis that confidence is not the result of belief alone but ingrained routine. The more routine, the more pattern, the more rehearsal applied to a given thing, the more confident you are with that thing

The history behind Adam’s theory stems from his background in theater and performing arts. The concept of rehearsal is commonplace in the performing arts, but not other industries. He talks about where rehearsal comes in for programmers and how he has noticed the…

RubySec 

Devise Gem for Ruby confirmation token validation with a blank string

The Bike Shed 

213: Admins Matter Too

On this week's episode, Steph discusses a mini design sprint she led to help validate an internal admin tool while Chris muses on the merits of net negative lines of code on a project. They dig into the idea that while code can certainly be an asset, it may also be a liability. They investigate ActiveSupport::MessageVerifier for secure time-sensitive tokens. Steph shares details about her recent visit to the Ruby on Rails Podcast and Chris shares the recording for a talk he gave on understanding technology choices. Lastly, they round out the conversation with a listener question about build times and lock files and how to organize and split up our tests.

RubyGuides 

Understanding The Ruby Next & Break Keywords

Keywords, like next & break are part of the Ruby programming language, so if you want a complete understanding of Ruby you need to know how these keywords work.

What are they used for?

Well, in Ruby, we have all kinds of loops.

Like:

  • while
  • until
  • each
  • times
  • etc…

When writing a loop, you may want to skip an iteration, or to end the loop early.

That’s where the next & break keywords come in!

Let’s discover how they work.

Ruby Next Keyword

The next keyword allows you to skip one iteration.

Let’s say you’re counting strings.

But, for some reason, you don’t want to count strings with a size of 4.

You could do this:

strings = ["one", "two", "four", "five"]

strings.inject(0) do |sum, str|
 …
Ruby Conferences 'n' Camps in 2019 - What's Upcoming? 

RubyConf Brazil @ São Paulo, Brazil - Ruby Conferences 'n' Camps Update

Conferences 'n' Camps

What's News? What's Upcoming in 2019?

RubyConf Brazil
Nov/28+29 (2d) Thu+Fri @ São Paulo, Brazil • (Updates)

See all Conferences 'n' Camps in 2019».

Andy Croll 

Use a custom validator

Active Model’s validations, used by calling validates inside your model with various options, can be supplemented with your own custom classes. The Rails Guides contains a section on custom validations.

Instead of…

…using complex code in your validates calls:

class Invite
  validates :invitee_email, format: {
    with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i,
    message: "is not an email"
  }
end

Use…

…a validator class and extract the logic into it:

# app/validators/email_validator.rb
class EmailValidator < ActiveModel::EachValidator
  def validate_each(record, attribute, value)
    unless value =~ /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
      record.errors[attribute] <<
class Invite
  # Rails "magic" infers the name of the validation
  validates :invitee_email, email: true
end

Why?

If you have a validation…

Julia Evans 

How to put an HTML page on the internet

One thing I love about the internet is that it’s SO EASY to put static HTML websites on the internet. Someone asked me today how to do it, so I thought I’d write down how really quickly!

just an HTML page

All of my sites are just static HTML and CSS. My web design skills are relatively minimal (https://wizardzines.com is the most complicated site I’ve developed on my own), so keeping all my internet sites relatively simple means that I have some hope of being able to make changes / fix things without spending a billion hours on it.

So we’re going to take as minimal of an approach as possible in this blog post – just one HTML page.

the HTML page

The website we’re going to put on the…

Awesome Ruby Newsletter 

💎 Issue 172 - Welcome to Sidekiq 6.0

GoRails Screencasts 

How to Test Validations in Rails

Learn how to write tests for validations on ActiveRecord objects in Ruby on Rails
Semaphore 

Serverless CI/CD and hosting with Semaphore and ZEIT Now

Serverless is one of those concepts that in hindsight seems obvious and makes you wonder why no one came up with it earlier.

At its core, it involves breaking up the application into smaller functions, called lambdas, and distributing them in the cloud. Lambdas, by their very nature, scale; this is because they are only run when needed, with resources allocated on-demand. Also, since there are no wasted resources, they tend to be cheaper to run than a full-fledged server or even a container.

Servers also rear their ugly heads during project development. Apps must be tested somewhere—too often a spare machine running some musty integration product. Once more, we find the same answer…

Ruby Weekly 

Sidekiq 6.0 released, and Matz says no to the pipeline operator

#466 — September 5, 2019

Read on the Web

Ruby Weekly

Matz Says Bye Bye to the Pipeline Operator |> — The ‘pipeline operator’ was a piece of syntax added to Ruby head on an experimental basis as an alternative to method chaining, but Matz said it caused ‘more confusion and controversy’ than he had expected. However, the idea of letting comments appear within multiline method chains appears to have stayed..

The Ruby Programming Language

Sidekiq 6.0 Released — The popular background job framework reaches 6.0 by both adding (logging formatters, ActiveJob integration) and taking away (init.d daemons). Pro and…

JetRockets 

Redux async actions. Tracking loading and errors with React hooks.

Martian Chronicles, Evil Martians’ team blog 

GitHub Actions: First impressions

Author: Vladimir Dementyev, Lead Developer at Evil Martians

GitHub Actions are coming on strong—in my team, almost everyone who has applied for a beta program, me included, had recently got access to GitHub’s latest “killer feature” that threatens to make life harder for Travis CI and CircleCI: Continuous Integration with GitHub Actions. Here are my first impressions.

For the ultimate test, I decided to reuse the documentation generator setup from my previous article: “Keeping OSS documentation with Docsify, Lefthook, and friends”). To lint a documentation website for AnyCable, I used Lefthook locally and CircleCI for production. For my next documentation project, the one for TestProf

OmbuLabs Blog 

Service Objects: beyond fat models and skinny controllers

Service Objects are a controversial idea for several different reasons: some developers like to use them, others like to use similar patterns, and some think that they are just unnecessary because they prefer fat models.

Here at Ombu Labs we like to use service objects whenever we can, we think it's a great way to keep our controllers skinny.

In this post I would like to discuss my idea about service objects and why it's adopted by our team.

What is a Service Object?

A Service is a stateless object that encapsulates a set of steps and usually has a single purpose. It's a great resource to decompose fat Active Record models while still keeping the controllers thin, because we take…

Search Results for “ruby” – Journeys of a not so young anymore Software Engineer 

On Going Freelance

At the end of a lengthy job search I decided to become a freelancer helping companies onboard onto Elixir, helping them with their development projects and processes, some performance work, pushing Open Source and maybe even a bit of interim CTOing or other consulting. Who knows what the future will hold? Right now I’m on […]
Pat Shaughnessy 

Using Rust to Build a Blog Site


Rust comes with batteries included
(source: Wikimedia Commons)

After “Hello World,” blog sites are the world’s second most unneeded application. If you want to write a blog, use Medium, Wordpress or just Twitter. The world doesn’t need another blog app.

However, like Hello World, building a static site generator is a great way to get your feet wet in a new programming language. Recently I rewrote the script I use to generate this web site using Rust: I needed to update and fix my script, but really I was looking for an excuse to write Rust. Despite its reputation as a difficult to learn, expert level language, Rust turned out to be a great choice for the simple task of…

JetRockets 

Postgres. Search Array type columns

solnic.codes 

GitHub Sponsorship

GitHub has recently started their Sponsors program and I was lucky to get an invite pretty early on when it’s still in a closed beta phase. I received the invite on August 30th and it took me exactly one month to finally fill out my profile and get it published. I’m saying “finally” because even though I knew I wanted to try it out, it was not immediately obvious to me how exactly I want it to work in my case. In this article I’d like to share with you some of my thoughts on working on Open Source and explain why I hesitated to get my sponsorship profile published.

Why do people work on Open Source?

First, let’s stop for a second and think about why peopled work on Open Source…

JetRockets 

Testing external API integration with VCR gem

JetRockets 

Git switch command

The Bike Shed 

212: Award Winning Sheds

On this week's episode, Steph and Chris share the news that The Bike Shed won the Best Dev Podcast on the Hackernoon Noonies awards! After a bit of celebration, they get back to their normal adventures with a discussion around onboarding covering the importance, approach, and pitfalls that they've seen in their time joining countless teams. They also touch on the relevance and increasing ease of SSL everywhere, and they answer a listener question about technical debt and rewriting applications.

EquiValent 

What page should the pagination start from ?

Recently I had discussion: Should the pagination start from page 1 or from page 0 ?

Pagination starting from page 1 - Book-like pagination

It’s similar to numbering a book pages. First page with content is page 1.

I tell you the book has 4 pages it mean the page 4 has last page with the content. So you naturally assume first page of the book is 1 and last page of book is 4

e.g. given I have 32 items with limit 10

page 1 - first set of data   1 - 10
page 2 - first set of data  11 - 20
page 3 - first set of data  21 - 30
page 4 - first set of data  31, 32

This way API can return total pages / what is the last page easily.

First page:

get /student/123/works?limit=10`
# ...or
get…
Mike Perham 

Welcome to Sidekiq 6.0

I'm happy to announce that Sidekiq 6.0, Sidekiq Pro 5.0 and Sidekiq Enterprise 2.0 are now generally available after nine months of work by various contributors! 🎉🎂

No More Daemonizing

Sidekiq 6.0 no longer offers the ability to run as an circa-1990s init.d-style daemon by removing the logfile, pidfile and daemonize command line flags. For a decade, all major Unix systems have offered init tooling that handle these concerns automatically for the developer and sysadmin. For the last five years I've blogged about and recommended against using these flags and Sidekiq has provided example systemd and upstart configuration files since day one. No more excuses, good riddance.

Logging

Sideki…

Search Results for “ruby” – via @codeship 

Ruby on Rails Developer Series: Ensuring Security is Covered in Your Application

Reading Time: 3 minutes

Welcome to the last and fourth blog post in my Ruby on Rails Developer Series. In this part, our goal is to go over some major security themes to ensure best practices. We will piggyback from the project you have been building in the other parts and use project-specific scenarios that will help secure the application. The series theme is to make you feel confident as an engineer in building a structured project with Ruby on Rails.


Learn how to secure your Ruby on Rails app by @evan_glazer via @codeship
Click To Tweet


1. Authentication

Having authentication set up helps verify that the user is sanctioned to have access. Say you wanted to access a specific item in…

JetRockets 

Determining class of an object with case equality operator (===)

Ruby on Rails Podcast 

285: Bikeshedding with Steph Viccari

Steph Viccari, co-host of the Bikeshed and developer at thoughtbot, shared her insights on developer bootcamps, starting out as a developer, the state of Rails, podcasting and her first experience as a consultant.

Links for this episode:

All Ruby Podcasts by Devchat.tv 

MRS 094: Rachel Roumeliotis and Roger Magoulas

Sponsors

Host: Charles Max Wood

Joined by Special Guest: Rachel Roumeliotis and Roger Magoulas

Episode Summary

Rachel Roumeliotis and Roger Magoulas from O'Reilly Media join Charles Max Wood at OSCON to talk about the process of content development for OSCON. Rachel is the Vice President of Content Strategy at O'Reilly and Roger is Vice President of Radar at O'Reilly.

Rachel and Roger talk about the history of OSCON Conference as well as the key technologies they wanted to cover this year such as Artificial Intelligence, Machine Learning and Cloud-Native…

All Ruby Podcasts by Devchat.tv 

RR 428: Arming the Rebels with Rails 6 Featuring David Heinemeier Hansson

Sponsors

Panel

  • David Kimura

  • Andrew Mason

  • Nate Hopkins

  • Charles Max Wood

With Special Guest: David Heinemeier Hansson

Episode Summary

Today’s guest is David Heinemeier Hansson, the creator of Ruby on Rails and co founder and CTO at Basecamp. This episode is focused on the release of Rails 6. David talks about the process of getting from Rails 5 to Rails 6 and some of the new features and frameworks in Rails 6. David describes some of the new features as ‘magical, which some people don’t like. He believes that the ‘magical’ element is a good thing because it…

BigBinary Blog 

Rails 6 adds filter_attributes on ActiveRecord::Base

This blog is part of our Rails 6 series. Rails 6.0 was recently released.

A lot of times, we ask user for sensitive data such as password, credit card number etc. We should not be able to see this information in logs. So, there must be a way in Rails to filter out these parameters from logs.

Rails provides a way of doing this. We can add parameters to Rails.application.config.filter_parameters.

There is one more way of doing this in Rails. We can also use https://api.rubyonrails.org/classes/ActionDispatch/Http/FilterParameters.html.

However there is still a security issue when we call inspect on an ActiveRecord object for logging purposes. In this case, Rails does not consider Rails.app…

Test Double | Our Blog 

3 keys to upgrading Rails

The recent release of Rails 6 means Rails 4.2 will no longer receive any further updates—including critical security patches. It also means that a lot of teams are suddenly quite motivated to figure out how to pull off a major upgrade (or two; or three) with minimal risk of failure or disruption to feature development.

First, the bad news: unless your app is home to the most straightforward, conventions-adherent codebase on the planet, major Rails upgrades will be a time and labor intensive effort. But there's good news, too: by applying just the right amount of process and tooling, Rails upgrades can be carried out in tandem with ongoing feature development, incrementally and predictably.

Prathamesh Sonpatki 

DNS rebinding attacks protection in Rails 6

It is common practice to run a Rails app using a custom domain locally. app.lvh.me is very common. We also use ngrok.io sometimes to interact with third party services. If you are using a custom domain on a Rails 6 app, you will see an error with the very first request itself when you hit app.lvh.me in the browser.

But if we just try localhost:3000 then it works. We see this error only when using a custom domain.

http://lvh.me is a free service that resolves itself along with all subdomains to localhost.

DNS rebinding attack

This error is raised because Rails 6 has added protection against DNS rebinding attacks. But what is DNS rebinding attack in the context of a Rails app running locally?

It…

Drifting Ruby Screencasts 

Push Notifications with ActionCable

In this episode, we look into using Push Notifications within our Rails application and then using ActionCable to broadcast Push Notifications to the user.
Julia Evans 

How to write zines with simple tools

People often ask me what tools I use to write my zines (the answer is here). Answering this question as written has always felt slightly off to me, though, and I couldn’t figure out why for a long time.

I finally realized last week that instead of “what tools do you use to write zines?” some people may have actually wanted to know “how can I do this myself?”! And “buy a $500 iPad” is not a terribly useful answer to that question – it’s not how I got started, iPads are kind of a weird fancy way to write zines, and most people don’t have them.

So this blog post is about more traditional (and easier to get started with) ways to write zines.

We’re going to start out by talking about the…

Julia Evans 

git exercises: navigate a repository

I think the curl exercises the other day went well, so today I woke up and wanted to try writing some Git exercises. Git is a big thing to learn, probably too big to learn in a few hours, so my first idea for how to break it down was by starting by navigating a repository.

I was originally going to use a toy test repository, but then I thought – why not a real repository? That’s way more fun! So we’re going to navigate the repository for the Ruby programming language. You don’t need to know any C to do this exercise, it’s just about getting comfortable with looking at how files in a repository change over time.

clone the repository

To get started, clone the repository:

git clone…
Appfolio Engineering 

How Ruby Encodes References - Ruby Tiny Objects Explained

When you’re using Ruby and you care about performance, you’ll hear a specific recommendation: “use small, fast objects.” As a variation on this, people will suggest you use symbols (“they’re faster than strings!”), prefer nil to the empty string and a few similar recommendations.

It’s usually passed around as hearsay and black magic, and often the recommendations are somehow wrong. For instance, some folks used to say “don’t use symbols! They can’t be garbage collected!”. But nope, now they can be. And the strings versus symbols story gets a lot more complicated if you use frozen strings…

I’ve explained how Ruby allocates tiny, small and large objects before, but this will be a deep dive into…

Remote Ruby 

Turning 50

Awesome Ruby Newsletter 

💎 Issue 171 - Understanding Webpacker in Rails 6

Ruby on Rails Podcast 

284: Community Driven Development: Sustainable Open Source with Christine Zagrobelny

Over two years and 978 commits, Christine Zagrobelny recounts the evolution of an open source RoR project built with and for New Sanctuary Coalition, an NYC immigrant rights organization, to help them meet exponentially growing demand for their services following the 2016 U.S. election. This podcast was recorded live with Brittany at Abstractions II.

Links for this episode:

Ruby Weekly 

Understanding Webpacker in Rails 6

#465 — August 29, 2019

Read on the Web

Ruby Weekly

Faker 2 Released: A Library for Generating Fake Data — A very long standing and popular library has taken some neat steps forward lately and v2’s API has introduced some breaking changes. If you want to create ‘fake’ or dummy data, however, this remains the gold standard.

Faker

Ruby 2.6.4, 2.5.6, and 2.4.7 Released — Not feature releases, these releases are all about fixing a jQuery vulnerability in RDoc. (You’d do well to disable RDoc and RI generation when installing gems anyway.) Link is to 2.6.4, here’s 2.5.6 and 2.4.7.

ruby-lang.org

eBook…

Janko’s Blog 

Upcoming Features in Shrine 3.0

The last couple of months I’ve been working hard to prepare for Shrine 3.0, which I expect will be released by the end of October. A lot of work has gone into it, including some big but much needed rewrites. I feel the API has stabilized now, so I thought it would be a good time to share with your some of the new features and improvements that will be coming to 3.0. :tada:

For those who don’t know, Shrine is a versatile file attachment library for Ruby applications. It was born out of frustration for not being able to achieve the desired user experience with existing solutions. Tomorrow it will be turning 4 years old. :smiley:

Before we start, here is a little refresher on Shrine’s core…

Valentino Gagliardi 

Continuous Integration in JavaScript: a Guide (ft. Github Actions)

How do you automated tests when the code leaves your computer? Learn continuous integration in JavaScript with this easy to read guide. (Featuring Github Actions!).

Continuous Integration in JavaScript: a Guide

Automated testing and continuous integration in JavaScript: what you will learn

NOTE: even if you don’t like JavaScript I suggest reading the guide, continuous integration is not tied to any programming language in particular. The concepts you’ll learn here apply to any other language or platform.

In this guide you’ll learn:

  • what is automated testing
  • what is continuous integration
  • how to apply automated unit testing and continuous integration to a simple JavaScript project

Who this guide is for

If you…

The Life of a Radar 

The 2018 MacBook Pro Keyboard Drives Me Crazy

I recently upgraded from a 2015 MacBook Pro to a 2018 MacBook Pro. And by "recently", I mean back at the start of June. I wanted a new MacBook Pro because of the faster performance that a new computer would give me. Work (Culture Amp) was also upgrading their fleet of Macs and I was one of the lucky people to get a new one.

So I've been using this computer as a work computer for almost 3 months now and, my god, the keyboard drives me mental. Even writing this blog post now on the train and there's:

  • duplicated "o's" that I've had to go back and fix, or missing ones -- guess how fun it is to write a book about a Toy Robot with this particular problem
  • double spaces -- or no spaces
  • a Command…

Apple is all about the…

Search Results for “ruby” – via @codeship 

Ruby on Rails Developer Series: Creating a Docker Container Around Your Application

Reading Time: 4 minutes

Welcome to the third post in the Ruby on Rails Developer Series. In this part, our goal is to add a Docker container to our application so we can deploy our packaged application on a server. This will enable us to create a continuous integration process while building our environment in a matter of seconds. We’ll cycle through learning about the benefits of Docker and how to build a basic Docker image. The series theme is to make you feel confident as an engineer in building a structured project with Ruby on Rails.

You can do this!

What is Docker?

Docker allows you to package up an application or service with all of its dependencies in an image. The Docker image…

JetRockets 

Ruby double splat (**) operator cheatsheet

Martian Chronicles, Evil Martians’ team blog 

Keeping OSS documentation in check with docsify, Lefthook, and friends

Author: Vladimir Dementyev, Lead Developer at Evil Martians

In this post, I will describe my long and winding road to the optimal open source documentation experience: from a basic README and GitHub wiki to docsify and a perfect CI setup with Lefthook. See how we generate documentation for our OSS projects automatically and keep it up to date with no hassle.

What makes a good open source project? If you are into Ruby, you can check out all the best practices in one place at Gem Check (created by yours truly). But even regardless the language or the stack—one thing is vital for all OSS projects: documentation.

All open source projects, independently of the size, must be documented…

Notes to self 

InvoicePrinter 2.0

InvoicePrinter is intentionally small and straight-forward library, command line client, and server to make PDF invoices in no time. Version 2.0 includes buyer/seller boxes simplification, decoupling server from the library, offering sample TTY fonts as an add-on and official Docker support.

You asked for a new approach to buyer/seller boxes as they were a bit tied up with a format of “street + number” and therefore not very accommodating to “number + street” known in the English world. On top if felt wrong to be using an address field to provide a different value such as e-mail address. To that end, I redesigned it so that both are simple strings (provider_lines and…

JetRockets 

How to store large JSON in PostgreSQL with Rails Attributes API

Ruby News 

Multiple jQuery vulnerabilities in RDoc

There are multiple vulnerabilities about Cross-Site Scripting (XSS) in jQuery shipped with RDoc which bundled in Ruby. All Ruby users are recommended to update Ruby to the latest release which includes the fixed version of RDoc.

Details

The following vulnerabilities have been reported.

It is strongly recommended for all Ruby users to upgrade your Ruby installation or take one of the following workarounds as soon as possible. You also have to re-generate existing RDoc documentations to completely mitigate the vulnerabilities.

Affected Versions

  • Ruby 2.3 series: all
  • Ruby 2.4 series: 2.4.6 and earlier
  • Ruby 2.5 series: 2.5.5 and earlier
  • Ruby 2.6…
Ruby News 

Ruby 2.4.7 Released

Ruby 2.4.7 has been released.

This release includes a security fix. Please check the topics below for details.

Ruby 2.4 is now under the state of the security maintenance phase, until the end of March of 2020. After that date, maintenance of Ruby 2.4 will be ended. We recommend you start planning the migration to newer versions of Ruby, such as 2.6 or 2.5.

Download

Ruby News 

Ruby 2.5.6 Released

Ruby 2.5.6 has been released.

This release includes about 40 bug fixes after the previous release, and also includes a security fix. Please check the topics below for details.

See the commit log for details.

Download

Ruby News 

Ruby 2.6.4 Released

Ruby 2.6.4 has been released.

This release includes a security fix of rdoc. Please check the topics below for details.

See the commit logs for changes in detail.

Download

GoRails Screencasts 

How to use Multiple Databases in Rails 6.0

With Rails 6.0, you can now define multiple primary and replica databases, define separate migrations for each primary database, and configure each model to read and write from different databases.
Scott Watermasysk 

VSCode Tailwind CSS Extension And Rails (ERB)

If you are having trouble getting an extension like VSCode Tailwind to work in VSCode, a smart place to start debugging is the language mode.

For example, for me, a file named application.html.erb had the language set to html.erb instead of the expected erb. This in turn, caused the VSCode Tailwind extension to be ignored since it was not registered for html.erb.

Long term, there may be a way to have this extension look for any erb (*.erb - although that too may be problematic). In the short run, we can tell VSCode to map any html.erb file back to erb like this:

"files.associations": {
    "*.html.erb": "erb"
  }

This change fixed my immediate issue, but it ended up causing another…

Julia Evans 

curl exercises

Recently I’ve been interested in how people learn things. I was reading Kathy Sierra’s great book Badass: Making Users Awesome. It talks about the idea of deliberate practice.

The idea is that you find a small micro-skill that can be learned in maybe 3 sessions of 45 minutes, and focus on learning that micro-skill. So, as an exercise, I was trying to think of a computer skill that I thought could be learned in 3 45-minute sessions.

I thought that making HTTP requests with curl might be a skill like that, so here are some curl exercises as an experiment!

what’s curl?

curl is a command line tool for making HTTP requests. I like it because it’s an easy way to test that servers or APIs…

Ruby Magic by AppSignal 

Type Checking in Ruby — Check Yo Self Before You Wreck Yo Self

Let’s start this post with a fun little guessing game: what do you think is the most common error tracked by AppSignal in Ruby applications?

It’s fair to assume that many of you answered this question with NoMethodError, an exception that is caused by calling a non-existent method on an object. Occasionally, this may be caused by a typo in the method name, but more often it’s the result of calling a method on an object of the wrong type, which often happens to be an unexpected nil. Is there something we can do as Ruby developers to reduce the frequency of such errors?

Types to the Rescue?

Except for the choice of text editor or programming language, few topics can spiral into heated…

OmbuLabs Blog 

The New Fastruby.io

We launched Fastruby.io, our first productized service, back in June 2017. At the time, we had been doing Ruby on Rails upgrades since 2009, for our own products and client projects. We decided to package these upgrades under their own domain through Fastruby.io.

Now, over two years later, we have completed over a dozen Ruby on Rails upgrades through Fastruby.io and are seeing consistent interest in our upgrade and estimation services.

We decided that it was time to refresh the look and feel of the website. We worked with Verónica García, UI Designer and Front End Developer, to complete the website redesign. In this post, we talk to Verónica about her creative process and how she…

Semaphore 

A CI/CD Pipeline for Serverless Cloudflare Workers

continuous integration for serverless cloudflare workers

In this tutorial, we’ll learn how to use Semaphore to deploy serverless functions to Cloudflare. With serverless functions, developers can build production-ready applications that scale without having to manage infrastructure.

Cloudflare Workers live on the edge of their network and can intercept and modify HTTP requests. Thus, we can use them to augment our websites, create new applications and services, or redirect and load-balance traffic.

As you transition from the “server full” to the serverless mindset, you’ll stop fretting about the how and start thinking in terms of the what. Your focus can move from managing infrastructure—whether they are servers or containers—to…

All Ruby Podcasts by Devchat.tv 

MRS 093: Thomas Grassl

Sponsors

Host: Charles Max Wood

Joined by Special Guest: Thomas Grassl

Episode Summary

Thomas Grassl from SAP joins Charles Max Wood at OSCON to talk about what SAP is doing in the Open Source world. Thomas talks about SAP's recently released a UI5 Web Components.

Charles wonders how the components will work with different frameworks and Thomas explains UI5 Web Components are HTML components and they should be used how regular HTML components are used. UI5 Web Components is Open Source so Thomas expects contributions from the Open Source community.

Thomas…

All Ruby Podcasts by Devchat.tv 

RR 427: Sorbet, a Type Checker for Ruby with Paul Tarjan

Sponsors

Panel

  • David Kimura

  • Andrew Mason

With Special Guest: Paul Tarjan

Episode Summary

Paul Tarjan works for Stripe specializing in developer productivity. In the past, he has owned his own company and worked for Facebook. In today’s episode, the panel is talking about Sorbet, a gradual type checker for Ruby that Paul built. Paul talks about how Sorbet fits in the Ruby community and how it works. The two parts of Sorbet are the runtime type check and the static typecheck. Paul talks about how introducing Sorbet at Stripe has changed the way they approach coding. He talks about some of…

The Bike Shed 

211: I'm Not a Lawyer, But...

On this week's episode, Chris and Steph discuss their preferred strategy when building an admin portal (spoiler: it's not using a client-side technology), separating our identity from our preferred technology, coding styles that require greater mental effort, and answer a listener's question about deleting migrations.

BigBinary Blog 

Rails 6 raises ArgumentError for invalid :limit and :precision

This blog is part of our Rails 6 series. Rails 6.0 was recently released.

Rails 6 raises ArgumentError when :limit and :precision are used with invalid datatypes.

Before Rails 6, it used to return ActiveRecord::ActiveRecordError.

Let’s checkout how it works.

Rails 5.2

Let’s create an orders table and try using :limit with a column named as quantity with data type integer.

>> class CreateOrders < ActiveRecord::Migration[5.2]
>>   def change
>>     create_table :orders do |t|
>>       t.string :item
>>       t.integer :quantity, limit: 10
>>
>>       t.timestamps
>>     end
>>   end
>> end

=> :change

>> CreateOrders.new.change
-- create_table(:orders)

=> Traceback (most recent call l…

We can see that use of :limit with integer column raises ActiveRecord::A…

Test Double | Our Blog 

CSS: the visual state machine.

Thinking of web applications in terms of state machines is not a new idea; in fact, it has become so popular in the past few years that teams are spending increasingly more time breaking down their application into states managed by front-end frameworks. Whether you use Redux, MobX, or even perhaps something framework-agnostic like xState, it is clear that thinking about web applications in terms of state machines is occurring much more frequently. With all this focus on state, transitions, and the benefits that come with structuring our applications like this, I've found there is still an area that is often overlooked when it comes to managing state in web applications: the visual or…

CSS is incredibly powerful…

Scott Watermasysk 

Jekyll Paging With Tailwind CSS

I updated this blog Jekyll 4.0 and decided it was time to add paging to my Shorts category.

Enabling per category paging required adding and configuring the Jekyll Paginate V2 gem.

After that was in place and configured, it was time to add the “← Older” and “Newer →” buttons. I thought it was going to have to write a bunch of if statements and extra CSS to get working correctly for the first and last page. It turns out Flexbox + tailwindcss make it super easy:


{% if paginator.total_pages > 1 %}
<pager class="flex">
  {% if paginator.next_page %}
    <a class="flex-auto text-left" href="{{ paginator.next_page_path }}">← Older Shorts</a>
  {% endif %}
  {% if paginator.previous_page %}
RubyGuides 

What is Module Autoloading in Ruby?

How do we bring together multiple source code files into one?

We require them.

This tells Ruby to look for a file & run the code inside it.

But sometimes we don’t need to load these files.

At least not right away…

So how can we load files only when we need them?

That’s where autoloading comes in!

How to Use Autoloading

Ruby has a built-in autoloading feature.

It’s based on constants.

When a constant like Coconut is found for the first time, Ruby will try to load its associated file.

But first:

You need to register this constant with its file name.

Like this:

autoload :Coconut, "lib/coconut.rb"

Now Ruby knows where to look whenever you want to use the Coconut class or module.

But you know…

JetRockets 

A simple way to distribute jobs in Sidekiq queues

EquiValent 

Visualized Desktop Workspace flow in Ubuntu 18.04

This article is manual how to set up Ubuntu 18.04 so it works with Visualized Workspaces Workflow concept. This setup should probably work also for Ubuntu with manually installed XFCE

Visualized Workspaces flow is a setup of workspaces in Desktop Environment for maximum productivity. Please read more in this article to understand why the steps bellow are necessary

install tweek tools

sudo apt install gnome-tweek-tool

Once installed change workspaces to static and change number of workspaces to 6

Gnome Tweaks Tool > workspaces > StaticWorkspaces
Gnome Tweaks Tool > workspaces > Numpber of Workspaces = 6
  • in workspaces section eneble static workspaces and set them to 6

EquiValent 

PG::UniqueViolation: ERROR: duplicate key value violates unique constraint

ActiveRecord::RecordNotUnique PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "table_names_pkey" DETAIL: Key (id)=(70) already exists. : INSERT INTO "table_names"

Moste of the time when this error happen you are just trying to save some value over already existing unique value in Ruby on Rails database like PostgreSQL

But some time this happens when database goes out of wack (e.g. you deleted all the records but forgot to resent constraints in Staging database)

In that case this is easy fix:

ActiveRecord::Base.connection.tables.each do |table_name|
  ActiveRecord::Base.connection.reset_pk_sequence!(table_name)
end

source: https://stackoverflow.com/questions…