-1

http://rubyinstaller.org/にある Ruby on Rails パッケージをインストールしました(これは、私の XP SP3 システムで ruby​​ on rails ワークステーションをセットアップする最初の試みです)。インストール プロセスは、エラーなしで完全に完了しました。コンソールを使用してサーバーを起動しました。サーバーは起動しますが、http://localhost:3000にエラー ページが表示されます (ページが見つかりません)。コンソールに次のように表示されます。足りないものはありますか?

#Rails Environment Configuration.

---
git:
  user.name:  XYZ
  user.email: xyzuser
  version:    git version 1.8.1.msysgit.1

ruby:
  bin:        C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
  version:    ruby 1.9.3p392 (2013-02-22) [i386-mingw32]

rails:
  bin:        C:/RailsInstaller/Ruby1.9.3/bin/rails.bat
  version:    Rails 3.2.13

ssh:
  public_key_location: C:\Documents and Settings\xyz/.ssh/id_rsa.pub
  public_key_contents: ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArYKMRvMHxKJ2R//5viqQp
D4IQhVcKZhhbfvZGzDOXF1M//pewAQDK2x9y8T8irvatgmDMCYB5L2uZiyXwG3gPm6Bfw44mCHhNP8xN
bT2OSDnvIoZcFVfmQExZmwWcSNqm0NionObUV+IFKvfjg9bOPl4GBUqSXSTlUmAn/wQq0c/m+GoJwDlI
dV/h69dq4tHYwpCMFUZ9k4LqR4VICktV5Fi1VQA14u4Y9kOWAAyAfzeXnOzcpkbYxgjbCvAf20gM6lSL
9NvNsLuzI5yLxhI5wAmZbK+11zgNmx019tbv1uHvZRV2Z53aWpErtuvipAieQ977U4kYQPMyFf8g8BKd
Q== XYZ<xyzuser>




C:\Sites>

また、サーバー起動時のコンソール出力は次のとおりです。

C:\Sites>rails s
Usage:
  rails new APP_PATH [options]

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

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

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.

    You can specify extra command-line arguments to be used every time
    'rails new' runs in the .railsrc configuration file in your home directory.

    Note that the arguments specified in the .railsrc file don't affect the
    defaults values shown above in this help message.

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.

C:\Sites>
4

4 に答える 4

1

みんなありがとう。最後に、私はそれを働かせました。問題は、test_appフォルダー内のGemfile でした。gem 'uglifier', '>= 1.0.3'という行にコメントしたところ、うまくいきました。うまくいけば、それもさらに機能し、先に進むことができます。

于 2013-07-22T11:49:39.733 に答える
0

cd作成した Rails プロジェクトのディレクトリに移動する必要があり、正常にrails s動作するはずです。

これは、サーバーがまだ起動していないことも意味します。コンソール コマンドの出力をよく読んでください。ほとんどの場合、コマンドが何をするか、または期待どおりに動作しない理由が示されます。

于 2013-07-22T11:20:46.047 に答える
0

サーバーが起動していません。Rails アプリのフォルダーに移動し、必要な gem をインストールして、サーバーを起動する必要があります。

cd <your app folder>
bundle install
rails s
于 2013-07-22T11:22:30.260 に答える
0

まず、新しい Rails プロジェクトを作成する必要があります。C:/Sites は Rails プロジェクト ディレクトリではないと思います。

rails new test_app

ディレクトリに rails プロジェクトが作成されます。cd test_app に移動するよりも。サーバーを起動してみてください。それがうまくいくことを願っています。

于 2013-07-22T11:24:13.220 に答える