LocomotiveCMS Gem与Rails 5

时间:2016-11-02 17:16:28

标签: ruby-on-rails rubygems locomotivecms

我对Ruby on Rails很新,我决定使用LocomotiveCMS来满足我的应用需求。

我在理解这些概念时遇到了一些麻烦,而且我遇到了宝石依赖的问题!

我只是试图创建一个Rails控制器,因为我试图掌握使用机车/旅行车,但遇到了以下情况:

chloe@chloe-VirtualBox:~/fyp/locomotiveapp$ rails generate controller Book
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'locomotivecms'. (Bundler::GemRequireError)
Gem Load Error is: uninitialized constant ActiveModel::Serializers::Xml
Backtrace for gem load error is:
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid/composable.rb:35:in `<module:Composable>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid/composable.rb:23:in `<module:Mongoid>'
 /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid/composable.rb:18:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid/document.rb:17:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid/document.rb:17:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid.rb:22:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/mongoid-5.1.5/lib/mongoid.rb:22:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/locomotivecms-3.1.1/lib/locomotive/dependencies.rb:3:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/locomotivecms-3.1.1/lib/locomotive/dependencies.rb:3:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/locomotivecms-3.1.1/lib/locomotive/engine.rb:1:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/locomotivecms-3.1.1/lib/locomotive/engine.rb:1:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/locomotivecms-3.1.1/lib/locomotivecms.rb:1:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/locomotivecms-3.1.1/lib/locomotivecms.rb:1:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
/home/chloe/fyp/locomotiveapp/config/application.rb:17:in `<top (required)>'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:156:in `require'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:156:in `require_application_and_environment!'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:143:in `generate_or_destroy'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:60:in `generate'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
/home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Bundler Error Backtrace:
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:90:in `block (2 levels) in require'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `each'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:86:in `block in require'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `each'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler/runtime.rb:75:in `require'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/bundler-1.13.6/lib/bundler.rb:106:in `require'
from /home/chloe/fyp/locomotiveapp/config/application.rb:17:in `<top (required)>'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:156:in `require'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:156:in `require_application_and_environment!'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:143:in `generate_or_destroy'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:60:in `generate'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/chloe/.rvm/gems/ruby-2.3.0@rails4/gems/railties-5.0.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

我正在使用带有Xubuntu的VirtualBox实例,我使用的是Rails 5.0.0.1,Ruby 5.0.0.1和LocomotiveCMS 3.1.1

我有一些依赖关系的问题,因为locomotivecms 3.1.1需要使用Rails 4.2.6,但我在Gemfile.lock文件中改变了这个(我看过的另一个页面),但现在我真的很难过;任何帮助/建议将不胜感激!

这是我的Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    RedCloth (4.2.9)
    actioncable (5.0.0.1)
      actionpack (= 5.0.0.1)
      nio4r (~> 1.2)
      websocket-driver (~> 0.6.1)
    actionmailer (5.0.0.1)
      actionpack (= 5.0.0.1)
      actionview (= 5.0.0.1)
      activejob (= 5.0.0.1)
      mail (~> 2.5, >= 2.5.4)
      rails-dom-testing (~> 2.0)
    actionmailer-with-request (0.4.0)
      rails (>= 3)
    actionpack (5.0.0.1)
      actionview (= 5.0.0.1)
      activesupport (= 5.0.0.1)
      rack (~> 2.0)
      rack-test (~> 0.6.3)
      rails-dom-testing (~> 2.0)
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.0.1)
  activesupport (= 5.0.0.1)
  builder (~> 3.1)
  erubis (~> 2.7.0)
  rails-dom-testing (~> 2.0)
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (5.0.0.1)
  activesupport (= 5.0.0.1)
  globalid (>= 0.3.6)
activemodel (5.0.0.1)
  activesupport (= 5.0.0.1)
activerecord (5.0.0.1)
  activemodel (= 5.0.0.1)
  activesupport (= 5.0.0.1)
  arel (~> 7.0)
activesupport (5.0.0.1)
  concurrent-ruby (~> 1.0, >= 1.0.2)
  i18n (~> 0.7)
  minitest (~> 5.1)
  tzinfo (~> 1.1)
addressable (2.3.8)
arel (7.1.4)
attr_extras (4.4.0)
autoprefixer-rails (6.3.3.1)
  execjs
