You are here: Blogsphere Longtail

Rails BlogSphere

BlogSphere

Keep up to date with your favourite Rails bloggers in context.

Read more about how it works


Andre_lewis Why I'm on Aptana instead of Netbeans

by Andre Lewis | about 2 hours ago | Read more

Such a small thing, but it impacts every moment spent with code: the speed of the as-you-type file lookup/open.

  • On Aptanta, Apple-Shift-R is instantaneous -- a direct link from thought to file. It also helps that the default keyboard shortcut rolls of nicely with one hand.
  • On Netbeans, Control-Shift-O takes several seconds (and takes two hands)

Sadly (for Netbeans and those of us who would like to take advantage of its manifest goodness) it's as simple as that.

Hi y'all we're back from Texas

by Paul Philippov | about 2 hours ago | Read more

We've been in Austin, TX for a week and now got back home. But my heart is still crawling somewhere along Brazos and the Sixth streets. I never expected I'd like Texas so much. There was first trip to America, Eugenia was there last year, in New York. But seems she's amazed by Texas as much as me. We've got a lot of photos of beautiful Austin, you can view then on my flickr account and Eugenia's one too. I'd like to put here the one I love the most:

Streets of Austin, TX

Still here

by Matteo Nodari | about 2 hours ago | Read more

Hey everyone!

It’s been a long a time since our last post, but in the past few months we’ve been incredibly busy working on a few projects: both for ourselves and for our clients. Of course, we love being busy and don’t complain about it, but we had to put the blog on hold.

However, the idea right [...]

Head7 TextMate 1.99

by Matt Mower | about 2 hours ago | Read more

Trevor Squires has released a brilliant bundle for TextMate that uses the Ack tool to provide the kind of search in project feature that TextMate has been sorely lacking for... oh I don't know about 2.5 years now.

Ack is described as

a tool like grep, aimed at programmers with large trees of heterogeneous source code.

and the TM bundle means you have, bound to Cmd+Shift+A, a fast search in project that will also (and how long have I wanted this??) restrict searches to the part of the project tree you have selected.

Justin_williams Fox7’s Randy Moore or Captain Kangaroo? You decide

by Justin Williams | about 2 hours ago | Read more

magicmike9000 has one last set of old Evansville videos to share. Here’s a short clip from 1984 featuring, then sports guy, Randy Moore. I’m glad to see that Randy has lost the ‘stache and acquired a suitable haircut these days. Mike also has a clip for Alice Jackson and Allen Denton [...]

Как посмотреть выполняющиеся в данный момент запросы в PostgreSQL?

by Artur Pyrogovskyi | about 2 hours ago | Read more

Информацию о текущих запросах постгрес может записывать в таблицу pg_stat_activity.
Для того, чтобы включить эту статистику, нужно внести изменения в конфигурационный файл postgresql.conf.

В CentOS, например, при установке пакетов с PGDG, сначала нужно в папке /usr/share/pgsql создать этот конфигурационный файл из темплейта (postgresql.conf.sample), находящегося в ней же, и расскомментировать строки:

stats_command_string = on
stats_start_collector = on              # needed for block or row stats


Теперь сервис нужно перезагрузить:

# /sbin/service postgresql restart

, и в консоли постгреса смотреть статистику:

postgres=# select * from pg_stat_activity;

The Cross is proud to present the Vancouver Premiere book launch event for Carrie McCarthy &...

by Daniel Gibbons | about 2 hours ago | Read more

The Cross is proud to present the Vancouver Premiere book launch event for Carrie McCarthy & Danielle LaPorte’s bestselling book STYLE STATEMENT.

Sunday June 1st, 2008 at 2pm
Talk starts at 2:30pm
Tea, coffee and treats will be served
Limited Seating and Goodie Bags, please RSVP to reserve a spot
Copies of the book will be available for purchase at the event

We LOVE The Cross. Not only are their home treasures gorgeous (Carrie worked with them a lot when she was doing Interior Design,) Stephanie and the entire Cross team are lovely. The energy in that store makes you want to pour some tea, pen some thank you notes, and chat about happenings in Paris.

  See you for Sunday tea and talk on June 1st! xo Carrie & Danielle

Justin_williams Gas is $4. Memorial Day travel is cancelled.

by Justin Williams | about 2 hours ago | Read more

