Ruby On Rails

add news feed

tweet a story

StackEdit - Markdown-based browser edit control. Rubinius 2.0 Released - With Ruby 2.1 compatibility and big plans for the future. CloudFlare and Open Source Software: A Two-Way Street - Yes, this is how things are supposed to work. T...
StackEdit - Markdown-based browser edit control. Rubinius 2.0 Released - With Ruby 2.1 compatibility and big plans for the future. CloudFlare and Open Source Software: A Two-Way Street - Yes, this is how things are supposed to work. Tails - Bootable Linux designed to use Tor for everything. Firefox Developer Tools and Firebug - Looking at the two different sets of dev tools in Firefox. WebSockets Now in Public Beta - On Heroku.
about 2 hours ago
In the world of physical and virtual computing computing there are thousands of metrics to choose from.  These can range from describing a running operating system to describing multiple processes representing a single application runnin...
In the world of physical and virtual computing computing there are thousands of metrics to choose from.  These can range from describing a running operating system to describing multiple processes representing a single application running on many servers. Obtaining visibility into the runtime attributes of these servers and processes is critical to effective operations. We must have operational vision which consists of hindsight, sight and foresight. The ability to see past, present and future is critical to guiding effective operations and development. Without this vision we have operational blindness. We will use a human body and its organs as an analogy for a running operating system and its processes. There are many approaches to collecting the appropriate metrics to accomplish this goal—let us explore a few of the more prominent ones: Do Nothing Approach Medical We assume the body is healthy because we are not aware of anything wrong.  Our system seems to be functioning by just observing from afar. System This approach is the default state of a freshly running operating system environment. With this approach, we maintain the status quo and maintain operational blindness. Without insightful metrics, we have a misguided sense of safety based on the operating system's newness and the fact that its processes are still running. Effective business decisions guiding operations and development cannot be made. Results The blissful paradise of ignorance quickly turns to constant pain. An illness that could have easily been cured when symptoms first appeared instead requires painful and costly treatment. The analogy to this for running systems would be:  Processes ceasing to function, disk drives filling up, the dreaded random “Out of memory killer”, or constant CPU usage that keeps critical business processes from keeping up with the demand. Operational blindness should never become the choice the systems your business are built on. To minimize risk and maximize efficiency, issues need to be detected early and mitigated at the first responsible opportunity. If we are operationally blind, we can only prevent issues through guesswork and luck. Examination and Scanning Mechanisms Medical This is analogous to going for a routine checkup with your physician. They poke and prod and scan your body to see how it is functioning, looking for warning signs that they have encountered in the past in order to mitigate health risks before they become issues. System We write scripts and small programs which, similar to our physicians, examine and scan the system looking for events which indicate issues before they become issues. We may even instrument some invasive monitors into our critical business programs that notify us when events happen. These checks run at regular intervals and watch for events that are similar to known past issues. Results In this scenario, we are granted a kind of black and white operational vision.  However, we are still unable to see with full color and excellent foresight. This approach is still valuable, no matter the other methods we use. At intervals we run scripts which gather log data, poll running processes and collect system {cpu,ram,disk} resource information. Additionally per-language instrumentation is done that modifies language runtimes in order to collect trace data. These are great sources of information, but they don't compare to the ability to having detailed data from every process all the time, a “miss nothing” approach. Brain and Central Nervous System Medical A physician’s dream would be to hook into the brain and central nervous system (BCNS) in order to intercept and know exactly what was happening at all times. The problem with such a monitoring system (if it even existed) is that it involves an extremely invasive operation and therefore should only be undertaken in cases where the benefits outweigh the risks. System The BCNS of our running systems is the Kernel and its nerves are called “modules
about 15 hours ago
One day, two rubies with Rubinius 2.0 and JRuby 1.7.5. MRI 2.1 vs Rubinius 2.0 benchmark, Virtus 1.0, Capistrano woes, and help Ruby on Sails. Listen to this episode on Ruby5 This episode is sponsored by Code School Spanning 7 levels...
One day, two rubies with Rubinius 2.0 and JRuby 1.7.5. MRI 2.1 vs Rubinius 2.0 benchmark, Virtus 1.0, Capistrano woes, and help Ruby on Sails. Listen to this episode on Ruby5 This episode is sponsored by Code School Spanning 7 levels and bringing you nearly 40 interactive coding challenges, Rails 4 Patterns follows up on Rails Best Practices and teaches you common practices and techniques to help your Rails application stand the test of time. Learn how to avoid pitfalls in ActiveRecord, extract reusable components and concerns, build a JSON API, and more. Rubinius 2.0 Last Friday, Ruby Hero Brian Shirai announced the release of Rubinius 2.0. And, with this release, Rubinius is moving toward concentrating on being the foundation for modern concurrent and distributed applications. MRI 2.1 vs. Rubinius 2.0 Miguel Camba put together a blog post where he recorded Ruby benchmarks across MRI, JRuby, and Rubinius using the ruby­benchmark­suite. Rubinius actually ran faster than the current Ruby 2.1 dev branch and even beat JRuby 1.7.4 in all of the multithreaded tests. JRuby 1.7.5 JRuby 1.7.5 was released yesterday! Aside from a number (243) of issues resolved, this new version brings improved transcoding support, Ripper support, Fiber fixes, and encoding and multilingualization improvements. It seems like pathname, date and time have been sped up. Call performance for magic globals has been increased as well, and block and proc creation and dispatch has been improved as well. It’s interesting to note that as the Rubinius project did, the JRuby project moved several standard library pieces into gems with this release. Virtus 1.0 This weekend, Piotr Solnica released Virtus 1.0. Virtus was built from extracting the dynamic property definitions in DataMapper into its own library. Think of it kind of similarly to attr_accessor but with 100% more utility, or as they put it, “Attributes on Steroids for Plain Old Ruby Objects.” It supports defaults, type checks, coercion, and a whole lot more. Everyone has probably rolled their own library for doing something like this and Piotr and the rest of the team have done an incredible job with Virtus. Capistrano woes Lee Hambley, the maintainer of Capistrano over the last few years posted a heartfelt message to the project’s mailing list last week talking about how we was considering stepping down. Help Ruby on Sails A lot of people apparently signed up for Ruby on Sails but sponsors were hard to find and Jim found himself having to put $7,200 of his own money to cover the cost. To help him out you can purchase a Ruby on Sails t­-shirt. If Jim closes the fundraising gap he will donate any excess funds to Rails Girls South Florida. The event is still 4 sponsors short, so don’t hesitate to get in touch with info@rubyonsails.info if you’re interested.
about 19 hours ago
Registration Has Opened! - For this year's Rails Rumble. build_frontend.sh - Work towards replacing the asset pipeline with a bash script. Use Rails with the db schema you always wanted - A gem to reverse-engineer models from a pre-exi...
Registration Has Opened! - For this year's Rails Rumble. build_frontend.sh - Work towards replacing the asset pipeline with a bash script. Use Rails with the db schema you always wanted - A gem to reverse-engineer models from a pre-existing PostgreSQL database.
1 day ago
I've been dabbling in Dancer (Version One, not so much Version Two). Our first opportunity to create a production-worthy Dancer application just rolled out with encouraging results, so I thought I would outline some things we tried, and ...
I've been dabbling in Dancer (Version One, not so much Version Two). Our first opportunity to create a production-worthy Dancer application just rolled out with encouraging results, so I thought I would outline some things we tried, and things we learned. Don't worry if you don't know a thing about Dancer; I'll educate you a little as we go along. First, some background. This application was a re-host and rewrite of an existing application written in Javascript and plain old CGI Perl scripts, returning either HTML or fairly simple JSON objects. Even the database it connected to was ancient DBM files. Those files were created by extracting data from the main website's database, so that part was easy to replace – we just had to use the extraction queries (mostly) to connect directly. We chose Dancer as the platform for this effort because of its purely Perl footprint, and its relatively easy deployment. Since I didn't really want to rewrite the front-end Javascript code, I left that mostly as-is and concentrated on replacing the CGI scripts. The first step was to move all their code into a non-Dancer Perl module, which communicated with the outside world entirely in the form of hashrefs: sub do_something_great { my $opt = shift; my $output = {}; # do something great! return $output; } Next, as a stop-gap measure, I replaced the innards of all the CGI scripts to turn CGI arguments into a hashref and call my new processing stuff. Note that so far, no actual Dancer code has been involved. This was intentional; since my Dancer expertise was still a bit thin, I wanted to have as few app-caused problems as possible, when I started Dancing. But now we should stop for a moment and learn just enough about Dancer to be less dangerous. Dancer (details at the first link in this article) is a web application framework: in essence, it's a way to convert URLs into data. You feed in a URL, you get back a web page, a structure, maybe a side effect or three. In order to connect your application to a browser, you need a series of routes: package MyApp::Routes; use Dancer; get '/index.html' => sub { print 'hello, world'; } Dancer sets up some easy-to-grasp syntax that lets you associate a clump of Perl code (an anonymous sub, in the example above) with a URL and a method. Here, a GET of "/index.html" runs the code, and sends the output back to the browser. ... post '/myapp/do_this.html' => sub { do_this(param->{foo}); return q{It's done.}; }; Likewise, we can specify more complex URLs (such as "/myapp/do_this.html?foo=bar"), with POST methods, and access the CGI parameters via the param() function. (It just returns a hashref, which we can address as shown. Dancer provides quite a bit of support infrastructure: config files, database connections, plug-ins for templating HTML or other output, etc. Since this article is a Gentle Introduction, I refer you to the link cited above if you want to delve deeper. Now it was pretty simple to make gradual progress: I'd eliminate one CGI script at a time, replacing it with a Dancer route (stored separately from my main processing module, so that the processing could continue to be ignorant of Dancer). Most of the routes were very simple, since the paths they had to recognize were simple and straightforward, with simple CGI parameter lists. E.g., get '/notes.html' => sub { my $context = MyApp::get_notes({ dbh => database(), order => params->{order}, raw => 1, }); template 'notes', $context, { layout => 'plain' }; }; This example is one of the routes that produces HTML. The "template" built-in is just a layer wrapped around your preferred templating system (such as Template::Toolkit); it looks for a template file called "notes", using a set of values specified by "$context", and wraps the result in a "layout" file called "plain". (At the risk of grossly oversimplifying: your "template" can be thought of as all of you
2 days ago
Appmaker - New online mobile application generation tool from Mozilla. Introducting Harp - A web server for static files with built-in preprocessing. Bitch - Log ruby messages to the OS X notification center. Time to hand over the rei...
Appmaker - New online mobile application generation tool from Mozilla. Introducting Harp - A web server for static files with built-in preprocessing. Bitch - Log ruby messages to the OS X notification center. Time to hand over the reigns before Capistrano costs me my youth? - Looks like Lee Hambley has about had it with maintaining this particular piece of OSS.
2 days ago
Ben Orenstein has written an interesting article: How much should global variables cost?. It's basically a price-list for different kinds of technical debt, and you can use it to calculate the "cost" that each of your commits adds to yo...
Ben Orenstein has written an interesting article: How much should global variables cost?. It's basically a price-list for different kinds of technical debt, and you can use it to calculate the "cost" that each of your commits adds to your codebase. By actually putting a dollar amount on each "violation" - you can get a good, visceral feel for what you're doing. As he points out - you can still choose whether or not to keep something (sometimes you really do need to do something that would otherwise be considered a no-no), as long as you can "afford" it. I think it's an interesting way of looking at the problem. I'd like to see you regaining points for fixing/refactoring similar code-violations out of the project too :)
4 days ago
Price of everything in tech is one billion dollars: (except 37signals, we're 100B: .
Price of everything in tech is one billion dollars: (except 37signals, we're 100B: .
5 days ago
Calling all you Java lovers! If you are interested in gaining early access as we gear up to release Java on our platform, check out our Java page and sign up for early access! We will also send you a questionnaire about what you’d like i...
Calling all you Java lovers! If you are interested in gaining early access as we gear up to release Java on our platform, check out our Java page and sign up for early access! We will also send you a questionnaire about what you’d like in your optimal Java stack to help us prioritize development. --Tasha Drew, Product Manager Engineering Updates The one and only, developer extraordinaire Martin Emde has just cut a new release of the Engine Yard gem! You can check out the changelog in full, and Martin is working on a blog post going over the new features, but a couple highlights are: New command ey init writes or updates an ey.yml configuration file to help users understand all the ey.yml options. ey init is recommended for all applications to provide extra documentation in ey.yml. New command ey servers -e env shows servers for a specified environment in a machine/user readable format. ey ssh accepts new options -t and --each. Experimental option -L is also supported. Social Calendar (Come say hi!) Monday, October 7th - Thursday, October 10: PHP Community Engineer Davey Shafik will be joining Edward Chiu, Carsten Puls, and Noelle Daley at ZendCon in Santa Clara.  Be sure to check out Davey's talk on MySQL HA, Recovery and Load Balancing! Wednesday, October 9th: PJ Hagerty will be hosting Lightning Talks this year at Rails Israel 2013, the biggest Ruby on Rails conference in the Middle East. Articles of Interest In addition to Twitter filing documents for their potential IPO, there is other Twitter news: founder Jack Dorsey has been tweeting back and forth with Iranian President Hassan Rouhani! Observers wonder if this could be a sign that Iran’s social media ban may be lifted soon. The NYT does investigates the current flirtations between Big Agriculture and Big Data. The post October 4, 2013: This Week at Engine Yard appeared first on Engine Yard Developer Blog.
5 days ago
Better layouts with Nestive, a Ruby port of the Resty tool, more extensible exception handling with rescue_from, flexible bindings for IRB, compliance with Sandi's rules of Ruby, and Faye 1.0 all in this episode of the Ruby5! Listen to...
Better layouts with Nestive, a Ruby port of the Resty tool, more extensible exception handling with rescue_from, flexible bindings for IRB, compliance with Sandi's rules of Ruby, and Faye 1.0 all in this episode of the Ruby5! Listen to this episode on Ruby5 This episode is sponsored by New Relic New Relic is _the_ all-in-one web performance analytics product. It lets you manage and monitor web application performance, from the browser down to the line of code. With Real User Monitoring, New Relic users can see browser response times by geographical location of the user, or by browser type. Nestive Want more control over template injection that what `content_for` affords? Take a look at nestive! Ruby Resty Now there is a Ruby implementation of the Resty command-line tool! rescue_from Rails has a handy but little-known macro called rescue_from. Learn about it in this blog post! binding.repl Pry has long held the monopoly on runtime invocation, but now binding.repl allows you to get similar functionality in IRB, Ripl, and Pry. Sandi-Meter Sandi Metz' rules have become pretty famous as of late, this tool allows you to visualize your complicance to them. Faye 1.0 Faye 1.0 was released! Your favorite pub/sub library now with promises!
5 days ago