ryryan
ryryan

Reputation: 3928

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/

Upvotes: 6

Views: 21093

Answers (10)

Amirzie Zainal
Amirzie Zainal

Reputation: 1

You can try

bundle exec rails server webrick -e production

Upvotes: 0

Guruprasad
Guruprasad

Reputation: 1

If everything is properly installed and rails is 4.0 then the command is

user@sony-vaio:~/sample_rails/myApp$ rails server

Upvotes: 0

Alan Rezende
Alan Rezende

Reputation: 1

Kelvin, congratulations, this command works exactly as you described in windows 8. hugs...

ruby script / rails server

Upvotes: 0

Tufail
Tufail

Reputation: 41

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

Upvotes: 4

Someth Victory
Someth Victory

Reputation: 4549

You can either use shortcut:

rails s

Upvotes: 3

Kelvin
Kelvin

Reputation: 20857

From your app directory, run

ruby script/rails server

This should work even on Windows.

Upvotes: 3

denisjacquemin
denisjacquemin

Reputation: 7414

Your tutorial is very old 2006...

You should definitly check railsinstaller.org/ to use rails on windows

I am a noob at RoR, first time using it

here is a good documentation guides.rubyonrails.org/

and you should play with railsforzombies.org/

welcome,

cheers

Upvotes: 3

John Beynon
John Beynon

Reputation: 37507

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.

Upvotes: 23

Matteo Alessani
Matteo Alessani

Reputation: 10412

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

rails server

Upvotes: 4

Wukerplank
Wukerplank

Reputation: 4176

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

Upvotes: 3

Related Questions