terminal heroku login git clone git://github.com/copycopter/copycopter-server.git cd copycopter-server heroku create --stack cedar bundle install --without=test # if heroku command fails git push heroku master heroku run rake db:migrate heroku restart heroku run rake copycopter:projec...
I’m excited to announce that as of today (March 28th), I’ve accepted a new position at LivingSocial! I’m an Engineering Director, managing a few teams that work on backend architecture such as email, scaling, etc. For the past 5 years, Engine Yard has been an amazing employer. Back in...
#337 Capistrano Recipes Mar 27, 2012 | 13 minutes | Deployment , Production , Tools Get the most out of Capistrano by writing specific recipes with ERB templates. Here I show how to deploy to a VPS from scratch by running just a few commands. Subscribe to Watch Episode Tweet Show Note...
I find the inject solution less readable than something like: a = [1,2,3,4,5,6].map{|x| x.to_s if 0 == x % 2}.compact or a = [1,2,3,4,5,6].find_all{|x| 0 == x % 2}.map{|x| x.to_s} One of the aesthetic issues I have with inject is the requirement that the value the block returns become...
Railsアプリケーションの中で非同期処理 (バッチ処理)を実現したいことがあります。例えば、こんな場合です。 ユーザーが「送信」ボタンを押したら数千通のメールを送る。 数千通のメールを送るにはかなり時間がかかるので、その処理は後回しにして、ユーザーにはすぐにレスポンスを返したいところです。 非同期処理を行うためのRubyライブラリとしてはBackgrounDRb やdelayed_job などが有名ですが、もう一つ有望な選択肢としてResque というのがあることを最近知りました。 と言っても、私が知らなかっただけで、RubyGems.org によれば11万回以...
RSpec ベストプラクティス RSpec は、振舞駆動の設計プロセス (behaviour driven design process) において、人間にとって読みやすい仕様を書くための優れたツールです。RSpec で書かれた仕様が、アプリケーション開発における方向と検証を行います。本記事では私たちが気づいた、エレガントで保守しやすい仕様を書くためのプラクティスを紹介します。 まず、何をしてるのかを #describe で説明しましょう 定義するつもりのメソッドごとに、#describe を使うことから始めましょう。このとき引数にはメソッド名を指定します。クラス...
There are some new features related to EXPLAIN in the forthcoming Ruby on Rails 3.2 we'd like to share: Running EXPLAIN manually Automatic EXPLAIN for slow queries Silencing automatic EXPLAIN As of this writing they are available for the adapters sqlite3 , mysql2 , and postgresql . Ru...
Engine Yard, Inc. Log in Login to Engine Yard Cloud Login to Orchestra PHP Cloud Products Engine Yard Cloud Engine Yard Managed Orchestra PHP Cloud Platform Services Solutions Mobile Social Campaigns Services Support Training Professional Services Dev. & Digital Agencies Developer Cen...
Learn an easy, unobtrusive way to add AJAX functionality to an existing set of pagination links using jQuery.
Rails Modularity for Lazy Bastards 2009-04-16 04:31, written by Gregory Brown When we develop standalone systems or work on libraries and frameworks, modularity seems to come naturally. When something seems to gain a life of its own, we pull it off into its own package or subsystem to...
My pair and I were recently working on an app that asynchronously loaded the Facebook Javascript SDK but synchronously loaded the jQuery library. We had to invoke some javascript once Facebook and jQuery were both loaded, and this post describes how we did it. First, we followed Faceb...
Engine Yard Expands Global Partner Program to Deliver Rich Ecosystem of Leading Applications and Services Growing PaaS Demand Drives Continued Success of Thriving Developer Ecosystem SAN FRANCISCO – March 28, 2012 – Engine Yard , the leading Platform as a Service (PaaS), today announc...
#337 Capistrano Recipes Mar 27, 2012 | 13 minutes | Deployment , Production , Tools Get the most out of Capistrano by writing specific recipes with ERB templates. Here I show how to deploy to a blank VPS by running just a few Capistrano commands. Subscribe to Watch Episode Tweet Show ...
master slave replication in rails Posted by flyerhzm on March 28, 2012 — 0 comments I just created a new post master slave replication in rails to introduce maser slave replication, how to use in rails, and the solution to replication lag. Comments Post a Comment Comment abilities...
# File '/var/www/sass-pages/.sass/lib/sass/script/functions.rb', line 942 def mix(color1, color2, weight = Number.new(50)) assert_type color1, :Color assert_type color2, :Color assert_type weight, :Number unless (0..100).include?(weight.value) raise ArgumentError.new("Weight #{weight}...
That is true, I suppose when I was creating the list to be the brevity of the Ruby5 on top of just information seemed like it wouldn't be useful to people who were new to Rails. I feel that information is useful if the person can at least gain some knowledge about the community and pe...
The previous error that was caught was connection pool of new applications have size 1 . This demonstrates the unique value that my tests bring to the table. Outside of my tests, the bulk of the test of Rails is an impressive array of unit tests (which verify that the connection pool ...
Method deprecated or moved This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here. create_association (*options) public Creates a new instance of the associated class, and immediately saves it with ActiveRecord::Base#save. opt...
ActiveRecord is cool and all, and it goes without saying that we all trust its judgment, but sometimes you just want to watch while it does its thing. For instance, just today, I wanted to verify that, in edge Rails, ActiveRecord no longer loads the entire collection when doing a scop...
Browser page history and bookmarks do not usually work with AJAX requests, but in this episode I show you how to remedy this problem using a simple jQuery plugin.
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating fo...
This method is a shortcut to all default validators and any custom validator classes ending in ‘Validator’. Note that Rails default validators can be overridden inside specific classes by creating custom validator classes in their place such as
kestrel-client 0.7.2 Ruby client for the Kestrel queue server install gem install kestrel-client Download Documentation Subscribe Stats Authors Matt Freels, Rael Dornfest 10,845 total downloads 43 for this version Owners Links Homepage Source Code Bundler gem "kestrel-client", "~> 0.7...
This Canadian based site provides affordable textbook rental to students. End Point designed and built custom functionality to handle frontend rentals and textbook inventory management. Additional custom work included search functionality integration with Solr using the community avai...
> Regular expressions for all character work would be a *terribly* slow > way to get things done. If you want to get the nth character, should you > do a match for n-1 characters and a group to grab the nth? Or would it > be better if you could just index into the string and have it d...