ruby-on-rails - Rails 新命令不起作用

标签 ruby-on-rails ruby ruby-on-rails-3

我在我的控制台中运行 rails new search,我得到了所有这些:

Usage:
  rails new APP_PATH [options]

Options:
  -J, [--skip-prototype]      # Skip Prototype files
  -T, [--skip-test-unit]      # Skip Test::Unit files
  -G, [--skip-git]            # Skip Git ignores and keeps
  -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
  -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
      [--skip-gemfile]        # Don't create a Gemfile
  -d, [--database=DATABASE]   # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
                          # Default: sqlite3
  -r, [--ruby=PATH]           # Path to the Ruby binary of your choice
                          # Default: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  -O, [--skip-active-record]  # Skip Active Record files

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

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.

但它实际上并没有创建应用程序。这里有什么问题吗?

最佳答案

结果我需要再次安装 rails gem:gem install rails

关于ruby-on-rails - Rails 新命令不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6406335/

相关文章:

ruby-on-rails-3 - 在 erb 模板中禁用 HTML 转义

ruby-on-rails - ActiveAdmin:按关联计数排序

html - 尝试向数据库图像添加线性渐变,我可以在 css 上使用数据库图像吗?

ruby-on-rails - 如何国际化/本地化我的 Rails 插件?

sql - 按列排序数据库查询,然后随机排序

ruby - 无法找到或加载主类 net.lightbody.bmp.proxy.Main

ruby-on-rails - 无法运行 rails 命令。你的 Ruby 版本是 2.2.1,但是你的 Gemfile 指定了 2.1.4

ruby-on-rails - 返回 : i18n best practices for large translation dictionaries

ruby-on-rails-3 - 通过 link_to 合并嵌套参数

ruby-on-rails - 如何列出所有模型并包含一个通用模块