Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple versions of Rails with rbenv [duplicate]

Is there a way using rbenv to have multiple rails versions sitting side by side with the same version of ruby? For example, I'd like to be able to have one source folder using rails4, and another folder using rails3.

I can very easily install the two different versions of rails, but I just don't know how to call different versions of rails per folder.

like image 813
bswinnerton Avatar asked Nov 03 '22 20:11

bswinnerton


1 Answers

Ah, I figured it out. By manually defining the Gemfile in each of the different source directories with different versions of rails, you can then call bundle exec rails and it will load it in the context of each gemfile.

like image 168
bswinnerton Avatar answered Nov 08 '22 09:11

bswinnerton