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.
Fun with the `method` method
Have you ever wanted to pass a method to a function that only takes a block? Or figure out which of your object’s superclasses broke the method you’re trying to call? Those things are easy to do with the method method. Use it well, and you can learn about your dependencies, save yourself hours of debugging, and get your code to the places it needs to be.
rb_import 0.1.0 has been released
rb_import adds an import method to the Ruby VM so one can do foo_class = import './foo.rb'.
Eventually name-clashing class/module definitions can now be prevented with this gem.
Introducing the Rubinius Team!
Say hi to the Rubinius Team! News on Rubinius 3.0 coming soon too.
How Raptor's made up to 4x faster than Unicorn, up to 2x faster than Puma, Torquebox
Raptor is a new Ruby web server that’s up to 4x faster than Unicorn, and up to 2x faster than Puma and Torquebox. The most recent blog post describes in high detail how it has been made so fast. It’s the first post from a series that will elaborate on Raptor’s implementation.
Tail Call Optimization in Ruby
Tail call optimization is an optimization where tail recursive functions are transformed into loops by the compiler. A tail recursive function is one where the final statement is a call to the same method. In this post, we will look at what tail recursive functions look like, how tail call optimization helps them, and how to enable TCO in Ruby. [Continue reading]
Let Austen Ito show you how he builds a ...
Let Austen Ito show you how he builds a basic infrastructure with Docker, Chef, and Rails!
Determining User and Location Coordinates with the Geocoder Gem
Location-based web applications calculate distance between objects using the latitudinal and longitudinal coordinates and the Haversine formula. But how does one determine an object’s coordinates given a street address or IP address, let alone calculate the distance between two sets of coordinates? Fortunately the Geocoder gem turns these otherwise complex tasks into a fairly trivial matter. In this post I’ll show you to to integrate Geocoder into your Rails application.
I RAM what I RAM: Smaller App Footprints through Benchmarking
Get a smaller Rails app footprint with two commands. A 36% boot time memory savings for free. Also learn how to benchmark and optimize your own application’s boot size.
Pakyow v0.9 Release
Pakyow, the view-first app framework for Ruby, dropped over the weekend. Release notes + upgrade guide.
liquid-rails v0.1.0 released
liquid-rails allows you to render .liquid templates with layout and partial support. It also provides filters, tags, drops class to be used inside your liquid template.
assets-rails v0.1.0 released
assets-rails allows you to require javascript and stylesheet libraries with the exact version so that your frontend stuffs will continue to work as times passed by. You can use different versions for different templates in a single Rails application.
tty-progressbar v0.2.0 released
tty-progressbar now includes estimated time token, a frequency option to throttle repainting and ability to log during display. Please check it out and let me know your thoughts.
Creating configuration files for Ruby programs
Some ideas about how to create configurations for ruby programs.
Reform 1.2 Is Out!
The popular form object for Ruby and Rails, Reform, got some new amazing features. It now allows dynamic syncing and saving, got a 85% speedup, a dirty tracker and more.
Pastel v0.3.0 released
pastel got even stabler and faster. Fixed bugs concerned with nested styles, improved speed and added ability to alias colors at runtime through environment variable and library interface. This is a component that will be part of tty toolkit
image_optim v0.19: better gif optimization and optional lossy jpeg worker
I’ve just released v0.19 of image_optim with improved gif optimization and new optional lossy worker for jpeg files which uses jpeg-recompress.
activerecord-after-transaction 0.1.0 Release!
I just launched activerecord-after-transaction which provide a function to execute a proc after the transaction.
Time zones and Daylight Saving Time
I wrote a blog post about considerations on Daylight Saving Time when using time zones.
Rails Stats: External and more complete "rake stats"
Check out your app’s stats. The tool is here. The blog post here has example output.
How to serialize Date and DateTime to JSON without losing information
This blog post teaches you that depending on the way you serialize your Date and DateTime values to JSON, you could lose information. [more inside]
Continuous Static Analysis using Pronto
A short walkthrough of how to configure Pronto to do static analysis on every pull request with the help of Travis. Can also be applied to other CI servers.
Nuts & Bolts #3: Show and tail multiple production remote logs with Capistrano
Sometimes you want to see what’s happening in your production log files right now. You can use log management tools like Loggly or Papertrail for this, but there is also an easy way to stream your log files with Capistrano. [more inside]
Make Outbound Calls From the Browser to Phone using Twilio in Rails
A step by step walkthrough of how to make browser to phone calls in Rails using Twilio
scriptster: Making your Ruby scripts pretty
I would like to introduce to you a small gem that I released last weekend. It’s called scriptster and its aim is to help you make your Ruby scripts a bit nicer (especially those that depend on many external tools).
Beer-A-Day - Open Data "Eternal" Page-A-Day Calender - beer.db Web App Sample in Rails
Hello, As an example of using the beer.db - open public domain beer n brewery data - I’ve put together a page-a-day “eternal” calendar serving a different beer w/ every request. See a live demo with an all-Austrian taproom or build your own. All code and data is public domain. Cheers. Prost. Kampai.