gpt4 book ai didi

ruby-on-rails - 如何运行 "rails s"

转载 作者:数据小太阳 更新时间:2023-10-29 06:48:24 24 4
gpt4 key购买 nike

我在 Ubuntu 中运行 rails s 时遇到问题。当我键入 rails s 时,它不会启动服务器,而是输出:

kyala@ubuntu:~/depot$ rails s

Usage:
rails new APP_PATH [options]

Options:

-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/kyala/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)enter code here
# Default: sqlite3

-b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL)

-m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL)
[--dev] # Setup the application with Gemfile pointing to your Rails

checkout
[--edge] # Setup the application with Gemfile pointing to Rails

repository

[--skip-gemfile] # Don't create a Gemfile

-O, [--skip-active-record] # Skip Active Record files

-T, [--skip-test-unit] # Skip Test::Unit files

-J, [--skip-prototype] # Skip Prototype files

-G, [--skip-git] # Skip Git ignores and keeps


Runtime options:

-f, [--force] # Overwrite files that already exist

-p, [--pretend] # Run but do not make any changes

-q, [--quiet] # Supress status output

-s, [--skip] # Skip files that already exist


Rails options:

-v, [--version] # Show Rails version number and quit

-h, [--help] # Show this help message 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.

最佳答案

尝试重新生成 binstubs:

rm bin/*
rake rails:update:bin

它应该可以解决问题。

对于更新的 (5.2+) Rails 版本使用

rake app:update:bin

关于ruby-on-rails - 如何运行 "rails s",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7546869/

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