Reputation: 10684
rails s
command creating new project inside project directory instead of starting server.
I installed rails in my system but it is showing unexpected behavior, as creating project instead of starting server.
I see in my system by running gem list | grep rails command it shows rails 3.2.11 but when I see using rails -v then it shows rails 2.3.11
SO on running rails s it picks rails 2
Upvotes: 2
Views: 733
Reputation: 10684
Thanks @Gosavi and @boulder
Your solutions are also worthy, but my prbolem was resolved doing this
My app was poiniting to default gemset so I created new gemset for my app
To create new gemset
rvm --rvmrc --create 1.9.3@project_name
To list avaliable gemsets:
rvm gemset list
Upvotes: 0
Reputation: 3266
You will be running the first version of rails that is found in your PATH. You can always change your path environment variable so it finds rails 3.2.11 first, but if you are trying to manage several versions of rails/ruby on your system I recommend you use rvm or rbenv.
Upvotes: 0
Reputation: 8025
Please check Your version of rails. It is definitely < 3.
So use ruby script/server
instead of rails s.
Upvotes: 7