Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails - Doesn't create script/server

I have been trying for two days to install Ruby on Rails on windows xp (I am a noob at RoR, first time using it).

I am reading some tutorials online how to install it. I have installed Ruby, installed Mysql and installed Rails by gem install rails.

Now when I create a new app by rails new myapp then cd myapp and then ruby script/server, it says:

ruby: No such file or directory -- script/server (LoadError)

In the script directory there is no 'server' file, there is only a rails file.

I have followed the tutorial correctly and have double checked I and creating the app correctly. This is the tutorial link: http://allaboutruby.wordpress.com/2006/01/09/installing-rails-on-windows-step-by-step-tutorial/

like image 832
ryryan Avatar asked Apr 14 '11 10:04

ryryan


4 Answers

If you've done gem install rails then it will have grabbed v3.0.6 rails which changed (at v3) to use rails server to start the server.

like image 99
John Beynon Avatar answered Oct 21 '22 08:10

John Beynon


If you're using Rails 3 you need to use:

rails server
like image 29
Matteo Alessani Avatar answered Oct 21 '22 08:10

Matteo Alessani


you can use in new ruby ...installtion

in command prompt

c:\ruby\bin>rails new filename

where filename is your new project name to create a new ruby project. and don't use the reserved ruby reseverd word like test

like image 4
Tufail Avatar answered Oct 21 '22 07:10

Tufail


I guess you are using Rails 3, so the proper command is ruby rails server.

like image 3
Wukerplank Avatar answered Oct 21 '22 08:10

Wukerplank