As I was leaving the gym this morning, I couldn’t help but notice that the price at the Thornton’s on Burkhardt Road was $3.99 for regular unleaded. $4 gas has finally hit Evansville. If you ask the heads of the major oil companies they will claim their huge profits are a result [...]

Desperate or brilliant? Microsoft's latest move in search

by Vasudev Ram | about 2 hours ago | Read more

This is recent - Microsoft reportedly proposes to give back some money to users who search via its sites, going by the CPA model (Click Per Action), i.e. after they actually end up buying something via clicking on one of the ads they get to see during the search.

There's been a wide range of reactions to this move, on the Net, from quite negative to positive. Here are some:

Alley Insider

Search Engine Land and Search Engine Land again

CNet News.com

GigaOm

Forbes.com's Wendy Tanaka

TechCrunch's latest post on it - they had a few before - see the links in above post.

As this Bob Marley song goes (video below), "time alone will tell" whether it's a good move or not ...


<lj-embed id="1" />



Vasudev Ram - Dancing Bison Enterprises

Biosdkappe Making a good choice when using Flex components

by Dietrich Kappe | about 2 hours ago | Read more

Good people of Adobe were so kind to pack a lot of useful components with Flex Builder. Story goes, they are there to speed up the development process and in doing so cut production cost while retaining excellent user experience....

Funny Troll

by Rick Bradley | about 2 hours ago | Read more

Funny Troll: (posted by vinbarnes)

progress

by Steven Ness | about 3 hours ago | Read more




Tracking the Progress of a Playing Sound in Actionscript 3.0.

From the Actionscript 3.0 Cookbook, which I might just need to purchase. I love the Actionscript 3.0 manual I have, and the cookbook might be a nice addition.



cue

by Steven Ness | about 3 hours ago | Read more




cue points in audio with Flash.



xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe

by Rick Bradley | about 3 hours ago | Read more

xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe: (posted by vinbarnes)

Justin_williams An update on the happenings at Alhambra Theater

by Justin Williams | about 3 hours ago | Read more

It’s been a few months since I’ve written about my favorite piece of Evansville architecture, but the Courier & Press published a story this morning about the return of the summer movie series that takes place outside of the old theater. Friday evening at 8PM, the Fourth Friday Film Classics series kicks off for [...]

who knew? via img.skitch.com (posted by ali) 

by Rick Bradley | about 3 hours ago | Read more



who knew?

via img.skitch.com

(posted by ali) 

See You at Thanksgiving?

by Michael Erb | about 3 hours ago | Read more

“Chick #1: You were way too hard on my dad back there.Chick #2: I know, I’m sorry… I just get so heated.Chick #1: Still, “homophobic asshole” is a little harsh, don’t you think? — Overheard in New York at Park Row

Jerry135x135 Perhaps I have misjudged the number of people who want a 3’ x 5’ flag of their logo.

by Jerry Richardson | about 3 hours ago | Read more

Perhaps I have misjudged the number of people who want a 3’ x 5’ flag of their logo.

Jerry135x135 Up to #12 overall on cakefinancial.com. My gamble on AAPL may carry me into the top ten today.

by Jerry Richardson | about 3 hours ago | Read more

Up to #12 overall on cakefinancial.com. My gamble on AAPL may carry me into the top ten today.

What we're up to

by Jonathan Dahl | about 3 hours ago | Read more

What we're up to

My stack of books for Tumblon.

QR Code for http://project....

by Marcel Molina Jr | about 3 hours ago | Read more

Projectionist_qrcode

QR Code for http://project.ioni.st

geophagy: The eating of ear...

by Marcel Molina Jr | about 3 hours ago | Read more

ge•oph•a•gy
[jee-of-uh-jee]noun
The eating of earthy substances, such as clay or chalk, practiced among various peoples as a custom or for dietary or subsistence reasons.

Vii There we go, Cloggers

by Virak HOR | about 3 hours ago | Read more

There we go cloggers! I have just back from Sovanna Shopping center to see how stuff are getting organized for tomorrow event.  But, seems like it is already done by poo tra.  No much things to hang up, there’s only one big nice banner like in the picture above which you will see it while [...]

We Carry On – Portishead

by Marcel Molina Jr | about 3 hours ago | Read more

We Carry On – Portishead

GroupTweet

by Rick Bradley | about 3 hours ago | Read more

GroupTweet: (posted by arafatm)

Numeric#percent

by Marcel Molina Jr | about 3 hours ago | Read more

Numeric#percent

