質問

I am currently learning how to use Ruby on Rails.

My local machine (Mac OS X Mavericks) is running Ruby 2.1.0 and Rails 4.

In order to follow a tutorial, I need it to run Ruby 1.9.3 and Rails 3.2.

However, I do not want to downgrade my whole machine, but only the directory of the tutorial project.

All my project are located in Desktop > work and the project I would like to set up the specific environment is located in Desktop > work > project_name

I tried to install RVM and use .rvmrc project files, as described here, but could not achieve my goal.

What is the correct, step by step, workflow to set a project specific Ruby on Rails environment, in a given directory?

役に立ちましたか?

解決

Add this to your gem file:

ruby "1.9.3"
gem 'rails', '3.2'

THEN

bundle install

THEN

rails s

Now your environment will work as specify.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top