开始 Rails 教程:https://guides.rubyonrails.org/getting_started.html。 遵循了每个步骤,但是当我开始运行命令
bin/rails server
时,下面的文本文件将打开,而不是运行服务器。我如何获得此命令来运行服务器?
#!/usr/bin/env ruby.exe
APP_PATH = File.expand_path("../config/application", __dir__)
require_relative "../config/boot"
require "rails/commands"
尝试使用
rails server
或 rails s
,这是运行 Rails 服务器的更惯用的方法。
但是每当我在命令行上运行 bin/dev 时,它都会从应用程序中打开 dev 文件,而不是运行命令和 foreman。如何摆脱这个问题?