Bash: rails: command not found - rails 5.1

rails

#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.


#2

#3

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


#4

Unfortunately didnt work.

Even though i have it in my path:

rbtx:~/workspace (develop) $ echo $PATH
/usr/local/rvm/gems/ruby-2.4.1@rails5.1/bin:/usr/local/rvm/gems/ruby-2.4.1@global/bin:/usr/local/rvm/rubies/ruby-2.4.1/bin:/usr/local/rvm/bin:/home/ubuntu/.nvm/versions/node/v6.11.2/bin:/mnt/shared/bin:/home/ubuntu/workspace/node_modules/.bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/mnt/shared/sbin:/opt/gitl:/opt/go/bin:/mnt/shared/c9/app.nw/bin

i still get the same error while hitting Run Project


#5

#6

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.