bz06wa
Last Updated: February 25, 2016
·
3.097K
· rbmrclo
2fe1468f365b2c131b38e87aa4acb601

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
Say Thanks
Respond

1 Response
Add your response

18212
Cb96935c08d5b850f3fbf1c1f25196fe
$ 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 ·