开发者

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开发者_如何学Python: 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/


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.


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

rails server


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


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


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


From your app directory, run

ruby script/rails server

This should work even on Windows.


You can either use shortcut:

rails s


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

ruby script / rails server


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

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


You can try

bundle exec rails server webrick -e production
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