The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Ruby on Rails Continuous Integration with Jenkins and Docker Compose
Ruby on Rails Continuous Integration with Jenkins and Docker Compose This is a step by step guide to setting up Jenkins to run builds with Docker Compose and report status to GitHub Pull Requests. We will show a Docker configuration for Ruby on Rails but it can be modified to run with whatever framework you prefer.
Aggregating data for OHLC stock charts
Aggregate data for OHLC (candle) stock charts with PostgreSQL using window functions for fun and profit.
awesome-webframeworks - A collection of Ruby webframeworks, libs etc. @ Planet Ruby
Hello, I’ve started (yet) another awesome list on Planet Ruby. The new awesome-webframeworks page collects Ruby web frameworks, libraries, tools, etc. Categories include: Rack, Rack Alternatives, Rails, Sinatra, Volt, JSON HTTP API Builder, Micro Framework Alternatives, Macro Framework Alternatives and so on. Anything missing? Contributions welcome. Cheers.
Opalist Newsletter - Issue #6
Opalist is an e-mail newsletter showcasing the latest news and tutorials in the Opal (Ruby-to-JS source compiler) ecosystem and front-end development. In our sixth issue, we cover Opal’s new Code of Conduct (CoC), how to use the opal-jquery gem, two screencasts on Opal and Volt (the latter being all about creating REST APIs), and WebAssembly.
DceLti - easier LTI authentication for Rails apps
Announcing DceLti:: github rubygems. [more inside]
Generate PDF Invoices from your Rails app in ~5mins using the Invoiced API
A post showing you how to build a “Minimum Viable API Client” using HTTParty and the free Invoice Generator API from Invoiced to create really nice invoices from your Rails app in record time. [more inside]
Decouple ActiveRecord callbacks with some Pub/Sub
I put together a blog post on how clean up your ActiveRecord callbacks using wisper a ruby gem that provides publish-subscribe capabilities to ruby objects.
Telegrammer released
I’ve just released telegrammer, a gem to interact with the new Telegram’s Bot API. All contributions and suggestions are welcome.
Ruby data processing: how to explode rows with multivalued attributes?
Here is a new Ruby ETL article in which you’ll see how to write then refactor ETL components that transform data like this: [more inside]
whatson gem - Use $ kickoff to list upcoming football tournaments on command line
Hello, For fun I’ve added yet another dataset to the whatson gem that lets you list upcoming football tournaments from around the world. Ever wonder how many days to the next World Cup? Just type in your shell: $ kickoff The command will fetch the football event calendar page (from the intertubes) and print out: NOW ON 18d Women's World Cup 2015, Sat-Sun Jun/6-Jul/5 (30d) @ Canada › World (FIFA); NOW ON 13d Copa América 2015, Thu-Sat Jun/11-Jul/4 (24d) @ Chile › South America (CONMEBOL); in 14d Gold Cup / Copa de Oro 2015, Tue-Sun Jul/7-26 (20d) @ United States+Canada › North America (CONCACAF); in 1087d World Cup 2018, Thu-Sun Jun/14-Jul/15 (32d) @ Russia › World (FIFA) ... and so on. Cheers.
Restore BUNDLED WITH section in Gemfile.lock from git repository
We should use latest Bundler, but sometimes we are afraid we have to use older/newer Bundler. RestoreBundledWith solves these conflicts. restore_bundled_with
Webinar Recording: Refactoring Rails Applications with RubyMine
Last week, together with JetBrains, we presented a webinar on using RubyMine with Rails apps in the context of refactoring. The recording is now available. [more inside]
HOWTO use form objects with Rails
HOWTO use form objects with Rails–a new guide I wrote showing you how to use form objects in your Rails application, useful for decoupling validation logic from models and reducing complexity.
mruby-r: Use (m)Ruby for returning data to R
I have just released a mruby gem called mruby-r. It provides a way to call a Ruby script from R, making it convenient for generating sets of data on-the-fly. Check it out!
Pair Ranking Gem Released
Select a single winner using votes that express preferences. This can also be used to create a sorted list of winners. rasam gem
Optimizing Full Text Search with Postgres tsvector Columns and Triggers
Improve the speed of Postgres full-text search by introducing a tsvector column to cache lexemes and using a trigger to keep the lexemes up-to-date.
Say no to chained ActiveRecord scopes!
Chaining ActiveRecord scopes outside their models resist change and testability. Fortunately, there’s an easy solution!
Locally Sourced, a magazine of technical writing
I’ve launched a Patreon campaign to support Locally Sourced. The center of each issue of Locally Sourced will be an article about 15 to 20 pages long (like a book chapter), covering some task or tool in more depth than a blog post. The topics will often be about Rails and JavaScript, and particularly about testing. Please check it out at https://www.patreon.com/noelrap.
Let's build a simple RSS to email digest script
In our office we need to be able to easily pull lists of blog posts into a simple HTML email format. I wrote a little script to do it, and wrote it up in a post: http://blog.honeybadger.io/lets-build-an-rss-to-email-digest-script-with-ruby/
Easy SEO metatags with Rails 4
Having the right SEO meta tags generated for your website is a must have nowadays, and setting them up is easy and fast in Rails with the Metatags gem. Here’s how we do it.
Preloading Rails scopes
Rails’ scopes make it easy to find the records you want. But you can’t really preload a scope. So if you’re not careful, your scopes will turn into N+1 queries, which turns into slow controller actions. How can you keep that from happening?
ANN Mustache v1.0.2
An update to the Mustache gem was just released with some improvements: https://github.com/mustache/mustache/releases/tag/v1.0.2
Over-engineering?
Is your code over-engineered or well-factored? We like to think that we know how to structure our code. But as will all things related to software development, there are trade-offs and decisions to make.