Articles

Configuration for PostgreSQL with RubyOnRails on Windows

To configure the PostgreSQL with RoR applications, we need to do following setting,

Download PostgreSQL from http://www.enterprisedb.com/products/pgdownload.do

Install following gems,

gem install postgres-pr
gem install ruby-postgres

Then modify the /config/database.yml as following for the current environment,

git gotchas: the wrong forking repository

So I'm pretty new to git, really, and am learning all the places that I can stumble and fall head-over-arse. Today's escapade is entitled "how to recover from forking the wrong repository in github". It's quite a simple recovery, and you'd think it'd be obvious how to recover from it... you'd also think that github would have a "how to" in the main help page...

This solution is based on having

Specify a version with the 'rails' generator

The first thing most people do when starting a new Rails project is to use the rails generator to create the basic application structure.

By default you’ll be using the most recent version of Rails that’s installed on your system, for example:

3 questions for conversion rate love

I’m thrilled that my team was able to increase our monthly conversion rate in March by 40 percent.

There were a lot of factors, but here’s one part of how I think we did it.

There are always hundreds of ideas on how to improve your product. Here are 3 questions we use to brainstorm ideas and decide what to actually code.

Questions

What part of your model do you want to target?

20 Rails Development No-No's

Yesterday, I asked Twitter:

Rails programmers: what's an example of one thing you find in other people's Rails 
code that you (almost) always consider to be wrong?

Quite a few people responded, and several asked if I’d post the aggregated answers. Here’s an attempt. I don’t necessarily agree with everything here. I’d love to hear more of these in the comments.

1. Code in Views

@greg_fu

Vegas Scam

Today we were trying to sort out running CabooseConf during Rails Conf in Vegas. As you may recall, last year we provided free lunch and beverages for you all to drink while you hack. This year, we're doing the same thing under the auspices of O'Reilly.

Enumerable#filter

Update: Thanks to some feedback I rewrote Enumberable#filter so it doesn’t use ‘eval’. It’s a bit less flexible now and I also like the syntax less, but at least it doesn’t eat puppies for breakfast. As the disclaimer said, maybe it was a bad idea to begin with.

As much as I like Ruby, some constructs I just don’t find too sexy, e.g.:

[1,2,5,8,7,3,1,9,5].select { |x| x < 5 }

That’s why I came up with an alternative solution which I find reads nicer than the above code:

Rails Envy Podcast - Episode #073: 04/01/2009

Episode 73. is subtitled "Somewhere over the Rainbow", but you'll have to listen to find out why. This episode Jason and I are in the same room! As you might expect, much hilarity ensues.

Rails Envy Podcast – Episode #073: 04/01/2009

Episode 73. is subtitled “Somewhere over the Rainbow”, but you’ll have to listen to find out why. This episode Jason and I are in the same room! As you might expect, much hilarity ensues.

Google sitemaps made easy

Now that Talkies is live, we obviously need to get word out that we exist. Part of that is making sure that Google can find all our pages. Since not all movies or actors are accessible directly via a link, we needed to implement a sitemap (sitemaps.org) file that we can submit to Google.

Runaway ruby process uses 100% cpu | Rails Fire

Runaway ruby process uses 100% cpu

Send to friend

I’ve noticed over the last year or so that occasionally Ruby would start using 100% and I would have to kill -9 it.

I figured that I was the only one with this problem, and for some reason assumed that it was cucumber, since it usually happened after running features.

However, it looks like it happens when I close an iterm window with an open ruby console without quitting the console first.

So, I suspect now that it was happening after running features because I would finish a feature, run the specific feature, then run all the features, then commit, then be done working and quit iterm, without remembering to close a script/console session that I had open in another iterm tab.

Problem identified.

  • Programming Language: