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 meets Creativity at TRIC
Have you taken a look at the winning submissions of the last two Transcendental Ruby Imbroglio Contests? It is astonishing: 1st edition, 2nd edition!
Ruby Tricks
Ruby Tricks, Idiomatic Ruby, Refactorings and Best Practices. [more inside]
Docker: Running a Rails App Container with PostgreSQL Service
In this 13 minute episode we show you how to run a rails app using docker and connect it to a postgresql service. We cover how to work with environment variables and how to configure your database to work when running your app with docker.
New Framework built on Sinatra
Check out http://padrinorb.com/ for an this new awesome framework I found a couple of days ago!
How to Test Rails Models with RSpec
A tutorial that teaches you how to test your Rails models using RSpec and the Behaviour-driven Development approach. https://semaphoreci.com/community/tutorials/how-to-test-rails-models-with-rspec
New validation syntax for Hanami
Hanami will introduce a new syntax for validations based on predicates. It features builtin and custom predicates, type safety, specific coercions for HTTP params, whitelisting, custom error messages with optional i18n support. This release will start a new alliance between Hanami and dry-rb. http://hanamirb.org/blog/2016/05/16/validations-predicates.html
Sending Web Push notifications from Rails
Web Push is a new JavaScript API that allows you to engage with your users even when they’re not on your site. Here’s a look at how to set up a Rails application to deliver Web Push notifications https://rossta.net/blog/web-push-notifications-from-rails.html
[Screencast] Infinite Scrolling
Infinite scrolling is now a common feature and there are several cases where it is really useful. For instance there are some websites where we simply can’t imagine a good pagination system, like Twitter or even Facebook. https://www.driftingruby.com/episodes/infinite-scrolling
A Sinatra Mock Server
A lightweight Sinatra application that can be set up as a mock server to respond to API end points which respond to HTTP verbs. No need to program mocks using a language specific implementation for testing. Easy to use user interface to maintain mocks. Just supply a URL along with the HTTP headers and return codes along with the response body to set up a mock response. Can be used for manual testing and automation testing of client applications. Further details can be found at. https://github.com/mvemjsun/mock_server .
Sample telegram bot on rails
With sessions and support for contextual messages. Built with telegram-bot gem. https://github.com/telegram-bot-rb/telegram_bot_app
How to conservatively update a single gem with bundler
A quick exploration on how bump a single gem, excluding its dependencies and not relying on bundle update –source, which isn’t reliable: https://christoph.luppri.ch/articles/2016/05/14/how-to-conservatively-update-a-single-gem-with-bundler/
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]