<link href="/stylesheets/ruby.css?1191685535" rel="Stylesheet" type="text/css" media="screen" />
class Percentage attr_reader :amount def initialize(amount) @amount = amount end def of(number) number * (amount / 100.0) end end class Numeric def percent Percentage.new(self) end end 25.percent.of 16 # => 4.0 18.percent.of 321 # => 57.78

It’s the defeat of de...

by Marcel Molina Jr | about 3 hours ago | Read more

It’s the defeat of death.

Marvin Minsky on the goal of AI

cache_fu: Conditional action-caching stops after a period of time

by Doug Sparling | about 3 hours ago | Read more

http://groups.google.com/group/acts_as_cached/browse_thread/thread/eff6287664362f66

fragment_cache.rb

module ActsAsCached
module FragmentCache
def self.setup!
class << CACHE
include Extensions
end

setup_fragment_cache_cache
setup_rails_for_memcache_fragments
setup_rails_for_action_cache_options
end

# add :ttl option to cache helper and set cache store memcache object
def self.setup_rails_for_memcache_fragments
if ::ActionView.const_defined?(:Template)
# Rails 2.1+
::ActionController::Base.cache_store = CACHE
else
# Rails < svn r8619
::ActionView::Helpers::CacheHelper.class_eval do
def cache(name = {}, options = nil, &block)
@controller.cache_erb_fragment(block, name, options)
end
end
::ActionController::Base.fragment_cache_store = CACHE
end
end

def self.setup_fragment_cache_cache
Object.const_set(:FragmentCacheCache, Class.new { acts_as_cached :store => CACHE })
end

# add :ttl option to caches_action on the per action level by passing in a hash instead of an array
#
# Examples:
# caches_action :index # will use the default ttl from your memcache.yml, or 25 minutes
# caches_action :index => { :ttl => 5.minutes } # cache index action with 5 minute ttl
# caches_action :page, :feed, :index => { :ttl => 2.hours } # cache index action with 2 hours ttl, all others use default
#
def self.setup_rails_for_action_cache_options
::ActionController::Caching::Actions::ActionCacheFilter.class_eval do
# convert all actions into a hash keyed by action named, with a value of a ttl hash (to match other cache APIs)
def initialize(*actions, &block)
if [].respond_to?(:extract_options!)
#edge
@options = actions.extract_options!
@actions = actions.inject(@options.except(:cache_path)) do |hsh, action|
action.is_a?(Hash) ? hsh.merge(action) : hsh.merge(action => { :ttl => nil })
end
@options.slice!(:cache_path)
else
#1.2.5
@actions = actions.inject({}) do |hsh, action|
action.is_a?(Hash) ? hsh.merge(action) : hsh.merge(action => { :ttl => nil })
end
end
end

# override to skip caching/rendering on evaluated if option
def before(controller)
return unless @actions.include?(controller.action_name.intern)

# maintaining edge and 1.2.x compatibility with this branch
# Jan Prill - added && false
#if @options && false
# DSS - removed false - false causing else to always run - this may be
# because Jan was using Rails 1.2...
if @options
action_cache_path = ActionController::Caching::Actions::ActionCachePath.new(controller, path_options_for(controller, @options))
else
action_cache_path = ActionController::Caching::Actions::ActionCachePath.new(controller)
end

# should probably be like ActiveRecord::Validations.evaluate_condition. color me lazy.
if conditional = @actions[controller.action_name.intern][:if]
conditional = conditional.respond_to?(:call) ? conditional.call(controller) : controller.send(conditional)
end
# Jan Prill - causing caching to stop after a period of time?
#@actions.delete(controller.action_name.intern) if conditional == false

# Jan Prill - added if clause
cache = controller.read_fragment(action_cache_path.path) if conditional != false
if cache && (conditional || conditional.nil?)
controller.rendered_action_cache = true
if method(:set_content_type!).arity == 2
set_content_type!(controller, action_cache_path.extension)
else
set_content_type!(action_cache_path)
end
controller.send(:render, :text => cache)
false
else
# 1.2.x compatibility
# Jan Prill added &&
controller.action_cache_path = action_cache_path if (controller.respond_to?(:action_cache_path) && conditional != false)
end
end

# override to pass along the ttl hash
def after(controller)
# Jan Prill - added || controller.action_cache_path.nil?
return if !@actions.include?(controller.action_name.intern) || controller.rendered_action_cache || controller.action_cache_path.nil?
# 1.2.x compatibility
path = controller.respond_to?(:action_cache_path) ? controller.action_cache_path.path : ActionController::Caching::Actions::ActionCachePath.path_for(controller)
controller.write_fragment(path, controller.response.body, action_ttl(controller))
end

