我正在尝试使用 ryan bates 的示例代码,该代码用于他在 Daemon 上的 railscast(第 129 集)。我安装了 rails 3,当我下载他的代码时,我无法运行服务器。为了尝试解决这个问题,我从标准 rails 3 应用程序中复制了我的 gemfile 和 gemfile.lock,并将其放入他的应用程序中,然后运行 bundle install。尽管如此,我的 Rails 服务器还是没有响应。相反,我得到以下(见下文)。
我的猜测是我遇到了问题,因为 railscasts 使用 rails 2(我相信),而我使用的是 rails 3。有什么方法可以让我仍然使用他的程序吗?
谢谢。
用法:
rails new APP_PATH [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
描述:该rails new
命令在您指定的路径创建一个具有默认目录结构和配置的新 Rails 应用程序。
例子:
rails new ~/Code/Ruby/weblog
这会在~/Code/Ruby/weblog
.
请参阅新创建的应用程序中的 README 以开始操作。