RedCloth vendored and Rails can’t find it

In a Rails 2.3.4 app RedCloth is vendored, I was going nuts since the app complained about “Missing these required gems” and RedCloth was the only on the list, even if its already vendored.

I googled and googled, tried a lot of solutions but the only one that did actually work for me was this command:

rake gems:build:force

Hopefully this will help anyone out there.

How to use a specific Ruby version and set of gems for a Rails 3 app using RVM

This is very useful when you have multiple apps and you might get confused with which gems are installed on which project.

First, if you don’t have RVM installed, look at this post:

Now lets create the .rvmrc file, through the Terminal, that must go in the root of your app (main folder), but first you have to decide which Ruby version you want to use with your app, to list them run:

rvm list known

In my case, I will install the latest 1.9.2 version (be sure to change “yourprojectname” with yours – this is called gemset, where you gems will reside):

rvm --rvmrc --create 1.9.2@yourprojectname

After that “cd ..” out of your app and then “cd yourprojectname” in, you will be asked if you want to use the .rvmrc file that has been found inside the root of your app, type “y” and hit Enter.
Then you’ll have to install the Ruby version you selected, in my case I’d run:

rvm install 1.9.2

Since its a fresh gemset (no gems installed), you will have to run:

gem install bundler

And then run:

bundle install

How to install RVM

Mac OS X only starts -

Before installing RVM you need a compiler in order to install any Ruby version, for this, first check this post:

- Mac OS X only ends

After getting that done, you can go ahead and run these lines within the Terminal:

curl -L get.rvm.io | bash -s stable

And then this, to load RVM:

source ~/.rvm/scripts/rvm

If you want/need a more explained or other installation options, check https://rvm.io/rvm/install/

How to install Xcode 4.3.2 with Command Line Tools – Mac OS X

In order to install Xcode 4.3.2 with Command Line Tools you have to register your Apple ID as a Developer (in that link you can create an Apple ID if you don’t have one).

After getting that done, open the App Store and search for “xcode” then click install. You will be asked to sign in (if you are not already).

Once the installation is done, open Xcode (you can hit Command + Space to open Spotlight and type “xcode”), click Xcode > Preferences > Downloads and you will see the option to install the “Command Line Tools” at the very end, click it and you are done!