首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法使用Rails 3.0.6或3.0.7生成新应用程序

无法使用Rails 3.0.6或3.0.7生成新应用程序
EN

Stack Overflow用户
提问于 2011-04-29 02:09:38
回答 2查看 2.1K关注 0票数 2

当我尝试生成一个安装了Rails 3.0.6或3.0.7的新应用程序时,我只得到了使用rails命令的说明。出于某种原因,Rails似乎认为我输入了错误的语法(当然,我没有)。不过,在3.0.5或更低版本中,一切运行正常。我运行的是Ruby 1.9.2和Ubuntu 10.04。

rails new app

将导致:

代码语言:javascript
运行
复制
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]           # Path to the Ruby binary of your choice
                              # Default: /usr/local/bin/ruby
  -d, [--database=DATABASE]   # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db)
                              # 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.
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2011-04-29 20:31:45

尝试更新rubygems;

代码语言:javascript
运行
复制
$ gem update --system
票数 3
EN

Stack Overflow用户

发布于 2011-05-08 01:51:39

运行rvm rubygems current似乎打破了这一点,至少对我来说是这样。我运行了这个命令,因为上面提到了here,它将消除所有的弃用警告,运行gem update --system可以修复它,并返回弃用警告。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5823116

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档