Posts tagged Rails

Apr 26 2012

How to Install Ruby 1.8.7 via RVM on OS X Lion

Ruby Rails Lion | comments

Not sure if I'm the only one experiencing this but installing Ruby 1.8.7 using these commands don't work:

              rvm install 1.8.7
              
              or 
              
              CC=/usr/bin/gcc-4.2 rvm install 1.8.7
              

This worked for me:

Continue reading »
Oct 03 2011

Install Rails 3.1 on Windows, Mac and Linux

Rails31 | comments

This is yet another guide.So much have been written. Probably replicates other guides which I have not checked. But this is updated for Rails 3.1.1.

This guide will constantly be updated as needed.

Continue reading »
Jul 18 2011

Rails 3.1 Stable Notes

Rails | comments

Been working on Rails 3.1 apps. There is a good reason to use it even if there are existing issues.

All of my current projects (for clients and personal projects) have already been upgraded to Rails 3.1 RC4. This includes www.33voices.com.

Continue reading »
Jun 23 2011

Timeline Fu

Ruby Rails | comments

Realized nearly all of my projects involved logging user actions and having news feeds similar to Facebook. Two years ago, it didn't seem sensible to use a gem for just that because all you need is to create a module and helpers to log actions (on your model of course). A common mistake is adding code for logging actions, sending emails on controllers. Sometimes when you are young, you do stupid things.

Continue reading »
May 25 2011

Don't Forget Ruby's Send Method

Ruby Rails | comments

First of all thank you for reading. Thanks to those who thanked me for blogging. Been very busy and hardly found time to blog.

In the past few years, Ruby's send method saved me from having to write several lines of code. Don't you ever forget about it.

Continue reading »
May 10 2011

What You Should Know Before You Upgrade Your Rails 3 App To Rails 3.1 Beta

Rails3 Ruby | comments

This is based on both research and experience.

I upgraded a Rails 3 app to Rails 3.1.

There were many issues. But they aren't much compared to the benefits you'd get from using the latest version. Rails 3.1 takes away a lot of pain. Instead of using asset packager, having sprockets makes it so much easier to deploy an optimized application. Not all frameworks have this. In fact it hasn't been a practice of certain developers to make sure that a single file is loaded for javascript in production and a single is loaded for stylesheet in production. Reversible migrations is another cool thing. Also read that there is no need to add ":multipart=>true" on a form if you use the file field.

Continue reading »
May 05 2011

How To Install CoffeeScript On Mac OS X

CoffeeScript Rails Ruby Mac | comments

If you are a Rails developer, you should know that Rails 3.1 beta has been released today. I am trying out the beta version so I don't have to stress about migrating or upgrading later.

Install CofeeScript Using Homebrew

Continue reading »
Feb 04 2011

SCSS Mixins

SCSS, Rails | comments

For Ruby projects (Rails or Sinatra), I've used HAML without SASS until they introduced SCSS. I did use SASS for a re-write project in 2009. But I felt that the syntax is strange and somehow I don't mind the braces. It's also easier to just copy CSS code onto a SCSS file. Of course some would say that I could just find and replace those braces, but ultimately it's a matter of choice. I love those braces so I use SCSS. :)

Continue reading »
Jan 30 2011

Why You Have To Use Named Scopes for Rails 3

Rails3, ActiveRecord | comments

It's strange for me to write something that disputes my post earlier. I just spent an hour trying to fix "stack level too deep" error. Only to find out that it has to do with named scopes.

Continue reading »
Jan 05 2011

Thinking Sphinx for Rails 3

Search Rails3 | comments

Sphinx is the de facto choice for Rails developers looking for a search solution or a full text search server. I've been using it for MySQL projects but there are other and potentially better options like Solr.

Continue reading »
Nov 25 2010

Rails 3 Template for Web Designers Who Use Windows

Rails3 Windows HAML | comments

So I've been reading the discussion on PHRUG (Philippine Ruby Users Group) about Ruby on Rails and Windows. I have to agree with majority that eventually you have to learn Linux if you want to use Rails everyday. If you don't, you just can't go beyond frontend work.

Continue reading »
Oct 24 2010

Package Assets For Rails 3 and Upload to Amazon s3

Rails3 Ruby Amazon s3 | comments

I like to share this quickly for those who are concerned about application performance. Rails has always provided a way to cache assets. It's been very simple but when we think about the "cloud" and scaling, we realized it's a pain to actually make it all work with amazon s3.

Continue reading »
Sep 25 2010

How to Use jQuery For Rails 3

Rails3 jQuery | comments

jQuery is the de facto Javascript framework used by happy programmers. I am very glad to use it in almost all of the applications I am working on.

There are many posts on how to use it for Rails 3. But here's another one which may help Rails 3 newbies (aren't we all newbies when it comes to Rails 3?).

Continue reading »
Aug 22 2010

Install RVM, Passenger, Nginx and Rails 3 on Ubuntu Lucid Lynx

RVM Rails3 Ubuntu Ruby192 | comments

This has been a problem encountered by several developers including myself:

Getting RVM, Passenger and Rails3 to work

Here's a quick and short post. Supposing you already have updated Ubuntu and have Ruby installed.

Continue reading »
Aug 16 2010

Rails 3 Upgrade Resources

Rails3 Ruby | comments

Many of us have several existing 2.x applications and would want to upgrade without pulling our hair because we can't figure out something or we are wary of consuming too much time. I'm about to post several links where you could find useful advice on upgrading Rails 3. Feel free to share other links if you know some.

Continue reading »
Jul 25 2010

Why You Might Not Use Named Scopes In Rails3

Rails3 Arel ActiveRecord | comments

It's interesting how Rails 3 querying is a lot easier than it was before.

Simple Task: Get all posts that are promoted to front page.

Some apps probably do not use the field "promoted" primarily because there's a published field then all published posts will be promoted on front page. But in Drupal, nodes have promoted field and I think most apps should too. Sometimes you wouldn't want to show everything on the front page or want some post on top of the list of posts.

Continue reading »
Jul 02 2010

When And Why Should You Use Drupal or Rails For Projects

Drupal Rails Opinion | comments

There are several reasons why we used Drupal. Even if I am a Rubyist, I also use Drupal (PHP5) for certain reasons.

When and Why Should You Use Drupal?

Continue reading »
Jun 21 2010

Big Companies Using Ruby on Rails

Rails Companies Business | comments

Just thought I might share this. Who said only "nobody's" are using Rails?

amazon.com - Amazon goes Ruby on Rails

Continue reading »
May 07 2010

Command aliases for Subversion, Git and Rails

Subversion Git Rails Ruby Mac CommandLine | comments

I got a Peepcode unlimited last year which came with a nice video about the command line. Check it out.

Not too many people will find this interesting. For me, it's something I just want to do for myself (and for those I'd work for if I'm still employed).

Continue reading »
Apr 05 2010

How to Install and Use Rails 3 Generators

Rails3 Ruby GettingThingsRight | comments

This is why Rails3's philosophy is agnosticism:

You can override default template engine (erb) through config/application.rb. So if you use HAML, running scaffold generator will create HAML files for the views. If you use Rspec for testing as most Ruby developers do, you may also specify rspec as the default test framework.

Continue reading »