Ruby on Rails - does not create a script / server

I have been trying for two days to install Ruby on Rails on windows xp (I am new to RoR, first used it).

I read several manuals on the Internet how to install them. I installed Ruby, installed Mysql, and installed Rails on the gem install rails .

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

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

There is no "server" file in the script directory, only the rails file.

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

+6
source share
10 answers

If you did gem install rails, then it will have rails captured by v3.0.6, which have changed (to v3) to use rails server to start the server.

+22
source

If you are using Rails 3, you need to use:

 rails server 
+5
source

you can use in new ruby ​​... installtion

on the command line

c: \ ruby ​​\ bin> rails new filename

where filename is your new project name to create a new ruby ​​project. and do not use the ruby ​​reseverd reserved word like test

+4
source

I assume you are using Rails 3, so the correct ruby rails server command is.

+3
source

Your textbook is very old 2006 ...

You should definitely check railsinstaller.org/ for using rails in windows

I am RoR's noob, using it for the first time

here is the good documentation guides.rubyonrails.org/

and you have to play with railsforzombies.org/

Welcome,

amuses

+3
source

In the application directory, run

 ruby script/rails server 

This should work even on Windows.

+3
source

You can use a shortcut:

rails s

+3
source

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

 ruby script / rails server 
0
source

If everything is installed correctly and rails is 4.0 , then the command -

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

0
source

You may try

 bundle exec rails server webrick -e production 
0
source

Source: https://habr.com/ru/post/885897/


All Articles