private
def action_ttl(controller)
@actions[controller.action_name.intern]
end
end
end

module Extensions
def read(*args)
return if ActsAsCached.config[:skip_gets]
FragmentCacheCache.cache_store(:get, args.first)
end

def write(name, content, options = {})
ttl = (options.is_a?(Hash) ? options[:ttl] : nil) || ActsAsCached.config[:ttl] || 25.minutes
FragmentCacheCache.cache_store(:set, name, content, ttl)
end
end

module DisabledExtensions
def read(*args) nil end
def write(*args) "" end
end
end
end

Theists and Atheists, Sitting in a Tree

by Sean McMains | about 3 hours ago | Read more

Matt wrote up a really good article on the hostility in public discourse between theists and atheists, calling special attention to the “new atheists” such as Dawkins, Hitchens and Harris. His premise is that one can and should engage the other side respectfully and without the use of straw men and ad hominem attacks, recognizing [...]

JRuby Hackfest at RailsConf

by Nick Sieger | about 3 hours ago | Read more

Thanks to our friends at LinkedIn, Joyent and Sun, we’re having a hackfest at McMenamins/Kennedy School on Thursday evening, May 29, starting at 6:30pm, complete with food and beverages!

Do stop by and hang out with us! Leave a comment over at Charlie’s announcement if you’re interested in joining us.

McMenamins

Kennedy School
Local: (503) 249-3983
Elsewhere: (888) 249-3983


View Larger Map

Running Background Jobs in Ruby on Rails Revisited

by Jörg Battermann | about 3 hours ago | Read more

Running Background Jobs in Ruby on Rails Revisited: (via delynn)

Profile Rails Chops: RESTFul Authentication

by Karmen Blake | about 3 hours ago | Read more

Please view in full screen.

Taking screenshots of web pages with Ruby [del.icio.us]

by Brent Sordyl | about 3 hours ago | Read more

using webkit on OSX, and the OSX box wouldn’t be in the same datacenter as the servers running the web application. I ended up using Drb to send the screenshot requests to the shooter, which then used Net::HTTP to upload them back to the web application

345971987_eae8c8a066_m Photo

by Levent Ali | about 3 hours ago | Read more



he Secret of Building Effective Software Systems [del.icio.us]

by Brent Sordyl | about 3 hours ago | Read more

Follow 80/20 Rule - a high percentage of effects in any large system are caused by a low percentage of variables. In other words, 80% of requested functionality will be used rarely or not used at all, while substantially increasing system complexity.

Hawthorne Effect [del.icio.us]

by Brent Sordyl | about 4 hours ago | Read more

The tendency of humans to temporarily improve their performance when they are aware it is being studied.

Whatever Gets Measured Gets Optimized [del.icio.us]

by Brent Sordyl | about 4 hours ago | Read more

The act of measuring itself leads to increased productivity due to the HawthorneEffect.

SMS-billing as an additional payment form

by Veljo Otsason | about 4 hours ago | Read more

Today when credit card frauds have increased sicnifically and also moved to social networks like Orkut it is wise to consider extra payment forms. It all depends on the service you are running but the overall trend shows that people are thinking seriously before they are providing credit card data. Honestly it is difficult to [...]

test 2

by Lyric Lee Hartley | about 4 hours ago | Read more

testing….

Girard_id_bw [Wordpress] Pressmark: Bookmarks with Wordpress CMS

by Alexandre Girard | about 4 hours ago | Read more

Pressmark with a Wordpress installation with all you need to start a social bookmarking website (like del.icio.us, sabros.us, …). You can see a demo of Pressmark installation on bookmark.alexgirard.com Pressmark includes Wordpress Prologue theme, which has been used by Wordpress team to have a twitter-like dev-blog. Prologue include Gravatar support, so go to upload your avatar on gravatar.com [...]

Avatar_11_0 LockDown!

by Chiel Wester | about 4 hours ago | Read more

Lockdown is a authentication/authorization system for RubyOnRails (ver 2.x). While Merb functionality is in place, it is not complete. There will be a release solely focused on getting the Merb functionality up to par with Rails.

