226
votes
6answers
50k views

How to remove rvm (ruby version manager) from my system?

How can I remove rvm (ruby version manager) from my system?
202
votes
8answers
41k views

What does “WARN Could not determine content-length of response body.” mean and how to I get rid of it?

Since upgrading to Rails 3.1 I'm seeing this warning message in my development log: WARN Could not determine content-length of response body. Set content-length of the response or set ...
167
votes
20answers
29k views

Using Rails 3.1, where do you put your “page specific” javascript code?

To my understanding, all of your javascript gets merged into 1 file. Rails does this by default when it adds //= require_tree . to the bottom of your application.js manifest file. This sounds like a ...
147
votes
8answers
20k views

Heroku in real life apps [closed]

What is your experience with using Ruby on Rails on Heroku in a production environment? Apart from the issue of the expensive HTTPS, do you see any drawback in the way it manages processes, memory ...
140
votes
6answers
31k views

A concise explanation of nil v. empty v. blank in Ruby on Rails

I find myself repeatedly looking for a clear definition of the differences of nil?, blank?, and empty? in Ruby on Rails. Here's the closest I've come: blank? objects are false, empty, or a ...
136
votes
12answers
50k views

Getting Started with RSpec - Looking for tutorials

I am looking to get started building a project and want to use RSpec from day one. My Ruby background is limited; however, I do have a good understanding of MVC and the structure within Ruby. In ...
132
votes
0answers
19k views

Where can I find good examples of Rails applications? [closed]

I would like to get source for a small, well written rails app to modify and "play with" as I learn how to program. I have found hundreds of open-source apps, but I don't know which are any good. ...
123
votes
8answers
21k views

When to use rspec let()?

I tend to use before blocks and set instance variables in them and then use them across my examples, but recently I came upon let(). According to rspec docs, it is used to ... to define a memoized ...
121
votes
7answers
52k views

Ruby on Rails: best method of handling currency / money

I'm new to Ruby on Rails and I'm working on a very basic shopping cart system. I have a table items that has a column price of type integer. I'm having trouble displaying the price value in my views ...
121
votes
4answers
47k views

Rails :include vs. :joins

This is more of a "why do things work this way" question rather than a "I don't know how to do this" question... So the gospel on pulling associated records that you know you're going to use is to ...
120
votes
13answers
55k views

Ubuntu noob rails install fails on zlib

I've just moved over to Ubuntu 8.10 as my dev box; it's my first serious foray into Linux as a daily-use OS, and I'm having a hard time getting Rails going. I have followed a number of tutorials ...
118
votes
7answers
38k views

How do you do relative time in Rails?

I'm writing a Rails application, but can't seem to find how to do relative time, i.e. if given a certain Time class, it can calculate "30 seconds ago" or "2 days ago" or if it's longer than a month ...
113
votes
7answers
33k views

What is the easiest way to duplicate an activerecord record?

I want to make a copy of an activerecord record, changing a single field in the process (in addition to the id). What is the simplest way to accomplish this? I realize I could create a new record, ...
113
votes
23answers
25k views

Continuous Integration for Ruby on Rails?

I've been searching around for a Continuous Integration solution for Ruby on Rails, but haven't been too pleased with the results. I came from a .NET shop that used CruiseControl.NET and was really ...
109
votes
5answers
44k views

How to break out from a ruby block?

class Bar def do_things Foo.some_method(x) do |x| y = x.do_somethign return y_is_bad if y.bad? # how do i tell it to stop and return do_things? ...

1 2 3 4 5 2111
15 30 50 per page