axiom-types (0.1.1)
  descendants_tracker (~> 0.0.4)
  ice_nine (~> 0.11.0)
  thread_safe (~> 0.3, >= 0.3.1)
bazaar (0.0.2)
bcrypt (3.1.11)
bootstrap-kaminari-views (0.0.5)
  kaminari (>= 0.13)
  rails (>= 3.1)
bootstrap-sass (3.3.7)
  autoprefixer-rails (>= 5.2.1)
  sass (>= 3.3.4)
bson (4.1.1)
builder (3.2.2)
byebug (9.0.6)
carrierwave (0.10.0)
  activemodel (>= 3.2.0)
  activesupport (>= 3.2.0)
  json (>= 1.7)
  mime-types (>= 1.16)
carrierwave-mongoid (0.8.1)
  carrierwave (>= 0.8.0, < 0.11.0)
  mongoid (>= 3.0, < 6.0)
  mongoid-grid_fs (>= 1.3, < 3.0)
chronic (0.10.2)
chunky_png (1.3.7)
codemirror-rails (5.16.0)
  railties (>= 3.0, < 6.0)
coercible (1.0.0)
  descendants_tracker (~> 0.0.1)
coffee-rails (4.2.1)
  coffee-script (>= 2.2.0)
  railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1)
  coffee-script-source
  execjs
coffee-script-source (1.10.0)
colorize (0.8.1)
compass (1.0.3)
  chunky_png (~> 1.2)
  compass-core (~> 1.0.2)
  compass-import-once (~> 1.0.5)
  rb-fsevent (>= 0.9.3)
  rb-inotify (>= 0.9)
  sass (>= 3.3.13, < 3.5)
compass-core (1.0.3)
  multi_json (~> 1.0)
  sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
  sass (>= 3.2, < 3.5)
concurrent-ruby (1.0.2)
crass (1.0.2)
custom_fields (2.7.0.rc1)
  activesupport (>= 4.2.5)
  carrierwave-mongoid (~> 0.8.1)
  monetize (~> 1.4.0)
  mongoid (~> 5.1.0)
debug_inspector (0.0.2)
descendants_tracker (0.0.4)
  thread_safe (~> 0.3, >= 0.3.1)
devise (3.5.10)
  bcrypt (~> 3.0)
  orm_adapter (~> 0.1)
  railties (>= 3.2.6, < 5.2.x)
  responders
  thread_safe (~> 0.1)
  warden (~> 1.2.3)
devise-encryptable (0.2.0)
  devise (>= 2.1.0)
dragonfly (1.0.12)
  addressable (~> 2.3)
  multi_json (~> 1.0)
  rack (>= 1.3.0)
equalizer (0.0.11)
erubis (2.7.0)
execjs (2.7.0)
ffi (1.9.14)
flash_cookie_session (1.1.6)
  rails (>= 3.0)
font-awesome-sass (4.5.0)
  sass (>= 3.2)
globalid (0.3.7)
  activesupport (>= 4.1.0)
grape (0.12.0)
  activesupport
  builder
  hashie (>= 2.1.0)
  multi_json (>= 1.3.2)
  multi_xml (>= 0.5.2)
  rack (>= 1.3.0)
  rack-accept
  rack-mount
  virtus (>= 1.0.0)
grape-entity (0.4.5)
  activesupport
  multi_json (>= 1.3.2)
haml (4.0.7)
  tilt
hashie (3.4.6)
highline (1.7.8)
httparty (0.13.7)
  json (~> 1.8)
  multi_xml (>= 0.5.2)
i18n (0.7.0)
ice_nine (0.11.2)
jbuilder (2.6.0)
  activesupport (>= 3.0.0, < 5.1)
  multi_json (~> 1.2)
jquery-rails (4.1.1)
  rails-dom-testing (>= 1, < 3)
  railties (>= 4.2.0)
  thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.5)
  railties (>= 3.2.16)
json (1.8.3)
json-schema (2.6.2)
  addressable (~> 2.3.8)
kaminari (0.16.3)
  actionpack (>= 3.0.0)
  activesupport (>= 3.0.0)
kramdown (1.10.0)
listen (3.0.8)
  rb-fsevent (~> 0.9, >= 0.9.4)
  rb-inotify (~> 0.9, >= 0.9.7)
