Archive for category Ruby on Rails

Using the Amazon ECS Gem In Your Rails App

Amazon.com offers a tremendous amount of web services to developers looking to display their products. They benefit from this because developers make all sorts of cool apps for browsing Amazon. For example, nifty 3D Flash experience CoolIris (formerly known as ‘PicLens’) added Amazon functionality to their product. It’s a win-win for developers and Amazon because it drives traffic to the site while paying developers referral fees. Read the rest of this entry »

  • Share/Bookmark

, ,

1 Comment

Best of 2009, Ruby on Rails Edition

It was a good year for Rails. In 2009, we saw a number of exciting developments and a lot of great tools were released. Rails 2.3 was released in March 2009 and met with much fanfare. Rails has seen the introduction of templates, engines and a lot of other great features. Read the rest of this entry »

  • Share/Bookmark

,

2 Comments

Best Way to Get Gmail in Ruby on Rails

Gmail is not as easy as sendmail, unless you have this tutorial. This gem/tutorial is by far the best solution.

action_mailer_tls

There are a lot of solutions out there so it can be hard to know which to choose. I have tried many and found this to be dead simple. Takes 5 minutes to setup.

  • Share/Bookmark

No Comments

Ruby on Rails Time Saver – delete development.log

When uploading your local build to a server delete your development.log file because they tend to get long and thus heavy on kilobytes.

  • Share/Bookmark

No Comments

How to order by most recently updated in Rails

This is a simple one but sometimes hard to figure out for beginners in Rails. There are a number of ways to do it but this is one of the most simple. It includes actually doing a sql query inside your find method.

@posts = Post.find(:all, :o rder => 'updated_at DESC')

That’s it. I’m ordering by the updated_at column in the Posts table.

  • Share/Bookmark

No Comments

Tracking What’s Hot with Ruby Toolbox

Knowing what software is popular, current and updated regularly is a crucial aspect to developing successful websites. All developers benefit from being knowledgeable about what software is kept up to date but for Ruby on Rails developers this is doubly true. Enter Ruby Toolbox, a website tracking Rails plugin popularity on Github. Read the rest of this entry »

  • Share/Bookmark

, ,

No Comments

How to Truncate in Models


I recently had the difficult time of trying to truncate a string in a model. Rails enforces this policy because truncation is thought to be in the domain of the view of the data. This makes sense, because you are “seeing” a portion of the string. However, in this case, I was using the truncated string in the generation of an SEO-friendly URL. Read the rest of this entry »

  • Share/Bookmark

No Comments

How to stop the server in Rails

It is quite simple to do, just need a little Linux know how.

To stop the server you need to kill it. Thus you use the

kill

command. Not so fast, you first need the “pid” for the process. Much like in Windows where you open the task manager and you kill a process. Unfortunately it isn’t so easy in Linux/Mac. Read the rest of this entry »

  • Share/Bookmark

No Comments

Useful MySQL commands with Ruby on Rails on a Mac or in Linux

Because RoR is so high level often times you can feel disconnected with what’s under the hood. Often times you need to view what objects, or columns, you are working with. Or you delete columns. Here are a handful of common mysql commands that I use often in RoR. Read the rest of this entry »

  • Share/Bookmark

, , ,

No Comments

AJAX Google API to Minify Javascript using Ruby on Rails

How to optimizing JavaScript performance in Ruby on Rails. This will only focus on one aspect of JS performance optimization, namely, writing a build script to concatenate/minify the JS, and setting up Rails to easily toggle between the compressed and normal files. Also, if your site uses a JavaScript library, we’ll explore including it from Google’s AJAX Libraries API. Read the rest of this entry »

  • Share/Bookmark

5 Comments