Last Updated: February 25, 2016
·
8.151K
· rbmrclo

Create a new Rails app with specified version

Let's say you want to create a new Rails app and you have multiple versions in your gem list. You might want to specify which version are you gonna use upon executing the rails new command. Here's how you're gonna do it:

$ rails _VERSION_ new YOURAPPNAME

Live example:

$ gem list
*** LOCAL GEMS ***

rails (3.1.3, 3.0.11, 3.0.10, 3.0.9, 3.2.9, 3.2.11, 4.0.0)

$ rails _3.2.11_ new cookieapp

1 Response
Add your response

$ gem list rails

*** LOCAL GEMS ***

rails (4.2.0, 4.2.0.rc1, 4.2.0.beta2, 4.1.8, 4.1.7, 4.1.6)
$ rails _4.2.0_ new foo
Error: Command '_4.2.0_' not recognized
Did you mean: `$ rake _4.2.0_` ?

Usage: rails COMMAND [ARGS]
...
over 1 year ago ·