locomotivecms (3.1.1)
  actionmailer-with-request (~> 0.4.0)
  autoprefixer-rails (~> 6.3.3.1)
  bazaar (~> 0.0.2)
  bootstrap-kaminari-views (~> 0.0.5)
  bootstrap-sass (~> 3.3.6)
  carrierwave-mongoid (~> 0.8.1)
  codemirror-rails (~> 5.16.0)
  custom_fields (~> 2.7.0.rc1)
  devise (~> 3.5.1)
  devise-encryptable (~> 0.2.0)
  dragonfly (~> 1.0.7)
  flash_cookie_session (~> 1.1.1)
  font-awesome-sass (~> 4.5.0)
  grape (~> 0.12.0)
  grape-entity (= 0.4.5)
  highline (~> 1.7.1)
  jquery-rails (~> 4.1.0)
  jquery-ui-rails (~> 5.0.3)
  json-schema (~> 2.6.1)
  kaminari (~> 0.16.3)
  locomotivecms_steam (~> 1.1.1)
  mime-types (~> 2.6.2)
  mimetype-fu (~> 0.1.2)
  mongo_session_store-rails4 (~> 6.0.0)
  mongoid (~> 5.1.3)
  mongoid-tree (~> 2.0.1)
  multi_json (~> 1.11.0)
  net-ssh (~> 3.0.2)
  nprogress-rails (~> 0.1.6.7)
  pundit (~> 1.1.0)
  rack-cache (~> 1.1)
  rails (= 5.0.0.1)
  rails-i18n (~> 4.0.6)
  rake (~> 10.5.0)
  responders (~> 2.1.0)
  simple_form (~> 3.2.0)
  simple_token_authentication (~> 1.12.0)
  slim (~> 3.0.6)
locomotivecms-liquid (4.0.0)
locomotivecms-solid (4.0.1)
  locomotivecms-liquid (~> 4.0.0)
locomotivecms_common (0.2.0)
  activesupport (>= 4.2.6)
  attr_extras (~> 4.4.0)
  colorize
  stringex (~> 2.6.0)
locomotivecms_steam (1.1.1)
  RedCloth (~> 4.2.9)
  autoprefixer-rails (~> 6.3.3.1)
  chronic (~> 0.10.2)
  coffee-script (~> 2.4.1)
  compass (~> 1.0.3)
  dragonfly (~> 1.0.12)
  haml (~> 4.0.6)
  httparty (~> 0.13.6)
  kramdown (~> 1.10.0)
  locomotivecms-solid (~> 4.0.1)
  locomotivecms_common (~> 0.2.0)
  mime-types (~> 2.6.1)
  mimetype-fu (~> 0.1.2)
  moneta (~> 0.8.0)
  morphine (~> 0.1.1)
  nokogiri (~> 1.6.7.2)
  rack-cache (~> 1.6.1)
  rack-rewrite (~> 1.5.1)
  rack_csrf (~> 2.5.0)
  sanitize (~> 4.0.1)
  sass (~> 3.4.21)
  sprockets (~> 3.5.2)
loofah (2.0.3)
  nokogiri (>= 1.5.9)
mail (2.6.4)
  mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (2.6.2)
mimetype-fu (0.1.2)
mini_portile2 (2.0.0)
minitest (5.9.1)
moneta (0.8.0)
monetize (1.4.0)
  money (~> 6.7)
money (6.7.1)
  i18n (>= 0.6.4, <= 0.7.0)
  sixarm_ruby_unaccent (>= 1.1.1, < 2)
mongo (2.3.1)
  bson (~> 4.1)
mongo_session_store-rails4 (6.0.0)
  actionpack (>= 3.1)
mongoid (5.1.5)
  activemodel (>= 4.0)
  mongo (~> 2.1)
  origin (~> 2.2)
  tzinfo (>= 0.3.37)
mongoid-grid_fs (2.3.0)
  mime-types (>= 1.0, < 4.0)
  mongoid (>= 3.0, < 7.0)
mongoid-tree (2.0.1)
  mongoid (>= 4.0, < 6.0)
morphine (0.1.1)
multi_json (1.11.3)
multi_xml (0.5.5)
net-ssh (3.0.2)
nio4r (1.2.1)
nokogiri (1.6.7.2)
  mini_portile2 (~> 2.0.0.rc2)
nokogumbo (1.4.10)
  nokogiri
