Install CMS Engine with Ruby on Rails. (Locomotive)

Locomotive as an open source CMS for rubies on rails that I would like to install.

Everything worked out with their “initial” projects, but I had problems installing the locomotive CMS Engine.

Here is a link to the requirements:

http://doc.locomotivecms.com/guides/get-started/requirements

... and here is a link to the actual manual that installs the CMS Engine:

http://doc.locomotivecms.com/guides/get-started/install-engine

So, first you need to install Ruby, at least version 1.9.3: terminal screen shot, demonstrating what version of ruby ​​is installed

Then you need to install imagemagick. Imagemagick is an open source software package for displaying, converting, and editing bitmap files. When it is installed, it warns me that I have either Mac ports or a finger, although I deleted both. I do not know what to do with these distorted objects!

terminal screenshot showing imagemagick installation errors

In any case, let's continue. Now we need to install the rails version 3.2.11: terminal screenshot showing loaded version of rails

Great. Now we need to install MongoDB, an open source database and a leading NoSQL database.

terminal screenshot showing MongoDB output Something is wrong here. Launchctl did not return anything? Why not? The launch of "Mongod" did not lead either. Bad signs.

Now you need to install the rake and the collector. No problems:

terminal screenshot verifying bundler is installedterminal screenshot verifying rake is installed

. Wagon - LocomotiveCMS. :

terminal screenshot verifying wagon is installed

, ! "myapp" , :

rails new myapp --skip-active-record --skip-test-unit --skip-javascript --skip-bundle

'myapp' :

cd myapp

Gemfile:

group :assets do
gem 'locomotive_cms', '~> 2.0.1', :require => 'locomotive/engine'
gem 'unicorn', :group => 'development'
gem 'compass-rails',  '~> 1.0.2', :group => 'assets'
gem 'sass-rails',     '~> 3.2.4', :group => 'assets'
gem 'coffee-rails',   '~> 3.2.2', :group => 'assets'
gem 'uglifier',       '~> 1.2.4', :group => 'assets'
end

'bundle install'. : enter image description here

, , . , Mongoid.

:

bundle exec rails g locomotive:install

:

  create  config/initializers/locomotive.rb
  create  config/initializers/carrierwave.rb
  create  config/initializers/dragonfly.rb
  create  config/mongoid.yml
    rake  db:mongoid:migration:install/usr/local/rvm/gems/ruby-1.9.3-     p392@global/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable    dir /usr/local in PATH, mode 040777
rake aborted!
Failed to connect to a master node at localhost:27017
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.5.2/lib/mongo/connection.rb:413:in      `connect'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.5.2/lib/mongo/connection.rb:574:in     `setup'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.5.2/lib/mongo/connection.rb:104:in     `initialize'

rake  db:mongoid:migrate
/usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.4/lib/bundler/runtime.rb:197:     warning: Insecure world writable dir /usr/local in PATH, mode 040777
rake aborted!
Failed to connect to a master node at localhost:27017
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.5.2/lib/mongo/connection.rb:413:in  `connect'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.5.2/lib/mongo/connection.rb:574:in   `setup'
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/mongo-1.5.2/lib/mongo/connection.rb:104:in   `initialize'

" mongodb config/mongoid.yml". :

defaults: &defaults
host: localhost
port: 27017
# slaves:
#   - host: slave1.local
#     port: 27018
#   - host: slave2.local
#     port: 27019

development:
<<: *defaults
database: locomotive_dev

test:
<<: *defaults
database: locomotive_test

, //locomotive.rb " , , ( ..)". , :

Locomotive.configure do |config|
 config.multi_sites = false
 config.default_locale = :en
 config.enable_logs = true
 config.mailer_sender = 'support@example.com'
end

. :

bundle exec unicorn_rails

. , ,

E, [2013-04-29T20:41:49.223219 #40521] ERROR -- : reaped #<Process::Status: pid 40527 exit 1>     worker=0
I, [2013-04-29T20:41:49.223661 #40521]  INFO -- : worker=0 spawning...
I, [2013-04-29T20:41:49.225155 #40528]  INFO -- : worker=0 spawned pid=40528
I, [2013-04-29T20:41:49.225574 #40528]  INFO -- : Refreshing Gem list
E, [2013-04-29T20:41:52.211379 #40528] ERROR -- : Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)

. Awergohiewgiohegwhioewgiohwefiohfwaehioiohawefiohawefhioaewfohiafwehioafwiohaiofwehiofaewiohaefwihoefwahioaefwhioaefwhoiiohaefwhioefwhioaefwhioaefwhioaefwiohafewiohaefwohifaewiohaefwhioafewhiofaewhiofewaiohefwaohieawfiohfewhiofewhiofeawhiofaewhoieafwhioawefhioawfeiohawfeohi

- , , , . , :

Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)
+5
2

mongo.

:

bundle exec unicorn_rails

run

sudo mongod --dbpath /usr/local/var/mongodb --fork --logpath /var/log/mongodb.log

unicorn rails .

,

tail -f /var/log/mongodb.log

, !

+3

rails g devise:install  , , .

0

All Articles