3

I'm trying to install LocomotiveCMS and I'm trying to follow this guide: http://doc.locomotivecms.com/guides/get-started/install-engine. I get up to the part where I have to enter in:

bundle exec rails g locomotive:install

Which then just outputs the rails usage command:

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

....

I'm not sure what I did wrong. I followed the guide to the letter...

Any help would be much appreciated. Thank you!

EDIT: The "bundle install" seemed to have worked fine.

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

My rails version is:

Rails 3.2.13

My ruby version is:

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

This is my current Gemfile (though I did try to change this around a bit for testing):

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]
kurisukun
  • 3,149
  • 5
  • 37
  • 69
  • Did the `bundle install` command end up without any errors? What if you launch same command without direct bundle context: rails generate locomotive:install ? – icanhazbroccoli Jun 04 '13 at 07:22
  • Yes, the bundle install command did work. It said "Your bundle is complete!" I just tried omitting the bundle context with "rails g locomotive:install" and the same output resulted... – kurisukun Jun 04 '13 at 07:30
  • And could you show `rails --version` output please? – icanhazbroccoli Jun 04 '13 at 07:47
  • Sure, the output is: "Rails 3.2.13" – kurisukun Jun 04 '13 at 07:48
  • Well, I've installed loco cms right now on rails 3.2.13 and ruby-1.9.3-p194 successfully without any prob. Could you show your Gemfile contents please? – icanhazbroccoli Jun 04 '13 at 07:58
  • I see! I tried just now from scratch again with the same results. I have edited my question above with the ruby version, rails version, and my Gemfile. Thank you for your help! – kurisukun Jun 04 '13 at 08:07
  • Perhaps it is my ruby version? The locomotive site says ruby 1.9.3 and I have 2.x – kurisukun Jun 04 '13 at 08:10
  • Do you use rvm? Could you switch on ruby 1.9.3 to test? – icanhazbroccoli Jun 04 '13 at 08:18
  • And what happens if you execute `rails console` command inside your app folder? – icanhazbroccoli Jun 04 '13 at 08:22
  • I switched to ruby 1.9.3 and actually the same thing. Even rails console shows the same output. Perhaps something is wrong with my rails/ruby install... – kurisukun Jun 04 '13 at 08:38
  • It seems to be. Maybe these questions: [1](http://stackoverflow.com/questions/4637312/error-usage-rails-new-app-path-options-when-running-rails-server) and [2](http://stackoverflow.com/questions/3744567/typing-rails-console-doesnt-start) will help you. – icanhazbroccoli Jun 04 '13 at 09:17
  • Wow, that sort of did it. From within the myapp folder, I had to do "rails new . --skip-active-record --skip-test-unit --skip-javascript --skip-bundle" to regenerate the files, then I had to restore Gemfile back. Then now that command worked. Is that normal? – kurisukun Jun 04 '13 at 09:24
  • This behavior seems strange to me. I'm afraid I'm helpless here. Sorry. But if all the rails commands including rake db:migrate work properly, that's fine) – icanhazbroccoli Jun 04 '13 at 10:37

2 Answers2

4

Move up one directory (one level above your rails app directory) and run:

rails -v

You'll likely see a version other than 3.2.13. If you do, try creating your project using this:

rails _3.2.13_ new app_name --skip-active-record --skip-test-unit --skip-javascript --skip-bundle
Ben
  • 695
  • 6
  • 12
1

I think this is an error in the installation guide.

Just change the command line to:

rails g locomotive:install

And everything will be fine, I've just done it. ^^

Hoang Le
  • 1,341
  • 14
  • 14
  • This worked for me, thanks! It appears the documentation on the LocomotiveCMS website is wrong. – APAD1 Jan 24 '14 at 21:28
  • The "right" way is to use `bundle`. If this works, you probably have something wrong in your bundle configuration. – caesarsol Jan 25 '16 at 14:30