Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a new rails app with a particular version of rails?

I'm new to ruby and to rails.

How do I create a new application directory using rails 3.2.13? Below is the info regarding my rails installation.

$ rails --version
Rails 4.0.4
$ gem list rails

*** LOCAL GEMS ***

rails (4.0.4, 3.2.13)

Whenever I create a new rails app, the latest rails, 4.0.4, is being used.

like image 303
Abhijith Madhav Avatar asked Apr 01 '14 10:04

Abhijith Madhav


People also ask

How do I use different versions of rails?

There's nothing you need to do to manage two different Rails versions. The only thing you'll want to do is gem install rails to get the latest version and create your new project with rails new myapp . That will make sure the new project starts with Rails 5.1 (or whatever is the latest at the time).

How do I install a specific version of rails?

To install Rails, use the gem install command along with the -v flag to specify the version. For this tutorial, you'll use version 6.1. 4.1 : gem install rails -v 6.1.

How do I install a specific version of a gem?

Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.


1 Answers

Do this:

rails _3.2.13_ new YOUR_APP_NAME
like image 118
apneadiving Avatar answered Sep 22 '22 01:09

apneadiving