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.
Writing Ruby gem in Rust
How to pass complex data structures and build native library on gem install. Plus an example gem. http://undefined-reference.org/2016/05/14/writing-rubygem-in-rust.html
Keep MarkerClusterer working after Google shut down svn-repos
Here is short gist with instructions how to prepare self-hosted images, if you use google-maps-utility-library in rails application: https://gist.github.com/printercu/c4a02b8972ad76b6331b51b98c4b87a5
Infinidb: a Peer-to-Peer Distributed Database and Transaction System
Wouldn’t it be cool if you could type in your code: [more inside]
Routing HTTP requests with Nginx+Mruby
A short article on using ngx_mruby - the Mruby module for Nginx - to dynamically route HTTP requests based on hostname (that is, without restarting Nginx or changing the config files): http://hokstadconsulting.com/nginx/mruby-virtualhosts
Tensorflow is Coming to Ruby!
SciRuby and somatic.io have decided to work together and mentor a student to get a “Google Summer of Code” like project up to make Tensorflow usable from Ruby. This project will last over the 2016 summer and we expect to be able to run some of the tutorials from the Tensorflow documentation directly in Ruby. - See more at: http://www.somatic.io/blog/tensorflow-is-coming-to-ruby
Keeping your Ruby on Rails app easy to update
Some tips on how to maintain the Rails framework updated without much effort. Keeping your Ruby on Rails app easy to update « Plataformatec Blog
active_record_doctor
A tool that’ll automatically index all foreign keys and detect extraneous indexes - www.github.com/gregnavis/active_record_doctor. More coming soon!
Inspecting the Ruby Interpreter
Ruby gives you access to a lot of information about itself: They can be accessed via various special variables and ObjectSpace. There is also the special RbConfig hash.
Rails 5 supports bi-directional destroy dependency
We can now add bi-directional destroy dependency on Rails 5 associations [more inside]
How to Build a Math Evaluation Engine
My guest post on the Codeship blog explains how you can build your own eval engine https://blog.codeship.com/build-math-evaluation-engine/
Don't Forget About Infinite Enumerators
When was the last time you created an Enumerator? We use enumerables all over the place but it’s rare to see “Enumerator.new”. If I’m being honest, sometimes I forget it’s an option. I’m guessing you might as well. [Read More]
Dead Simple Blog Setup With ButterCMS
We recently decided to move our blog off of Tumblr and into our main site. We wanted our blog to feel more like part of the main site and an integrated blog is also more SEO friendly. We thought about publishing our blog as static files with Jekyll. However, it quickly became clear that sharing our main HTML layout file between Jekyll and our main Rails app was not going to be elegant. The layout file needed to be duplicated, making it tedious to keep up to date.
More Slide Show (S9) Presentation Templates Now Jekyll-Compatible - CSSS, Slidy
Hello, I’ve added new presentation / slide show template packs, that is, converted (“liquified”) and GitHub Pages/Jekyll-ready/compatible: 1) CSSS by Lea Verou - ready-to-fork/use template pack and live demo. 2) Slidy by Dave Raggett - ready-to-fork/use template pack and live demo (w3c) and live demo (blank). 3) Shower by Vadim Makeev - ready-to-fork/use template pack and live demo (ribbon). [more inside]
Getting started with Operations in Trailblazer
One of the most important aspects of Trailblazer is that your Models and Controllers should be very thin. Controllers should be lean HTTP endpoints, and your Models should only deal with associations and querying. [more inside]
My notes from RailsConf 2016
Notes include the summary of the most exciting talks, links to slides and recorded keynotes. check it out!
Modern, component-based JavaScript integration strategies for Rails
A tour of 4 progressively advanced JavaScript integration strategies for Rails, all the way from componentized jQuery via Sprockets to the most advanced workflow possible today with Webpack, including hot module reloading, lint-on-save, CSS extraction and autoprefixing, automatic spritesheet generation, and much more. [more inside]
Knuckles, The Next Level of API Caching
Introducing Knuckles, a library for highly efficient caching with Rails APIs http://sorentwo.com/2016/05/10/knuckles-the-next-level-of-api-caching.html
An offline page for your Rails application
This post demonstrates how to integrate the Service Worker JavaScript API with the Rails asset pipeline to precache and render an offline page for your Rails application when visitors have no network connection. https://rossta.net/blog/offline-page-for-your-rails-application.html
Real-Time Rails: Implementing WebSockets in Rails 5 with Action Cable
It’s been one year since Action Cable debuted at RailsConf 2015. My post for the Heroku blog takes a look under the hood of Action Cable and details what it’s really like to implement what DHH calls “the highlight of Rails 5”. In fact, as a full-stack offering for seamlessly integrating WebSockets into Rails, its pretty awesome.
Premature optimization is the root of all evil...or is it?
Donald Knuth’s oft-quoted paper popularized the line “Premature optimization is the root of all evil”. Have we been avoiding optimization to an extreme in our Rails dev process today?
Errbit + HTTPS: Setting up Errbit reporter (Airbrake v5 gem) to work with self-signed
Having an error catcher like Errbit behind SSL is generally a good idea. Especially when Errbit is hosted on a different server than you application (for example when you manage multiple apps with one Errbit instance). In many cases you will have a self-signed certificate (why would you pay for a cert for internal tool). If you try to use it with Airbrake, it will fail unless you implement patch from this post: Errbit + HTTPS: Setting up Errbit reporter (Airbrake v5 gem) to work with self-signed HTTPS certificate