gpt4 book ai didi

ruby-on-rails - 错误//用法 : rails new APP_PATH [options]//when running 'rails server'

转载 作者:行者123 更新时间:2023-12-04 16:25:07 24 4
gpt4 key购买 nike

背景资料:

我正在使用 GIT 来获取包含 Ruby 文件的项目的存储库。该项目位于 Mac 主目录下的 SITES 文件夹中。

我有 ruby :1.8.7

我刚刚将 Rails 升级到:3.0.3

我想要完成的只是能够在我已经下载的 GIT 项目的浏览器中呈现 localhost.com:3000,以便我可以在本地处理它。

我运行了命令“rails server”并返回以下消息:

Usage:
rails new APP_PATH [options]

Options:
[--skip-gemfile] # Don't create a Gemfile
-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
# Default: sqlite3
-O, [--skip-active-record] # Skip Active Record files
-J, [--skip-prototype] # Skip Prototype files
-T, [--skip-test-unit] # Skip Test::Unit files
[--dev] # Setup the application with Gemfile pointing to your Rails checkout
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
-G, [--skip-git] # Skip Git ignores and keeps
-b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL)
[--edge] # Setup the application with Gemfile pointing to Rails repository

Runtime options:
-f, [--force] # Overwrite files that already exist
-s, [--skip] # Skip files that already exist
-p, [--pretend] # Run but do not make any changes
-q, [--quiet] # Supress status output

Rails options:
-h, [--help] # Show this help message and quit
-v, [--version] # Show Rails version number and quit

Description:
The 'rails new' command creates a new Rails application with a default
directory structure and configuration at the path you specify.

Example:
rails new ~/Code/Ruby/weblog

This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
See the README in the newly created application to get going.

最佳答案

您正在运行 rails server从错误的目录。进入包含您的应用程序的目录并从那里运行命令。例如,如果您运行 rails new thingy ,您必须在 thingy使用时的目录 rails server .

关于ruby-on-rails - 错误//用法 : rails new APP_PATH [options]//when running 'rails server' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4637312/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com