2011-10-19 7 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'인 반면 레일즈 3.1.1은 내 컴퓨터에 설치되어 있습니다. 내 Gemfile에서 레일 버전을 변경하거나 컴퓨터에서 레일을 다운 그레이드하는 것이 좋습니다. – Ava

+1

새로운 프로젝트 인 경우 Gemfile을 변경하십시오. 최신의 가장 큰 것을 사용하지 않을 이유가 없습니다. 프로젝트가 2.3.14에서 개발 되었다면 아마 레일 3에서 실행하려고하는 데 문제가있을 것입니다. 레일스는 그 이후로 그 길이 멀었습니다. – GabeIsman

+0

감사합니다. Gabelsman – Ava

0

현재 사용하지 않는 경우 RVM을 사용해야합니다. 그것은 다른 응용 프로그램 (루비 버전 및 보석 목록/버전 포함)에 대한 모든 환경을 유지합니다.

관련 문제