RubyMine error: Unable to run gem 'rails'. Cannot find 'rails'

孤街浪徒 提交于 2019-12-04 01:13:29

This problem is caused by ruby and rails executable files being located in different directories, normally they should be in the same directory and RubyMine is looking for the rails script in the same location where the configured ruby interpreter binary is.

In this particular case the locations were as follows:

  • /usr/local/bin/rails
  • /usr/bin/ruby

One of the solutions is to create a symlink of the rails script in the /usr/bin directory:

sudo ln -s /usr/local/bin/rails /usr/bin/rails

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