I wanna to run rails new
like this: rails _5.0.x_ new
. Is it possible accomplish something like this?
Asked
Active
Viewed 50 times
1

sidney
- 1,241
- 15
- 32
3 Answers
0
To use an older version than the latest you have installed, just wrap the version number in underscores:
rails _1.2.1_ myproject

Community
- 1
- 1

KcUS_unico
- 513
- 3
- 9
0
Do you use RVM or any Ruby version manager?
EDIT:
My bad, actually, you were talking about rails. So, to answer your question, you can do rails _5.0.x_ new
.
You can find more details on this post and this one.

Jeremie
- 2,241
- 2
- 17
- 25
-
Yes, I use RVM and rbenv. – sidney Mar 05 '17 at 14:43
-
Error: can't find gem railties (= 5.0.x) rails -v => Rails 5.0.1 – sidney Mar 07 '17 at 18:34
0
You can use that command without patch number like this:
rails _4.2_ new project_name
I checked it on my machine. I had rails 4.2.0 and 4.2.5. With that command it created the project with rails 4.2.0

VAD
- 2,351
- 4
- 20
- 32
-
Thanks, actually I wanted to get the most upgraded version in 5.0, but it does not make sense because I have to install the gem before. – sidney Mar 05 '17 at 15:44
-