Rails新命令不起作用

时间:2011-06-20 02:26:52

标签: 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.

但它实际上并没有创建应用程序。这有什么不对?

3 个答案:

答案 0 :(得分:3)

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

答案 1 :(得分:1)

您是否尝试过rails new ./search

我刚在Windows中试过它,Ruby 1.9 w rails 3.0.9并且没有那个问题。

答案 2 :(得分:-2)

如果您正在使用RVM,请尝试创建新的gemset,然后安装rails。

rvm gemset create better
rvm gemset use better
gem install rails -v x.x.x
rails new betterApplication
相关问题