BlogSphere
Keep up to date with your favourite Rails bloggers in context.
by
Michael Carøe Andersen | over 2 years ago |
Read more
To celebrate New Year’s Eve Ann and I joined Ann’s sister and boyfriend for a trip to the neighbor island of Gozo. I’ve been to Gozo a couple of times and always enjoy the quieter, green island for a break away from bustling Malta – this time it wasn’t that quiet tho.
Victoria, the biggest [...]
by
Ruslan Voloshin | over 2 years ago |
Read more
Роман, как раз сегодня смотрел в сторону GAE. Как я понимаю, там нет нативной поддержки руби и все запускать надо из-под JRuby.
Второе - там нужно использовать DataMapper для реалиционных БД, что тоже заставляет задуматься.
Если ты будешь "заводить" рельсовое приложение - отпишись пожалуйста - тема очень актуальна!
by
Alex Rothenberg | over 2 years ago |
Read more
I like to freeze all the gems I use as we run in a shared hosting environment and need to our apps isolated from each other. Deployments are also handled by an operational team that does not intimately understand our applications so keeping our deployments to a single capistrano command
cap deploy:migrations has been a big win for us. Freezing most gems is pretty straightforward and has been built in since Rails 2.1. When dealing with a gem that requires native extensions to be built there's only one additional step to add to your Capfil.
Let's say we want to localize
hpricot which does include native C extensions.
First tell Rails about your gem by adding a config.gem line to your environment.rb
Rails::Initializer.run do |config|
...
config.gem 'hpricot'
...
end
Now we can ask rails about its configured gems
$ rake gems
(in /Users/alexrothenberg/ruby/my_project)
- [I] hpricot
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
The 'I' means its hpricot is installed on my system but not frozen in the application. If you see '[]' instead you need to run
sudo gem install hpricot (add '--source http://gemcutter.org' if necessary). At this point you could write some code to use hpricot and your application will work. But if hpricot (or the version you're expecting) is not installed on your production server you'll be in trouble.
To freeze the gem into your vendor directory run
rake gems:unpack (optionally you can add 'GEM=hpricot' if you just want to unpack one gem).
$ rake gems:unpack
(in /Users/alexrothenberg/ruby/my_project)
Unpacked gem: '/Users/alexrothenberg/ruby/my_project/vendor/gems/hpricot-0.8.2'
We can ask rails again...
$ rake gems
(in /Users/alexrothenberg/ruby/my_project)
The following gems have native components that need to be built
hpricot
You're running:
ruby 1.8.6.287 at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
rubygems 1.3.2 at /Users/alexrothenberg/.gem/ruby/1.8, /Library/Ruby/Gems/1.8, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
Run `rake gems:build` to build the unbuilt gems.
Oops our vendored gem is missing hasn't built the native extensions. Not to worry the message tells us what to do and we run
rake gems:build
$ rake gems:build
(in /Users/alexrothenberg/ruby/my_project)
Built gem: '/Users/alexrothenberg/ruby/mars-admin/vendor/gems/hpricot-0.8.2'
alex-rothenbergs:mars-admin alexrothenberg$ rake gems
(in /Users/alexrothenberg/ruby/my_project)
- [F] hpricot
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
We can ask rails again to see that the gem is now frozen and also look in our vendor folder
$ rake gems
(in /Users/alexrothenberg/ruby/my_project)
- [F] hpricot
I = Installed
F = Frozen
R = Framework (loaded before rails starts)
$ ls vendor/gems/hpricot-0.8.2/
total 72
-rw-r--r-- 1 alexrothenberg staff 4672 Jan 13 12:33 CHANGELOG
-rw-r--r-- 1 alexrothenberg staff 1048 Jan 13 12:33 COPYING
-rw-r--r-- 1 alexrothenberg staff 9216 Jan 13 12:33 README
-rw-r--r-- 1 alexrothenberg staff 8242 Jan 13 12:33 Rakefile
drwxr-xr-x 4 alexrothenberg staff 136 Jan 13 12:33 ext/
drwxr-xr-x 3 alexrothenberg staff 102 Jan 13 12:33 extras/
drwxr-xr-x 6 alexrothenberg staff 204 Jan 13 12:39 lib/
drwxr-xr-x 11 alexrothenberg staff 374 Jan 13 12:33 test/
Everything looks good and you can check this into git and now have a frozen version of the hpricot gem stored with your application.
But if we stop here, when we deploy to our production server we'd be using the native extensions we built on your laptop which may not work on the server if you have one is 32bit and the other 64bit or you have different OS libraries installed or any number of other reasons.
To be safe, we need to rebuild the native extensions on the server when we deploy. This is not as hard as it sounds as rails gave us the rake task
rake gems:build. We can ask capistrano to run that command on the server by adding the following to your
Capfile.
after "deploy:finalize_update" do
# build the native extensions for hpricot gem
run "cd #{release_path} && #{rake} RAILS_ENV=#{rails_env} gems:build GEM=hpricot"
end
Now when capistrano deploys in with all the other messages you'll see something like
...
* executing "cd /opt/apps/my_project/releases/20100108185109 && rake RAILS_ENV=production gems:build"
servers: ["your.server.com"]
[your.server.com] executing command
** [out :: your.server.com] (in /opt/apps/my_project/releases/20100108185109)
** [out :: your.server.com] Built gem: '/opt/apps/my_project/releases/20100108185109/vendor/gems/hpricot-0.8.2'
command finished
...
So rails give us a few simple patterns to follow to freeze our gems in the vendor folder and with a few lines in you Capfile you can use this pattern to vendor a gem with native extensions.
by
Jerry Richardson | over 2 years ago |
Read more
“(917): we ran out of wine so you tried to make some by throwing grapes and nail polish remover in a blender.”
-
Texts From Last Night
by
Pedro Custódio | over 2 years ago |
Read more
You’ll find a lot of literature and best practices when searching for answers on what goes beneath the fold of your website, so Google came to the rescue and just released the Google Browser Size, a visualization of browser window sizes for people who visit Google, which you can customize to see how does this [...]
by
Matthew Conway | over 2 years ago |
Read more

mondojergens:
my kaboomed packaged ramen
added pork belly, soy sauce, hon-dashi, onion, green onion and a little bit of brown sugar
This is exactly what I’m after right now. haha
by
slant | over 2 years ago |
Read more
Multi-currency is now available in FreshBooks. http://bit.ly/86LP0B
by
slant | over 2 years ago |
Read more
Just found out last night that my client’s users are not only on IE7 (which we knew), but about 50% are on IE6… kill me now.
by
Paul Bocheck, Ph.D. | over 2 years ago |
Read more
// = 0)
{
var hostname = window.location.hostname;
[...]
by
Paul Bocheck, Ph.D. | over 2 years ago |
Read more
October, 2, 2009
On: http://www.barternewsweekly.com/2009/10/02/bartering-makes-comeback/
In my search for barter and trade related news I stumbled on this article from the Bismarck Tribune about a group of people that used to get together in the park to swap whatever they had for the stuff that they wanted, back in the ’60s and ’70s. Now [...]
by
Steven Ness | over 2 years ago |
Read more
by
Paul Bocheck, Ph.D. | over 2 years ago |
Read more
// = 0)
{
var hostname = window.location.hostname;
[...]
by
Steven Ness | over 2 years ago |
Read more
by
Steven Ness | over 2 years ago |
Read more
by
Steven Ness | over 2 years ago |
Read more
Working Out As A Programmer"Working out lets you do the things you actually enjoy."
- Poster at the Gym.
I dunno, I kinda like working out, it's nice to turn off the brain for a while.
by
Kevin Burg | over 2 years ago |
Read more

juliasegal:
Tron Dog
by
Greg Moreno | over 2 years ago |
Read more
A friend back in college once told me that he doesn’t measure his time in terms of minutes or hours but with pesos. I thought he was just drunk as we often were in college. Years later, when I started accepting freelance projects, I realized how important it is to put a dollar amount on [...]
No related posts.
by
Steven Ness | over 2 years ago |
Read more
by
Steven Ness | over 2 years ago |
Read more
by
Steven Ness | over 2 years ago |
Read more
by
Ruslan Voloshin | over 2 years ago |
Read more
1 dyno это как раз и есть бесплатный аккаунт, по производительности равняется приблизительно 1 mongrel.
Несколько раз тестил heroku. Подкупает легкость деплоя - набрал в консоли пару комманд - и вуаля. Сайты работают быстро, сейчас вводят поддержку Memcached.
Все отлично, но для бесплатного варианта самое большое ограничение - 20 метров трафика в день + необходима кредитка, чтобы подключить домен.
Сейчас тестирую GAE. Там ограничения бесплатного аккаунта - 600 метров "на диске" + около 5 миллионов просмотров страниц в месяц. Разворачивается приложение так же удобно - парой команд в консоли. Но там "все по-другому" :)
Еще из хостингов планирую начать использовать:
- http://www.slicehost.com 256MB оперативы, 10GB на диске, 100GB трафик, $20/месяц
- http://www.rackspacecloud.com/cloud_hosting_products/servers/pricing параметры теже, но за $10.95/месяц, трафик - 22/GB исходящего и 8/GB входящего.
by
Tammer Saleh | over 2 years ago |
Read more
Back in 2008, Dan Cederholm posted a great design tip on CSS-based fancy ampersands. The basics of this technique is that you surround every & in your headers with a <span class="ampersand"> tag. Then, in CSS, you define .ampersand as something like the following:
span.ampersand {
font-family: Baskerville, Palatino, "Book Antiqua", serif;
font-style: italic;
font-weight: normal;
}
…or, in Sass:
.ampersand
:font-family Baskerville, Palatino, "Book Antiqua", serif
:font-style italic
:font-weight normal
Fancy ampersands are one of those little details that adds a subtle aesthetic touch, and gives the page an extra notch of professionalism. Unfortunately, adding those spans by hand is both bothersome, and error-prone. It also becomes difficult to make use of this technique for existing or automatically generated content.
Luckily, that’s why god created jQuery!
With a little addition to our application.js, we can have fancy ampersands inside all of our header tags (h1, h2, etc.):
$(document).ready(function(){
$(":header:contains('&')").each(function(){
$(this).html($(this).html().replace(/&/, "<span class='ampersand'>&</span>"))
});
});
You can see this in action on this site, where blog titles with an ampersand get all fancified.

by
Zachary Scott | over 2 years ago |
Read more
recaptcha is a great resource for setting up captcha's on your website to help stop spammers and robots from submitting malicious data into your database. ambethia has a rails ready plugin for adding the captcha into your application.
their rdoc documentation has easy to follow steps on how to set up the recaptcha.
by
Ruslan Voloshin | over 2 years ago |
Read more
В топку инстант рейлс. Сколько займет времени установить все самому?, максимум 30м, и зачем какие то готовые сборки?, которые не такие гибкие как то что ты сам установишь. Тем более на Линукса инстант рейс не покатит. Та и по своему опыту лучше пользоваться Линуксами, особенно для такого языка как руби, это ИМХО.
by
John Ford | over 2 years ago |
Read more
Ok, I’m super stoked about the possibilities of this one. Gordon is an open source Flash™ runtime written in pure JavaScript. Give some of these demos a try on your iPhone. They don’t run as fast as they do on the computer but OMG Flash on the iPhone!
http://jancona.com/gordon/demos/blue.html
http://jancona.com/gordon/demos/tiger.html
http://jancona.com/gordon/demos/trip.html
(thanks Mark)
by
Steve Deiters | over 2 years ago |
Read more
THE Federal Reserve Board may want to scrutinize another statistic to gauge the health of the economy: demand for ads during Super Bowls. As Super Bowl XLIV nears on Feb. 7, CBS is already “very close to a sellout,” a spokesman for the network, Dana McClintock, said on Tuesday. He declined to specify how much of the estimated 30 to 35 minutes of paid commercial time in the game was still available.
By contrast, at this point in 2009, when NBC was selling spots to be shown during the broadcast of Super Bowl XLIII on Feb. 1, considerably more time remained unsold.
by
Steve Deiters | over 2 years ago |
Read more
Just how bad was 2009 for magazines?
Try 58,340 pages. That’s the number of advertising pages that American magazines lost last year, according to Publishers Information Bureau figures released on Tuesday.
by
Steve Deiters | over 2 years ago |
Read more
Ford gave 100 consumers a car for six months and asked them to complete a different mission every month. And away they went. At the direction of Ford and their own imagination, "agents" used their Fiestas to deliver Meals On Wheels. They used them to take Harry And David treats to the National Guard. They went looking for adventure, some to wrestle alligators, others actually to elope. All of these stories were then lovingly documented on YouTube, Flickr, Facebook, and Twitter.
by
Ruslan Voloshin | over 2 years ago |
Read more
Копался в старых темах, решил ответить - ведь уже есть более актуальные пакеты.
Пользователям Винды порекомендовал бы Битнами Рубистек
http://bitnami.org/stack/rubystack
там рельсы посвежее и сделано всё не так "дубово", как в Инстанте
by
Steve Deiters | over 2 years ago |
Read more
Top US companies are missing out on a large portion of the potential Twitter holds for their businesses, according to two separate studies from PR firm Weber Shandwick and the University of Massachusetts Dartmouth. Both studies indicate that while Corporate America is familiar with Twitter, it is not taking advantage of the full range of Twitter’s business capabilities.
by
Steve Deiters | over 2 years ago |
Read more
Interview with Steve Rubel, Senior Vice President at Edelman Digital. Steve advises some of the biggest names in the world, such as Dannon, Hewlett Packard, Pepsi and Microsoft, on social media. Learn about “shared mutual gain” and why Steve quit blogging.
by
Aaron Worsham | over 2 years ago |
Read more
A lot of businesses are using social media. And producing content. But when you take a closer look at their content (and to a lesser extend, their interactions), it’s all really thinly veiled marketing. While people may or may not mind being marketed to, it’s usually not what they consider useful information. If you really [...]
by
Kevin Burg | over 2 years ago |
Read more

xxxjustinralconxxx:
Netflix to stream on your wii via @tomreynolds
by
Paul Watson | over 2 years ago |
Read more
New 2010 Ford Focus design fairly disappointing . It’s not even inline with the new Fiesta design. Looks like a current model Focus with a body-kit and some bling.
by
Nolan Eakins | over 2 years ago |
Read more
 |
did anyone see xcar at their local computer retailer in 1996? #daggerfall
|
by
David Friedman | over 2 years ago |
Read more
Thank you to everyone who attended our LogicClassroom presentation last night. We discussed how and why to leverage different social media platforms for your business. Don’t worry if you missed this session - the slides are below for you to view!
Please join us for our next LogicClassroom session 2/9/10 on Search Engine Optimization 101. Please [...]
by
Zachary Scott | over 2 years ago |
Read more
using shjs syntax highlighting i've got a really quick and easy syntax highlighting in place. it uses javascript and css, backed the language definitions from gnu source-highlight. perfect for when i want to display code snippets on my posts.
so lets give it a try! here is an easy way to add authentication to a controller in rails:
class AdminController < ApplicationController
before_filter :authenticate
# some admin actions like create, edit, delete
protected
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "username" && password == "yourpassword"
end
end
end
by
Jason Long | over 2 years ago |
Read more

Almost two years ago, I <strike>read</strike> devoured a great book called “Daemon” and posted a mini-review of it here. Two days later I received an email from the author, Daniel Suarez, thanking me for the support.
Then, about this time last year, Daniel sent me autographed copies of both the original trade paperback and the new hardback edition of “Daemon”.
Fast-forward to yesterday. When I opened the mailbox, I had a copy of “FreedomTM” (the sequel to “Daemon”) waiting for me. So cool - thanks a bunch, Daniel! I’ll post a review when I finish reading it.

by
Nolan Eakins | over 2 years ago |
Read more
 |
on ethics, the federal reserve is making money from securities
|
by
Darragh Browne | over 2 years ago |
Read more
After successfully placing one developer, our client is looking for a second mid to senior level developer with strong front-end skills and at least 2 years commercial experience in Ruby on Rails
Based in funky offices just outside London, this job is an excellent opportunity for a self-motivated developer to get involved with an agency [...]
by
Ara T Howard | over 2 years ago |
Read more
by
Michael Alderete | over 2 years ago |
Read more
Recorded Books is offering a dozen audiobook apps in the iTunes Store, audiobooks built into an app for playing them on an iPhone or iPod Touch. The app is intended to make acquiring and listening to an audiobook easier and less frustrating. In some ways it succeeds.
by
Anoop Ranganath | over 2 years ago |
Read more
Sruti sent me a message with the subject: you’re a great role model……
Conversation in the car yesterday:
Karthik: Mommy, should we go ice skating on Saturday?
Sruti: Maybe…….we’re going to NYC, remember?
K: Yes, we see Ashish chikkappa, Sweta chikki and Noop mamma has a crayon shirt
S: crayon shirt?
K: yes, noop mamma draws with crayons on his shirt. When I’m taller like noop mama, I draw on my shirt with crayons too
I can’t wait for the weekend. I’ll be sure to wear my crayon shirt.
by
Sean Behan | over 2 years ago |
Read more
I was in the market for a simple php script to replace hrefs with their absolute paths from scraped web pages. Like a lot php scripts found on forum posts, those that I found were needlessly verbose and complicated. So I eventually wrote one myself. The code below is extracted from a larger program. [...]
Tell us what you think of the new BlogSphere feature. We are continually looking to improve and update the
functionality based on your feedback.