Начинающий изучает RoR: пытается запустить сервер Rails, но получает странный вывод в терминале - PullRequest
0 голосов
/ 17 апреля 2011

Я пытаюсь запустить Rails Server в терминале Ubuntu 10.10.Но я получаю вывод, совершенно отличающийся от показанного в моем уроке:

Usage:
rails new APP_PATH [options]

Options:
-r, [--ruby=PATH]           # Path to the Ruby binary of your choice
                          # Default: /home/rinki/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
-d, [--database=DATABASE]   # Preconfigure for selected database (options: 
mysql/oracle  /postgresql/sqlite3/frontbase/ibm_db)
                          # 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

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.

Любая помощь / предложения будут высоко оценены.

Спасибо!

Ответы [ 4 ]

0 голосов
/ 17 апреля 2011

Это лучшая документация, которую вы можете получить для Ubuntu на Rails.Это поможет вам легко все настроить:

https://help.ubuntu.com/community/RubyOnRails

0 голосов
/ 17 апреля 2011

Если вы хотите запустить rails server type в вашей консоли "rails server", и если вы хотите создать новый тип проекта в вашей консоли "rails new project_name"

0 голосов
/ 17 апреля 2011

Какую версию Rails вы используете?

В вашем терминале наберите 'rails -v'. Если у вас нет версии 3, то синтаксис 'rails new app_name' не будет работать, поскольку он был изменен в Rails 3.

Попробуйте обновить Rails и попробуйте снова: 'gem update rails'.

0 голосов
/ 17 апреля 2011

Вы сначала создали проект в каталоге?Похоже, у вас нет.Как только вы настроите проект с помощью rails new, вы сможете запустить сервер rails для сайта.

...