我尝试在ubuntu 16.04上this之后设置rails 5.0.0应用程序,当我第一次启动rails server
时,它崩溃了以下消息。
我是ruby的新手,不知道出了什么问题
/var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/server.rb:8:in <module:Rails>': uninitialized constant Rack (NameError)
Did you mean? Rake
from /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/server.rb:7:in <top (required)>'
from /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:138:in require'
from /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:138:in require_command!'
from /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:83:in server'
from /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in run_command!'
from /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in <top (required)>'
from bin/rails:4:in require'
from bin/rails:4:in <main>'
这是
的前10行 /var/lib/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/server.rb
require 'fileutils'
require 'optparse'
require 'action_dispatch'
require 'rails'
require 'rails/dev_caching'
module Rails
class Server < ::Rack::Server
class Options
DEFAULT_PID_PATH = File.expand_path("tmp/pids/server.pid").freeze
答案 0 :(得分:1)
您能否在项目路径上尝试这些命令;
bundle update
gem update