2011-10-19 11 views
0

私はなぜこれを取得するのですか?私のルビーのバージョンはruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0]で、レールのバージョンはRails 3.1.1です。私はbundle installgem update --systemをやった。レールサーバを稼働させることができません

➜ expertiza git:(master) ✗ rails server 
Usage: 
    rails new APP_PATH [options] 

Options: 
    -j, [--javascript=JAVASCRIPT] # Preconfigure for selected JavaScript library 
           # Default: jquery 
    -r, [--ruby=PATH]    # Path to the Ruby binary of your choice 
           # Default: /Users/vsingh3/.rvm/rubies/ruby-1.8.7-p352/bin/ruby 
    -J, [--skip-javascript]  # Skip JavaScript files 
     [--dev]     # Setup the application with Gemfile pointing to your Rails checkout 
     [--edge]     # Setup the application with Gemfile pointing to Rails repository 
    -G, [--skip-git]    # Skip Git ignores and keeps 
    -m, [--template=TEMPLATE]  # Path to an application template (can be a filesystem path or URL) 
    -b, [--builder=BUILDER]  # Path to a application builder (can be a filesystem path or URL) 
     [--old-style-hash]   # Force using old style hash (:foo => 'bar') on Ruby >= 1.9 
     [--skip-gemfile]   # Don't create a Gemfile 
    -d, [--database=DATABASE]  # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) 
           # Default: sqlite3 
    -O, [--skip-active-record]  # Skip Active Record files 
     [--skip-bundle]   # Don't run bundle install 
    -T, [--skip-test-unit]   # Skip Test::Unit files 
    -S, [--skip-sprockets]   # Skip Sprockets files 

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

ありがとうございます!

答えて

0

この同じ問題が発生しましたが、それは時代遅れのgemfileが原因だと思います。マシンにインストールされているものと同じバージョンのレールがgemfileにリストされていることを確認してください。

+0

わかりました。私のプロジェクトのGemfileでは、レールのバージョンは 'rails'、 '〜> 2.3.14'ですが、私のコンピュータにはRails 3.1.1がインストールされています。私のGemfile上のレールのバージョンを変更したり、コンピュータのレールをダウングレードするのが好ましいですか? – Ava

+1

これが新しいプロジェクトの場合は、Gemfileを変更してください。最新かつ最高のものを使用しない理由はありません。プロジェクトが2.3.14で開発されたのであれば、あなたはおそらくレール3の下でそれを実行しようとするといくつかの問題に遭遇するだろう。 – GabeIsman

+0

ありがとうGabelsman – Ava

0

現在ご利用いただけない場合はRVMをご利用ください。これは、異なるアプリケーション(Rubyのバージョンと宝石のリスト/バージョンを含む)のためのすべての環境を保持します。

関連する問題