2011-01-09 8 views
5
información

Antecedentes:error // Uso: Carriles nueva APP_PATH [opciones] // cuando se ejecuta 'servidor de rieles'

estoy usando GIT para obtener un repositorio de un proyecto con archivos de Ruby en el mismo. El proyecto vive en mi carpeta SITES en el directorio principal de mi Mac.

tengo Ruby: 1.8.7

acabo de actualizar los carriles a: 3.0.3

Todo lo que estoy tratando de lograr es ser capaz de hacer localhost.com:3000 en mi navegador de el proyecto GIT que ya descargué para poder trabajar en él localmente.

que ejecutó el comando 'raíles del servidor' y se devolvió el siguiente mensaje ::

Usage: 
    rails new APP_PATH [options] 

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

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

Rails options: 
    -h, [--help]  # Show this help message and quit 
    -v, [--version] # Show Rails version number 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. 

Respuesta

11

Usted está ejecutando rails server desde el directorio incorrecto. Vaya al directorio que contiene su aplicación y ejecute el comando desde allí. Por ejemplo, si ejecutó rails new thingy, debe estar en el directorio thingy cuando usa rails server.

+0

Recibo el mismo error y también estoy en el directorio correcto. ¿Hay algo más que pueda estar causando esto? – Ava

+0

¿Qué sucede si intentas ejecutar 'rails c'? ¿Cuál es el nombre de su aplicación y de qué directorio está ejecutando el comando del servidor? –

+0

Hola David, lo resolví. Tuve que ejecutar script/server e instalar iconv. – Ava

7

Lo tengo cuando actualizo desde los rieles 2 a los rieles 3 también. Luego ejecuté rails new . para reemplazar todos los archivos necesarios y funcionó después de eso.

Cuestiones relacionadas