2011-01-09 12 views
5
informazioni

Background:Errore // Usage: Rotaie nuova APP_PATH [opzioni] // durante l'esecuzione di 'guide del server'

sto usando GIT per ottenere un archivio di un progetto con i file Ruby in esso. Il progetto risiede nella mia cartella SITES sotto home directory sul mio Mac.

Ho Rubino: 1.8.7

Ho appena aggiornato a Rails: 3.0.3

Tutto quello che sto cercando di realizzare è quello di essere in grado di rendere localhost.com:3000 nel mio browser il progetto GIT che ho già scaricato così posso lavorarci localmente.

Ho eseguito il comando 'guide del server' ed è stato restituito il seguente messaggio ::

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. 

risposta

11

Si sta eseguendo rails server dalla directory sbagliata. Vai nella directory che contiene la tua app ed esegui il comando da lì. Ad esempio, se è stato eseguito rails new thingy, è necessario essere nella directory thingy quando si utilizza rails server.

+0

Ricevo lo stesso errore e anch'io sono nella directory corretta. Qualcos'altro che potrebbe causare questo? – Ava

+0

Cosa succede se provi a eseguire 'rails c'? Qual è il nome dell'app e da quale directory stai eseguendo il comando server? –

+0

Hey David l'ho risolto. Ho dovuto eseguire script/server e installare iconv. – Ava

7

L'ho ottenuto durante l'aggiornamento dalle guide 2 alle guide 3 anche. Quindi ho eseguito rails new . per sostituire tutti i file necessari e ha funzionato dopo.

Problemi correlati