我是一个Ruby初学者,在开始学习的时候遇到了一些困难。
我创建了一个演示项目:
C:\Sites>rails new demo
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/javascripts/application.js
...
create vendor/assets/stylesheets/.keep
run bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using mail (2.5.4)
Installing actionmailer (4.0.2)
...
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed
下一步,选择文件夹:
C:\Sites>cd demo
我使用了rake...然后完成了!
C:\Sites\demo>rake about
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
C:/Sites/demo/config/application.rb:7:in `<top (required)>'
C:/Sites/demo/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
我尝试运行服务器……但是不起作用
C:\Sites\gui>rails server
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-2.0.2/lib/execjs/run
times.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://gi
thub.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUn
available)
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-2.0.2/l
ib/execjs.rb:5:in `<module:ExecJS>'
from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-2.0.2/l
ib/execjs.rb:4:in `<top (required)>'
请帮帮我。