Add Rspec to your new Rails 3.1 App

Create the app

rails new my_app

Edit the Gemfile and add the following

group :development do
  gem 'rspec-rails'
end

group :test do
  gem 'rspec-rails'
  gem 'webrat'
end

Run

bundle install
rails generate rspec:install

Done

Install Ruby 1.9.2, RVM, Rails 3.1

Setting up Ruby on Rails on (K)Ubuntu is pretty simple. I found 2 sites with similar instructions that I used.

http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/

http://railsapps.github.com/installing-rails-3-1.html

Step 1: Prepare the system and Install RVM

New Day, New App, New Life

It's time to get the ball rolling. This site is where I'm keeping stuff (such as bug fixes, and things you only encounter once a year) I've looked up and applied, so I can find it easily again. Hopefully it will get indexed and make the solutions easier to find for others too.

Annotate Models for Rails3.1rc5

Include in Gemfile

gem 'annotate', 
  :git => 'git://github.com/jeremyolliver/annotate_models.git',
  :branch => 'rake_compatibility'

Then

bundle install

Run

bundle exec annotate --position before

ExecJS::RuntimeError Rails 3.1 Ubuntu

Ruby on Rails 3.1rc5, Ruby 1.9.2, Kubuntu 11.04

Error compiling asset application.js:
ExecJS::RuntimeError: (in ../app/assets/javascripts/sections.js.coffee)
Served asset /application.js - 500 Internal Server Error

This error is due to Ubuntu not having a javascript runtime installed

The solution is

sudo aptitude install nodejs

Or add 

Syndicate content