New terminal windows don't have Rails installed

rails
workspace

#1

Hello. I’m importing an existing Rails project. I’m new, so forgive me. I am able to successfully import the project, install the Rails gem and run bundle install in a terminal window.

The issue is that when I create a new terminal window, bash seems to be unable to find the Rails install I just did. Bundle is not found, and neither is Rails. The original Terminal window has rails -v as Rails 5.0.3, but the new window can’t find Rails at all.

Any fixes on this? Right now I’m confined to a single terminal window as a result. Even trying to run the application just opens a new terminal instance that pops up with a command rails not found error.


#2

Try adding rvm to your path and sourcing it through your .bashrc file (alternately, you can manually do this in each terminal you open). You should be able to do it with something like this:

# This loads RVM into a shell session.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Bash: rails: command not found - rails 5.1