Posts tagged Rails
How to Install Ruby 1.8.7 via RVM on OS X Lion
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 »Install Rails 3.1 on Windows, Mac and Linux
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 »Rails 3.1 Stable Notes
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 »Timeline Fu
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 »Don't Forget Ruby's Send Method
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 »What You Should Know Before You Upgrade Your Rails 3 App To Rails 3.1 Beta
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 »How To Install CoffeeScript On Mac OS X
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 »SCSS Mixins
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 »Why You Have To Use Named Scopes for Rails 3
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 »Thinking Sphinx for Rails 3
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 »Rails 3 Template for Web Designers Who Use Windows
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 »Package Assets For Rails 3 and Upload to Amazon s3
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 »How to Use jQuery For Rails 3
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 »Install RVM, Passenger, Nginx and Rails 3 on Ubuntu Lucid Lynx
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 »Rails 3 Upgrade Resources
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 »Why You Might Not Use Named Scopes In Rails3
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 »When And Why Should You Use Drupal or Rails For Projects
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 »Big Companies Using Ruby on Rails
Just thought I might share this. Who said only "nobody's" are using Rails?
amazon.com - Amazon goes Ruby on Rails
Continue reading »Command aliases for Subversion, Git and Rails
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 »How to Install and Use Rails 3 Generators
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 »