Lockdown is een gem die authenticatie- en authorisatiefunctionaliteit voor zijn rekening kan nemen. In gebruik nemen in een project gaat als volgt:

$ sudo gem install lockdown $ cd <your_project_directory> $ lockdown .

Lockdown plaatst vervolgens twee files in de /lib map die onderandere de volgende functionaliteit aan je applicatie toevoegen.

Sessie beheer:

# current_user_is_admin?: returns true if user is assigned # administrator rights.

Groepen (rollen) beheer:

# current_user_access_in_group?(grp): grp is a symbol referencing a # Lockdown::UserGroups method such as :registered_users # Will return true if the session[:access_rights] contain at # least one match to the access_right list associated to the group

Permissie beheer:

# set_permission(:sessions, all_methods(:sessions)) # set_permission(:my_account, only_methods(:users, :edit, :update, :show))

Al met al een leuke gem om in de gaten te houden!
Uiteraard beschikbaar via RubyForge.

Biosdkappe Flash Technology vs. Flash Developer

by Dietrich Kappe | about 4 hours ago | Read more

My colleague Brian Dillard, having a keen eye on interface enhancing, posted an interesting piece about Flash user interface conventions. Of the things said, the fact that Flash development environments do not default to standard (traditional) browser behaviors is the...

arrays in ruby and java - ruby-talk-google | Google Groups

by Rick Bradley | about 4 hours ago | Read more

arrays in ruby and java - ruby-talk-google | Google Groups: to me, this can be summed up with “i have been translating an algorithm from ruby to java. could somebody give me a hint, where my error in reasoning is.” (posted by cardioid)

Why I reject you on Facebook

by David J. Neff | about 4 hours ago | Read more

So...I have gotten called out for this in the past and will again...but I do have the habit of rejecting people on Facebook. It's not so much rejecting as just not adding you. In my mind different online social networks...

mod_rails aka passenger

by Bob Klosinski | about 4 hours ago | Read more

So I finally got around to installing mod_rails on my dev box (OS X Leopard) and thought I’ld share some things with you.

First of all I’m running a completely standard install, original apache. I know a few of the tutorials out there have you installing a new apache. You don’t need to do this any more. All you need to do is install the gem using

sudo gem install passenger
passenger-install-apache2-module

Once that’s done without error (You will need the developer bundle installed as it compiles a bit of c++) you need to change some apache settings.

Open up /private/etc/apache2/user/yourUserName.conf using your favorite text editor

now inside this file you should have

<Directory "/Users/userName/Sites/">
     Options Indexes MultiViews
     AllowOverride None
     Order allow,deny
     Allow from all
</Directory>

To this add

<Directory "/Users/userName/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /Library/Ruby/Gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby


NameVirtualHost *:80

<VirtualHost *:80>
  ServerName demo.test
  DocumentRoot "/Users/userName/Sites/demo/public"
  RailsEnv development
  <Directory "/Users/userName/Sites/demo/public">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
  </Directory>
</VirtualHost>

now this is assuming you have a rails app named “demo” in your Sites directory at ~/Sites.

Now open up /private/etc/hosts

add this line to the bottom and save

127.0.0.1 demo.test demo2.test demo3.test

this will allow you to have rails sites accessible from your browser demo.test demo2.test demo3.test

Basically when you want to add another site fire open your userName.conf file and add another

<VirtualHost *:80>
  ServerName demo2.test
  DocumentRoot "/Users/userName/Sites/demo/public"
  RailsEnv development
  <Directory "/Users/userName/Sites/demo/public">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
  </Directory>
</VirtualHost>

changing the directory and Servername.

Type sudo apachectl graceful Then open up your site open http://demo.test and all should be good. If you want to move out of the Sites directory or a directory that isn’t shared and ACL is enabled on your box, please refer here ACL Issue

Jerry135x135 icanhascheezburger

by Jerry Richardson | about 4 hours ago | Read more



icanhascheezburger

Spock via http://www.mentalfloss.com/blogs/archives/15131

by Ara T Howard | about 4 hours ago | Read more



via http://www.mentalfloss.com/blogs/archives/15131


Tell us what you think of the new BlogSphere feature. We are continually looking to improve and update the functionality based on your feedback.

Job Board

Job Boards
Find your next Ruby on Rails project or job.
Exclusive content, regularly updated - onsite and tele-working positions listed.

View the opportunities

Latest from the Weblog

Recent Recommendation

Gerard Hartnett:

World's best client

- Sbubble T.P, United States