3

LocomotiveCMS をインストールしようとしていて、次のガイドに従おうとしています: http://doc.locomotivecms.com/guides/get-started/install-engine。入力する必要がある部分に到達します。

bundle exec rails g locomotive:install

次に、レール使用コマンドを出力するだけです:

MacBook-Pro:myapp chris$ bundle exec rails g locomotive:install
Usage:
  rails new APP_PATH [options]

Options:
  -r, [--ruby=PATH]              # Path to the Ruby binary of your choice
                                 # Default: /Users/chris/.rvm/rubies/ruby-2.0.0-p195/bin/ruby
  -b, [--builder=BUILDER]        # Path to a application builder (can be a filesystem path or URL)
  -m, [--template=TEMPLATE]      # Path to an application template (can be a filesystem 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 to your Rails checkout
      [--edge]                   # Setup the application with Gemfile pointing to Rails repository
  -T, [--skip-test-unit]         # Skip Test::Unit files

....

何が間違っていたのかわかりません。私は手紙へのガイドに従った...

どんな助けでも大歓迎です。ありがとうございました!

編集: 「バンドルのインストール」はうまくいったようです。

Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

私のレールのバージョンは次のとおりです。

Rails 3.2.13

私のルビーバージョンは次のとおりです。

ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]

これは私の現在の Gemfile です (ただし、テストのためにこれを少し変更しようとしました)。

source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '3.2.13'

gem 'locomotive_cms', '~> 2.0.1', :require => 'locomotive/engine'
gem 'unicorn', :group => 'development'
gem 'compass-rails',  '~> 1.0.3', :group => 'assets'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 3.2.6', :group => 'assets'

# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 2.1.1', :group => 'assets'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 3.2.2', :group => 'assets'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.0.1', :group => 'assets'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]
4

2 に答える 2

4

1 つ上のディレクトリ (Rails アプリ ディレクトリの 1 つ上のレベル) に移動し、次を実行します。

rails -v

3.2.13 以外のバージョンが表示される可能性があります。その場合は、これを使用してプロジェクトを作成してみてください。

rails _3.2.13_ new app_name --skip-active-record --skip-test-unit --skip-javascript --skip-bundle
于 2013-07-13T03:45:53.987 に答える
1

これはインストールガイドの誤りだと思います。

コマンドラインを次のように変更するだけです。

rails g locomotive:install

そして、すべてがうまくいくでしょう、私はそれをやったばかりです。^^

于 2013-12-04T08:50:57.520 に答える