nprogress-rails (0.1.6.8)
origin (2.2.2)
orm_adapter (0.5.0)
puma (3.6.0)
pundit (1.1.0)
  activesupport (>= 3.0.0)
rack (2.0.1)
rack-accept (0.4.5)
  rack (>= 0.4)
rack-cache (1.6.1)
  rack (>= 0.4)
rack-mount (0.8.3)
  rack (>= 1.0.0)
rack-rewrite (1.5.1)
rack-test (0.6.3)
  rack (>= 1.0)
rack_csrf (2.5.0)
  rack (>= 1.1.0)
rails (5.0.0.1)
  actioncable (= 5.0.0.1)
  actionmailer (= 5.0.0.1)
  actionpack (= 5.0.0.1)
  actionview (= 5.0.0.1)
  activejob (= 5.0.0.1)
  activemodel (= 5.0.0.1)
  activerecord (= 5.0.0.1)
  activesupport (= 5.0.0.1)
  bundler (>= 1.3.0, < 2.0)
  railties (= 5.0.0.1)
  sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
  activesupport (>= 4.2.0, < 6.0)
  nokogiri (~> 1.6.0)
rails-html-sanitizer (1.0.3)
  loofah (~> 2.0)
rails-i18n (4.0.9)
  i18n (~> 0.7)
  railties (>= 4.0)
railties (5.0.0.1)
  actionpack (= 5.0.0.1)
  activesupport (= 5.0.0.1)
  method_source
  rake (>= 0.8.7)
  thor (>= 0.18.1, < 2.0)
rake (10.5.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
  ffi (>= 0.5.0)
responders (2.1.2)
  railties (>= 4.2.0, < 5.1)
sanitize (4.0.1)
  crass (~> 1.0.2)
  nokogiri (>= 1.4.4)
  nokogumbo (~> 1.4.1)
sass (3.4.22)
sass-rails (5.0.6)
  railties (>= 4.0.0, < 6)
  sass (~> 3.1)
  sprockets (>= 2.8, < 4.0)
  sprockets-rails (>= 2.0, < 4.0)
  tilt (>= 1.1, < 3)
simple_form (3.2.1)
  actionpack (> 4, < 5.1)
  activemodel (> 4, < 5.1)
simple_token_authentication (1.12.0)
  actionmailer (>= 3.2.6, < 5.1)
  actionpack (>= 3.2.6, < 5.1)
  devise (~> 3.2)
sixarm_ruby_unaccent (1.1.1)
slim (3.0.7)
  temple (~> 0.7.6)
  tilt (>= 1.3.3, < 2.1)
spring (2.0.0)
  activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
  listen (>= 2.7, < 4.0)
  spring (>= 1.2, < 3.0)
sprockets (3.5.2)
  concurrent-ruby (~> 1.0)
  rack (> 1, < 3)
sprockets-rails (3.2.0)
  actionpack (>= 4.0)
  activesupport (>= 4.0)
  sprockets (>= 3.0.0)
stringex (2.6.1)
temple (0.7.7)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
turbolinks (5.0.1)
  turbolinks-source (~> 5)
turbolinks-source (5.0.0)
tzinfo (1.2.2)
  thread_safe (~> 0.1)
uglifier (3.0.3)
  execjs (>= 0.3.0, < 3)
virtus (1.0.5)
  axiom-types (~> 0.1)
  coercible (~> 1.0)
  descendants_tracker (~> 0.0, >= 0.0.3)
  equalizer (~> 0.0, >= 0.0.9)
warden (1.2.6)
  rack (>= 1.0)
web-console (3.3.0)
  activemodel (>= 4.2)
  debug_inspector
  railties (>= 4.2)
websocket-driver (0.6.4)
  websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
  ruby

DEPENDENCIES
  bootstrap-sass (~> 3.3.6)
  byebug
  coffee-rails (~> 4.2.1)
  jbuilder (~> 2.5)
  jquery-rails
  listen (~> 3.0.5)
  locomotivecms (~> 3.1.1)
  puma (~> 3.0)
  rails (~> 5.0.0.1, >= 5.0.0.1)
  sass-rails (~> 5.0)
  spring
  spring-watcher-listen (~> 2.0.0)
  turbolinks (~> 5)
  tzinfo-data
  uglifier (>= 1.3.0)
  web-console

BUNDLED WITH
   1.13.6

0 个答案:

没有答案