Bash: rails: command not found - rails 5.1



i know there are similar topics with this headline, i tried the solutions in those topics, but no luck.

I am trying to run a Rails 5.1 app from my existing repo. I updated rvm, gems, bundle etc. Installed everything times and times again. When i do:

rails s

in console, no problem. But when i do run project, i get rails: command not found. Any help is appreciated.

unlisted #2


This sounds similar to this thread: New terminal windows don't have Rails installed . Mind taking a look there?


Unfortunately didnt work.

Even though i have it in my path:

rbtx:~/workspace (develop) $ echo $PATH

i still get the same error while hitting Run Project

listed #5


I think i found a solution.

The thing is, i guess, the environment was okay from the beginning. Still, i tried with a fresh workspace. But i did one thing different. At the very beginning i set: rvm --default use ruby-2.4.1

then installed rails, bundler etc.

If i do, Run Project, it give different error this time, but if i run my project with: rails s -b $IP -p $PORT it works just fine.