문제

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