其实macbook命令长寿,所以我把它放在老山毛榉,Linux Mint上
自行安装 Ruby 和 Rails
该项目创建良好,但在尝试运行后,我们得到以下信息(大量行)
rails aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'uglifier'.
Gem Load Error is: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
Backtrace for gem load error is:
/home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/home/andrey/railsnew/omg/config/application.rb:7:in `<top (required)>'
/home/andrey/railsnew/omg/Rakefile:4:in `require_relative'
/home/andrey/railsnew/omg/Rakefile:4:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:12:in `block in run_rake_task'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/andrey/railsnew/omg/bin/rails:9:in `require'
/home/andrey/railsnew/omg/bin/rails:9:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
/home/andrey/railsnew/omg/bin/spring:13:in `require'
/home/andrey/railsnew/omg/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Bundler Error Backtrace:
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:89:in `rescue in block (2 levels) in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:85:in `block (2 levels) in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/home/andrey/railsnew/omg/config/application.rb:7:in `<top (required)>'
/home/andrey/railsnew/omg/Rakefile:4:in `require_relative'
/home/andrey/railsnew/omg/Rakefile:4:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:12:in `block in run_rake_task'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/andrey/railsnew/omg/bin/rails:9:in `require'
/home/andrey/railsnew/omg/bin/rails:9:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
/home/andrey/railsnew/omg/bin/spring:13:in `require'
/home/andrey/railsnew/omg/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
ExecJS::RuntimeUnavailable: Could not find a JavaScript runtime. See https://github.com/rails/execjs for a list of available runtimes.
/home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:58:in `autodetect'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/uglifier-3.0.1/lib/uglifier.rb:5:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
/home/andrey/railsnew/omg/config/application.rb:7:in `<top (required)>'
/home/andrey/railsnew/omg/Rakefile:4:in `require_relative'
/home/andrey/railsnew/omg/Rakefile:4:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:686:in `raw_load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:96:in `block in load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:95:in `load_rakefile'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:12:in `block in run_rake_task'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/rake_proxy.rb:10:in `run_rake_task'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
/home/andrey/railsnew/omg/bin/rails:9:in `require'
/home/andrey/railsnew/omg/bin/rails:9:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
/home/andrey/.rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
/home/andrey/railsnew/omg/bin/spring:13:in `require'
/home/andrey/railsnew/omg/bin/spring:13:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
gem 文件中的实际代码
GEM
remote: https://rubygems.org/
specs:
actioncable (5.0.0.1)
actionpack (= 5.0.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.0.1)
actionview (= 5.0.0.1)
activesupport (= 5.0.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.0.1)
activesupport (= 5.0.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (5.0.0.1)
activesupport (= 5.0.0.1)
globalid (>= 0.3.6)
activemodel (5.0.0.1)
activesupport (= 5.0.0.1)
activerecord (5.0.0.1)
activemodel (= 5.0.0.1)
activesupport (= 5.0.0.1)
arel (~> 7.0)
activesupport (5.0.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (7.1.1)
builder (3.2.2)
byebug (9.0.5)
coffee-rails (4.2.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
erubis (2.7.0)
execjs (2.7.0)
ffi (1.9.14)
globalid (0.3.7)
activesupport (>= 4.1.0)
i18n (0.7.0)
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.1.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.0)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pkg-config (1.1.7)
puma (3.6.0)
rack (2.0.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.0.1)
actioncable (= 5.0.0.1)
actionmailer (= 5.0.0.1)
actionpack (= 5.0.0.1)
actionview (= 5.0.0.1)
activejob (= 5.0.0.1)
activemodel (= 5.0.0.1)
activerecord (= 5.0.0.1)
activesupport (= 5.0.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.0.1)
actionpack (= 5.0.0.1)
activesupport (= 5.0.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.2.2)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
sass (3.4.22)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
spring (1.7.2)
spring-watcher-listen (2.0.0)
listen (>= 2.7, < 4.0)
spring (~> 1.2)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.1.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.1)
execjs (>= 0.3.0, < 3)
web-console (3.3.1)
actionview (>= 5.0)
activemodel (>= 5.0)
debug_inspector
railties (>= 5.0)
websocket-driver (0.6.4)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
PLATFORMS
ruby
DEPENDENCIES
byebug
coffee-rails (~> 4.2)
jbuilder (~> 2.5)
jquery-rails
listen (~> 3.0.5)
puma (~> 3.0)
rails (~> 5.0.0, >= 5.0.0.1)
sass-rails (~> 5.0)
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
web-console
BUNDLED WITH
1.12.5
不要害怕!阅读,理解。注意这一行。它几乎在最上面,没有必要在它之前阅读那么多。
我们点击链接,我们看到列表:
你需要他们中的任何一个。目前流行的主要有: