Rails command not found AGAIN!


#1

I cannot, at all, get a new workspace to recognise any rails command. I have opened a new workspace under railstutorial and ruby on rails and both won’t recognise even rails new myapp1. Please can you help me?


#2

Hi,

Which workspace type are you using for Rails? We used to install Rails by default before, but I think we don’t anymore. You can install rails by using gem install rails on the terminal and then use the rails commands to create a new project.

Hope this helps.

Regards,
​Mutahhir


#3

I have tried both, but just now I tried your suggestion using the ruby on rails workspace, however when I tried to create a new project I got the following error:

$ rails new angel2
Can’t initialize a new Rails application within the directory of another, please change to a non-Rails directory first.
Type ‘rails’ for help.


#4

Rails commands will work in older workspaces that I’ve been using, but I have had to delete some folders. I can’t delete any more and would prefer a new workspace.


#5

When you create a new workspace with the Ruby template, a new Rails project is created by default and ready to use.


#6

Yes, thank you, I know that. But what if I want to create another folder, which I do! I cannot. Also, the other commands won’t work either. I tried to generate a scaffold but it won’t generate that either. None of the rails commands work, even though rails -v says version 4 is installed. I tried bundle install too, that worked fine and still the commands won’t work… There is something very wrong