Rails 4 railties's executable “rails” conflicts with rails

一曲冷凌霜 提交于 2019-12-07 16:50:07

问题


I have rails 4 and that's my default version (and I still wants it to be). but I d'like to add rails 3.2 on my computer. On the following command: gem install rails -v 3.2.16

I have this Warning:

railties's executable "rails" conflicts with rails
Overwrite the executable? [yN] 

I d'like to know if this will cause some bugs to my 4.0.1?


回答1:


You should use rvm and install rails 3 into a new gemset. Exactly do steps as follows:

  1. Install rvm.

  2. Install or use a ruby:

    rvm install ruby-2.0.0
    
  3. Create a gemset, and then use it:

    rvm gemset create rails_1_app
    rvm gemset use rails_1_app
    
  4. Install bunlder:

    gem install bundler
    
  5. Create Gemfile, and specify rails 4 in it:

    gem 'rails', '~> 4.0'
    
  6. Install requires gems:

    bundle install
    
  7. Repeat steps 3-6 for a new gemset, but specifying rails 3 in it:

    gem 'rails', '~> 3.0'
    


来源:https://stackoverflow.com/questions/20899772/rails-4-railtiess-executable-rails-conflicts-with-rails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!