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.
Fixing That Mysterious Slow Request in Your Rails App
Even if your Rails app is humming along just fine most of the time, your users probably still occasionally experience painfully slow requests seemingly at random. While unexplained slowdowns can happen for many reasons, the most common root cause is excessive object allocations. Find out how you can fix it on the Skylight blog.
Rails and Ember Side by Side
Deploying Ember next to (not inside of) Rails
Variable hoisting in Ruby
Yesterday I published a very short article on variable hoisting in Ruby. Check it out.
Updated "case when and matcher classes"
Hello people, download my ruby book (I Love Ruby) here http://is.gd/rubybook
Commanding Objects Toward Immutability
I wrote about how organizing objects and their behavior helped prepare my code for immutable objects
Lita 4.5 released
Version 4.5 of Lita, the Ruby ChatOps framework, has been released. Details of what is new and changed are available on the release page.
Scraping of Websites using Mechanize Gem
Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. The Mechanize library is used for automating interaction with websites. Mechanize gem automatically stores and sends cookies, follows redirects, and can follow links and submit forms. To read full article, go to RailsCarma Blog.
Exploring some Ruby string methods
It’s important to be able to manipulate Strings effectively in Ruby. In this article I explore a few of the different methods I used to format a phone number correctly.
Direct uploads to AWS S3 from the browser in your Rails app
Why do you need to submit user upload to the controller and then upload it to S3 from the backend, when you can upload the file directly to AWS S3? http://blog.iempire.ru/2015/s3-direct-uploads/
Mixing code and data in Ruby with DATA and __END__
Did you know that Ruby provides a way for your script to use its own source file as a source of data? It’s a neat trick that can save you some time when writing one-off scripts and proofs of concept. Let’s check it out! http://blog.honeybadger.io/data-and-end-in-ruby/
Revisiting the "rails:update" task
Some notes on how to effectively use the rails:update rake task.
Delayed Job Worker Pooling
Need to run a pool of Delayed Job workers on a single machine like a Heroku PX dyno? We wrote a blog post exploring how we did this at Salsify and we released a corresponding gem.
Creating Rails Application Templates
Use Rails Application Templates to set up and structure your projects to your liking without wasting time with boilerplate code. http://www.codebycodes.com/blog/2015/08/17/creating-rails-application-templates/
ROM 0.9.0 Released with new repository, model and mapper gems and new adapters!
You can read the announcement on the ROM blog
Working with NSTableView
A look at how to implement a basic table view with column sorting (along with simple form fields to add data to the table) in a Mac OS X app created with RubyMotion http://kickcode.com/blog/2015/08/18/working-with-nstableview.html
Use Capybara and Rspec to test non Rack app
I need to test a non Rack application, but I want to use Capybara and Rspec. I have configured Capybara to work with Selenium or Webkit. This is blog post http://cristianogregnanin.com/2015/07/22/Use-Capybara-and-Rspec-to-test-non-Rails-applications.html
Announcing Intercity Opensource
An easy way to manage your rails servers! https://intercityup.com/blog/announcing-intercity-opensource.html
Scaling Applications with Multiple Database Connection
Applications depending on databases can be scaled by separating the database layer and scaling it independently. The OPS team does take care of such infrastructure changes based on the application deployment architecture. Read the full article at RailsCarma Blog
Routing and Multi-View Apps in Volt (Screencast)
Check out Episode 13 where I give a quick overview of how Volt handles URL routing.
qk/quik - ruby quick starter template script wizard .:. the missing code generator
Hello, I’ve put together the quik gem that includes a new ruby quick starter template script wizard. Let’s say you want to start a new gem. Try: $ quik new gem or $ qk n gem This will download the gem.rb wizard script from the Rubyref Scripts repo and run through all steps to get you started with ready to use code (from a git repo hosted template). Note, qk/quik is “generic”, that is, it works for sinatra templates, gli templates and anything. For static site (e.g. jekyll) starter scripts, for example, see Mr Hyde’s Scripts (built with mrh/mrhyde and the qk/quik machinery). Cheers.
Associative arrays in Ruby…what?
Have you ever had a bunch of data in an array, but needed to do a key/value lookup like you would with a hash? Fortunately, Ruby provides a mechanism for treating arrays as key-value structures. Let’s check it out! http://blog.honeybadger.io/associative-arrays-in-ruby-what/
Composing custom RSpec matchers in Cucumber
An example of using custom matchers in Cucumber, composing several matchers to test related things at once, and generating useful failure messages.