locomotivecms / engine

A platform to create, publish and edit sites
http://www.locomotivecms.com
Other
2.31k stars 625 forks source link

Cannot push liquid page or save template edits on Heroku #942

Closed aeberlin closed 8 years ago

aeberlin commented 10 years ago

I cannot push pages to my production environment on Heroku.

And I don't have anything very complex in my .liquid files (see bottom).

$ bundle exec wagon push production -r pages
* Pushing Site
* Pushing Pages
  en
    updating index      error => undefined method `context' for #<Liquid::Document:0x007fe22c76a820>
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/base.rb:131:in `put'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/pages_writer.rb:111:in `update_page'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/pages_writer.rb:63:in `write_page'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/pages_writer.rb:47:in `block (2 levels) in write'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/pages_writer.rb:47:in `each'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/pages_writer.rb:47:in `block in write'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/base.rb:149:in `call'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/base.rb:149:in `block (2 levels) in each_locale'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter.rb:95:in `with_locale'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/base.rb:148:in `block in each_locale'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/base.rb:147:in `each'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/base.rb:147:in `each_locale'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/api/pages_writer.rb:43:in `write'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/runner.rb:55:in `block in write_all'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/runner.rb:51:in `each'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/runner.rb:51:in `write_all'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_mounter-1.4.0/lib/locomotive/mounter/writer/runner.rb:29:in `run!'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_wagon-1.4.0/lib/locomotive/wagon.rb:82:in `push'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_wagon-1.4.0/lib/locomotive/wagon/cli.rb:196:in `push'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@locomotive/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@locomotive/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@locomotive/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@locomotive/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/gems/locomotivecms_wagon-1.4.0/bin/wagon:9:in `<top (required)>'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/bin/wagon:23:in `load'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@global/bin/wagon:23:in `<main>'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@locomotive/bin/ruby_executable_hooks:15:in `eval'
    /Users/aeberlin/.rvm/gems/ruby-2.1.2@locomotive/bin/ruby_executable_hooks:15:in `<main>'

index.liquid:


---
title: Home
published: true

---
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    {{ 'application.css' | stylesheet_tag }}
  </head>
  <body>
    <img src="/assets/logo.png" style="height: 136px; width: 396px;" />
  </body>
</html>

404.liquid:


---
title: Page not found
published: false

---
{% extends index %}

{% block 'main' %}

<p>Page not found</p>

{% endblock %}

contact.liquid:

<html>
  <body>
    <form method="POST" action="{{contents.contact_messages.public_submission_url}}">
      {% csrf_param %}
      <input type="hidden" value="/" name="success_callback" />
      <input type="hidden" value="/contact" name="error_callback" />

      {% if contact_message.errors %}
        <p>The following errors occured:</p>
        <ul>
        {% for error in contact_message.errors %}
          <li>{{error[0] | capitalize}} -  {{error[1]}}</li>
        {% endfor %}
        </ul>
      {% endif %}

      <table>
        <tr>
          <td>Name:</td>
          <td><input type="text" name="content[name]" value="{{contact_message.name}}"></td>
        </tr>
        <tr>
          <td>Email:</td>
          <td><input type="text" name="content[email]" value="{{contact_message.email}}"></td>
        </tr>
        <tr>
          <td>Message:</td>
          <td><textarea name="content[message]">{{contact_message.message}}</textarea></td>
        </tr>
      </table>
      <input type="submit">
    </form>
  </body>
</html>

Additionally, I am not able to save page edits from Heroku. It only says "Your form is being submitted," which quickly disappears and nothing else happens. Here is the error recorded from the javascript console:

Failed to load resource: 
The server responded with a status of 500 (Internal Server Error)
http://somewhere.com/locomotive/pages/53974610e98c3747eb000004

Uncaught SyntaxError: Unexpected token <
http://somewhere.com/locomotive/pages/53974610e98c3747eb000004/edit:1

The engine has not been modified, only minor changes to config, application.css, and liquid pages.

Hopefully somebody has a solution.. Thanks.. Cheers.

aeberlin commented 10 years ago

I really need a response here, and I can't possibly be the only person experiencing this problem.

did commented 10 years ago

@aeberlin What's the version of your engine on Heroku? Just display your Gemfile here please.

aeberlin commented 10 years ago

Hi,

Thanks for the response.

Here are the versions I'm using:

       ...
       Using locomotive_liquid 2.4.2
       Using locomotivecms-liquid 2.6.0
       Using locomotivecms_mounter 1.4.0
       ...
       Using locomotive-aloha-rails 0.23.2.2
       Using locomotive-tinymce-rails 3.5.8.2
       ...
       Using locomotivecms_wagon 1.4.0
       Using locomotive_cms 2.4.1
       ...

Here is the full deployment log:

$ bundle exec rake assets:precompile \
  && git add . \
  && git commit -am "Ready for deploy." \
  && git push heroku master

Digest::Digest is deprecated; use Digest
/Users/testing/.rvm/rubies/ruby-2.1.2/bin/ruby /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
Digest::Digest is deprecated; use Digest
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
mkdir -p /Users/testing/Sites/example-com/locomotive/public/assets
cp -rp /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/locomotive-tinymce-rails-3.5.8.2/vendor/assets/javascripts/tinymce /Users/testing/Sites/example-com/locomotive/public/assets
mkdir -p /Users/testing/Sites/example-com/locomotive/public/assets
cp -rp /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/locomotive-aloha-rails-0.23.2.2/vendor/assets/javascripts/aloha /Users/testing/Sites/example-com/locomotive/public/assets
Digest::Digest is deprecated; use Digest
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
[master 441112e] Ready for deploy.
 88 files changed, 69 insertions(+), 41 deletions(-)
 create mode 100644 public/assets/application-4090386a833042276f6434e69cd243b0.css
 create mode 100644 public/assets/application-4090386a833042276f6434e69cd243b0.css.gz
 rewrite public/assets/application.css.gz (100%)
Fetching repository, done.
Counting objects: 229, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (116/116), done.
Writing objects: 100% (118/118), 36.76 KiB, done.
Total 118 (delta 64), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.2
-----> Installing dependencies using 1.6.3
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Using RedCloth 4.2.9
       Using multi_json 1.7.9
       Using builder 3.0.4
       Using erubis 2.7.0
       Using journey 1.0.4
       Using rack 1.4.5
       Using hike 1.2.3
       Using tilt 1.4.1
       Using mime-types 1.25.1
       Using i18n 0.6.9
       Using polyglot 0.3.5
       Using arel 3.0.3
       Using tzinfo 0.3.39
       Using bundler 1.6.3
       Using json 1.8.1
       Using thor 0.19.1
       Using bcrypt 3.1.7
       Using cancan 1.6.7
       Using coderay 1.1.0
       Using colorize 0.5.8
       Using moped 1.5.2
       Using net-ssh 2.9.1
       Using chronic 0.10.2
       Using origin 1.1.0
       Using chunky_png 1.3.1
       Using coffee-script-source 1.7.0
       Using execjs 2.2.0
       Using fssm 0.2.10
       Using commonjs 0.2.7
       Using sass 3.2.19
       Using daemons 1.1.9
       Using orm_adapter 0.5.0
       Using ejs 1.0.0
       Using eventmachine 1.0.3
       Using excon 0.23.0
       Using formatador 0.2.5
       Using nokogiri 1.5.11
       Using ruby-hmac 0.4.0
       Using highline 1.6.21
       Using multipart-post 2.0.0
       Using multi_xml 0.5.5
       Using kgio 2.9.2
       Using listen 0.7.3
       Using locomotive_liquid 2.4.2
       Using mimetype-fu 0.1.2
       Using redcarpet 3.0.0
       Using stringex 2.0.11
       Using logger 1.2.8
       Using locomotivecms-liquid 2.6.0
       Using zip 2.0.2
       Using will_paginate 3.0.5
       Using raindrops 0.13.0
       Using rack-test 0.6.2
       Using rack-cache 1.2
       Using rack-ssl 1.3.4
       Using warden 1.2.3
       Using sprockets 2.2.2
       Using dragonfly 0.9.15
       Using haml 4.0.5
       Using rake 10.0.4
       Using treetop 1.4.15
       Using activesupport 3.2.16
       Using money 5.1.1
       Using faker 0.9.5
       Using rdoc 3.12.2
       Using bcrypt-ruby 3.1.5
       Using better_errors 1.0.1
       Using net-scp 1.2.1
       Using net-sftp 2.1.2
       Using coffee-script 2.2.0
       Using uglifier 2.5.1
       Using less 2.2.2
       Using compass 0.12.6
       Using thin 1.5.1
       Using sanitize 2.0.3
       Using locomotivecms_solid 0.2.2
       Using locomotivecms-solid 0.2.2.1
       Using httparty 0.11.0
       Using unicorn 4.8.3
       Using sprockets-sass 1.0.3
       Using mail 2.5.4
       Using sshkit 1.5.1
       Using activemodel 3.2.16
       Using fog 1.12.1
       Using compass-rails 1.1.7
       Using httmultiparty 0.3.10
       Using capistrano 3.2.1
       Using actionpack 3.2.16
       Using activerecord 3.2.16
       Using activeresource 3.2.16
       Using carrierwave 0.9.0
       Using locomotivecms_mounter 1.4.0
       Using actionmailer 3.2.16
       Using railties 3.2.16
       Using mongoid 3.1.6
       Using formtastic 2.2.1
       Using kaminari 0.14.1
       Using locomotive-aloha-rails 0.23.2.2
       Using locomotive-tinymce-rails 3.5.8.2
       Using mongo_session_store-rails3 4.1.1
       Using mongoid-grid_fs 1.9.2
       Using carrierwave-ftp 0.2.6
       Using locomotivecms_wagon 1.4.0
       Using mongoid-tree 1.0.4
       Using rails 3.2.16
       Using cells 3.8.8
       Using codemirror-rails 3.24
       Using devise 2.2.7
       Using coffee-rails 3.2.2
       Using rails-backbone 0.7.2
       Using jquery-rails 2.1.4
       Using sass-rails 3.2.6
       Using carrierwave-mongoid 0.6.3
       Using actionmailer-with-request 0.4.0
       Using responders 0.9.3
       Using mongoid_migration 0.0.8
       Using flash_cookie_session 1.1.6
       Using devise-encryptable 0.1.2
       Using custom_fields 2.3.1
       Using locomotive_cms 2.4.1
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (0.91s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
       Detected manifest.yml, assuming assets were compiled locally
-----> WARNINGS:
       Injecting plugin 'rails_log_stdout'
       Injecting plugin 'rails3_serve_static_assets'
       Add 'rails_12factor' gem to your Gemfile to skip plugin injection
       No Procfile detected, using the default web server (webrick)
       https://devcenter.heroku.com/articles/ruby-default-web-server
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for Ruby  -> console, rake, web, worker

-----> Compressing... done, 45.6MB
-----> Launching... done, v23
       http://example-com.herokuapp.com/ deployed to Heroku

To git@heroku.com:example-com.git
   c73f478..441112e  master -> master

Here is the Gemfile:

source 'https://rubygems.org'

ruby '2.1.2'

gem 'locomotivecms_wagon'

gem 'rails', '3.2.16'

gem 'locomotive_cms', '~> 2.4.1', :require => 'locomotive/engine'

gem 'carrierwave-ftp', :require => 'carrierwave/storage/ftp'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'compass-rails',  '~> 1.1.3'
  gem 'uglifier', '>= 1.0.3'
end

# Use unicorn as the app server
gem 'unicorn'

# Deploy with Capistrano
gem 'capistrano'

Let me know if you need anything else or if you would like me to try something on the server.

Thanks again for the response, hope we can get this figured out.

Cheers!

did commented 10 years ago

Hmm, perhaps, you should start by upgrading your engine to the last stable version 2.5.4. You would have to re-generate the dragonfly config file by running "rails g locomotive:install" (backup your files before running it).

aeberlin commented 10 years ago

Okay, I attempted to do so, but I'm having issues with dragonfly.

After locomotive:install:

Digest::Digest is deprecated; use Digest
/Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/dragonfly-1.0.5/lib/dragonfly/app.rb:33:in `[]': Dragonfly::App[:images] is deprecated - use Dragonfly.app (for the default app) or Dragonfly.app(:images) (for extra named apps) instead. See docs at http://markevans.github.io/dragonfly for details (RuntimeError)
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/dragonfly-1.0.5/lib/dragonfly.rb:27:in `[]'
       from /Users/testing/Sites/example-com/locomotive/config/initializers/dragonfly.rb:5:in `<top (required)>'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
       from /Users/testing/Sites/example-com/locomotive/config/environment.rb:5:in `<top (required)>'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!'
       from /Users/testing/.rvm/gems/ruby-2.1.2@locomotive/gems/railties-3.2.17/lib/rails/commands.rb:25:in `<top (required)>'
       from script/rails:6:in `require'
       from script/rails:6:in `<main>'

And, for giggles, attempted a deploy, which worked but resulted in an application error:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

Heroku logs:

2014-06-27T12:44:56.037940+00:00 heroku[web.1]: Starting process with command `bundle exec rails server -p 40076`
2014-06-27T12:45:02.109958+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2014-06-27T12:45:02.110598+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2014-06-27T12:45:02.998844+00:00 app[web.1]:     from /app/config/initializers/dragonfly.rb:5:in `<top (required)>'
2014-06-27T12:45:02.998572+00:00 app[web.1]: => Booting WEBrick
2014-06-27T12:45:02.998579+00:00 app[web.1]: => Rails 3.2.17 application starting in production on http://0.0.0.0:40076
2014-06-27T12:45:02.998610+00:00 app[web.1]: Exiting
2014-06-27T12:45:02.998799+00:00 app[web.1]: /app/vendor/bundle/ruby/2.1.0/gems/dragonfly-1.0.5/lib/dragonfly/app.rb:33:in `[]': Dragonfly::App[:images] is deprecated - use Dragonfly.app (for the default app) or Dragonfly.app(:images) (for extra named apps) instead. See docs at http://markevans.github.io/dragonfly for details (RuntimeError)
2014-06-27T12:45:02.998902+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
2014-06-27T12:45:02.998920+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
2014-06-27T12:45:02.998583+00:00 app[web.1]: => Ctrl-C to shutdown server
2014-06-27T12:45:02.998977+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
2014-06-27T12:45:02.998882+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
2014-06-27T12:45:02.999033+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
2014-06-27T12:45:02.999071+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
2014-06-27T12:45:02.999160+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2014-06-27T12:45:02.998581+00:00 app[web.1]: => Call with -d to detach
2014-06-27T12:45:02.998995+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
2014-06-27T12:45:02.999179+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
2014-06-27T12:45:02.999102+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
2014-06-27T12:45:02.998863+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
2014-06-27T12:45:02.998939+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
2014-06-27T12:45:02.999052+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
2014-06-27T12:45:02.999123+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
2014-06-27T12:45:02.999222+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
2014-06-27T12:45:02.999304+00:00 app[web.1]:     from /app/config.ru:in `new'
2014-06-27T12:45:02.999267+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
2014-06-27T12:45:02.999345+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `eval'
2014-06-27T12:45:02.999324+00:00 app[web.1]:     from /app/config.ru:in `<main>'
2014-06-27T12:45:02.999199+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
2014-06-27T12:45:02.999442+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/server.rb:254:in `start'
2014-06-27T12:45:02.999480+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/commands.rb:55:in `block in <top (required)>'
2014-06-27T12:45:02.999498+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/commands.rb:50:in `tap'
2014-06-27T12:45:02.999461+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/commands/server.rb:70:in `start'
2014-06-27T12:45:02.999364+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:40:in `parse_file'
2014-06-27T12:45:02.999517+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/commands.rb:50:in `<top (required)>'
2014-06-27T12:45:02.999382+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/server.rb:200:in `app'
2014-06-27T12:45:02.999535+00:00 app[web.1]:     from script/rails:6:in `require'
2014-06-27T12:45:02.999554+00:00 app[web.1]:     from script/rails:6:in `<main>'
2014-06-27T12:45:02.998824+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/dragonfly-1.0.5/lib/dragonfly.rb:27:in `[]'
2014-06-27T12:45:02.998958+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
2014-06-27T12:45:02.999014+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
2014-06-27T12:45:02.999142+00:00 app[web.1]:     from /app/config/environment.rb:5:in `<top (required)>'
2014-06-27T12:45:02.999286+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
2014-06-27T12:45:02.999247+00:00 app[web.1]:     from /app/config.ru:3:in `block in <main>'
2014-06-27T12:45:02.999422+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/server.rb:304:in `wrapped_app'
2014-06-27T12:45:02.999403+00:00 app[web.1]:     from /app/vendor/bundle/ruby/2.1.0/gems/railties-3.2.17/lib/rails/commands/server.rb:46:in `app'
2014-06-27T12:45:04.346344+00:00 heroku[web.1]: State changed from starting to crashed
2014-06-27T12:45:04.333989+00:00 heroku[web.1]: Process exited with status 1
2014-06-27T12:51:59.960406+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/locomotive/pages/53975f4de98c37aeb3000019/edit" host=heroku.example-com.com request_id=31470f1b-f9ec-4e9e-93f9-b13562f67c0d fwd="71.57.46.246" dyno= connect= service= status=503 bytes=

My updated Gemfile:

source 'https://rubygems.org'

ruby '2.1.2'

gem 'rails', '3.2.17'

# gem 'dragonfly', '1.0.5'
# gem 'locomotivecms_wagon', '1.4.0'

gem 'locomotive_cms', '2.5.4', :require => 'locomotive/engine'

gem 'carrierwave-ftp', :require => 'carrierwave/storage/ftp'
# gem 'carrierwave-mongoid', :require => 'carrierwave/mongoid'

group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'
  gem 'compass-rails',  '~> 1.1.3'
  gem 'uglifier', '>= 1.0.3'
end

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

# Use unicorn as the app server
gem 'unicorn'

# Deploy with Capistrano
gem 'capistrano'

And, if it helps, here's a list of my locally installed gems:

$ gem list

*** LOCAL GEMS ***

actionmailer (3.2.17, 3.2.16)
actionmailer-with-request (0.4.0)
actionpack (3.2.17, 3.2.16)
activemodel (3.2.17, 3.2.16)
activerecord (3.2.17, 3.2.16)
activeresource (3.2.17, 3.2.16)
activesupport (3.2.17, 3.2.16)
arel (3.0.3)
bcrypt (3.1.7)
bcrypt-ruby (3.1.5)
better_errors (1.0.1)
bigdecimal (1.2.4)
bson (1.10.2)
bson_ext (1.10.2)
builder (3.0.4)
bundler (1.6.2)
bundler-unload (1.0.2)
cancan (1.6.7)
capistrano (3.2.1)
carrierwave (0.9.0)
carrierwave-ftp (0.2.6)
carrierwave-mongoid (0.6.3)
cells (3.8.8)
chronic (0.10.2)
chunky_png (1.3.1)
codemirror-rails (3.24)
coderay (1.1.0)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.7.0)
colorize (0.7.3, 0.5.8)
commonjs (0.2.7)
compass (0.12.6)
compass-rails (1.1.7)
custom_fields (2.3.1)
daemons (1.1.9)
devise (2.2.7)
devise-encryptable (0.1.2)
dragonfly (1.0.5, 0.9.15)
ejs (1.0.0)
erubis (2.7.0)
eventmachine (1.0.3)
excon (0.23.0)
execjs (2.2.1, 2.2.0)
executable-hooks (1.3.2)
faker (0.9.5)
flash_cookie_session (1.1.6)
fog (1.12.1)
formatador (0.2.5)
formtastic (2.2.1)
fssm (0.2.10)
gem-wrappers (1.2.5)
haml (4.0.5)
highline (1.6.21)
hike (1.2.3)
httmultiparty (0.3.10)
httparty (0.11.0)
i18n (0.6.9)
io-console (0.4.2)
journey (1.0.4)
jquery-rails (2.1.4)
json (1.8.1)
kaminari (0.14.1)
kgio (2.9.2)
less (2.2.2)
listen (0.7.3)
locomotive-aloha-rails (0.23.2.2)
locomotive-tinymce-rails (3.5.8.2)
locomotive_cms (2.5.4, 2.4.1)
locomotive_liquid (2.4.2)
locomotivecms-liquid (2.6.0)
locomotivecms-solid (0.2.2.1)
locomotivecms_mounter (1.4.0)
locomotivecms_solid (0.2.2)
locomotivecms_wagon (1.4.0)
logger (1.2.8)
mail (2.5.4)
mime-types (1.25.1)
mimetype-fu (0.1.2)
minitest (4.7.5)
money (5.1.1)
mongo (1.10.2)
mongo_session_store-rails3 (4.1.1)
mongoid (3.1.6)
mongoid-grid_fs (1.9.2)
mongoid-tree (1.0.4)
mongoid_migration (0.0.8)
moped (1.5.2)
multi_json (1.7.9)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.1)
net-sftp (2.1.2)
net-ssh (2.9.1)
nokogiri (1.5.11)
origin (1.1.0)
orm_adapter (0.5.0)
polyglot (0.3.5)
pony (1.8)
psych (2.0.5)
rack (1.4.5)
rack-cache (1.2)
rack-gridfs (0.4.1)
rack-ssl (1.3.4)
rack-test (0.6.2)
rails (3.2.17, 3.2.16)
rails-backbone (0.7.2)
railties (3.2.17, 3.2.16)
raindrops (0.13.0)
rake (10.1.0, 10.0.4)
rdoc (4.1.0, 3.12.2)
redcarpet (3.0.0)
RedCloth (4.2.9)
responders (0.9.3)
ruby-hmac (0.4.0)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
sanitize (2.0.3)
sass (3.2.19)
sass-rails (3.2.6)
sprockets (2.2.2)
sprockets-sass (1.0.3)
sshkit (1.5.1)
stringex (2.0.11)
test-unit (2.1.2.0)
thin (1.5.1)
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.39)
uglifier (2.5.1, 2.5.0)
unicorn (4.8.3)
warden (1.2.3)
will_paginate (3.0.5)
zip (2.0.2)

Let me know..

Thanks, cheers!

aeberlin commented 10 years ago

After deleting the app space from Heroku, recreating it, and redeploying everything, things seem to be working. I'm guessing there's a small bug in the heroku deployment routine or something, but since it seems to be capable of fixing itself, I doubt it's serious.

This issue can be closed, thanks for the assistance!

aeberlin commented 10 years ago

After a while, the same error returned. I tried recreating the application on heroku and I'm still encountering problems. Please advise me on how to proceed.

aeberlin commented 10 years ago

Somehow, this problem is now occurring on my development machine now, which I was jerry-rigging to our production database in order to make updates. The error has something to do with the context not being set in various liquid classes in the engine.

Error message snippet:

NoMethodError (undefined method `[]' for nil:NilClass):
  /.../locomotivecms_engine-4f1ceea48d46/lib/locomotive/liquid/tags/inherited_block.rb:10:in `end_tag'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/block.rb:29:in `parse'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:20:in `initialize'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/tags/inherited_block.rb:27:in `initialize'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:11:in `new_with_options'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/block.rb:35:in `parse'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:20:in `initialize'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/tags/inherited_block.rb:27:in `initialize'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:11:in `new_with_options'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/block.rb:35:in `parse'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/document.rb:6:in `initialize'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/template.rb:85:in `new'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/template.rb:85:in `parse'
  /.../locomotivecms_liquid-968cdf3e8a48/lib/liquid/template.rb:71:in `parse'
  /.../locomotivecms_engine-4f1ceea48d46/app/models/locomotive/extensions/page/parse.rb:74:in `parse'
  /.../locomotivecms_engine-4f1ceea48d46/app/models/locomotive/extensions/page/parse.rb:59:in `_parse_and_serialize_template'
  /.../locomotivecms_engine-4f1ceea48d46/app/models/locomotive/extensions/page/parse.rb:47:in `serialize_template'

_ In lib/locomotive/liquid/tags/inherited_block.rb:10, @context is nil.

        def end_tag
          super

          if !self.contains_super?(@nodelist)
            @context[:page].disable_parent_editable_elements(@name) unless @context[:page].nil?
          end
        end

_ I looked a bit further, and found that context was also nil in /app/models/locomotive/extensions/page/parse.rb:74.

        def parse(context = {})
          self.disable_all_editable_elements

          default_context = { site: self.site, page: self, templates: [], snippets: [] }

          context = default_context.merge(context)

          @template = ::Liquid::Template.parse(self.raw_template, context)

          self.template_dependencies  = context[:templates]
          self.snippet_dependencies   = context[:snippets]

          @template.root.context.clear
        end

_ Here is the full error message:

Started PUT "/locomotive/pages/53974610e98c3747eb000004" for 127.0.0.1 at 2014-08-08 15:51:07 -0500
Processing by Locomotive::PagesController#update as JSON
  Parameters: {"xhr"=>"true", "content_locale"=>"en", "page"=>{"id"=>"53974610e98c3747eb000004", "_id"=>"53974610e98c3747eb000004", "created_at"=>"2014-06-10T12:53:20-05:00", "updated_at"=>"2014-08-08T15:42:54-05:00", "title"=>"Site", "slug"=>"index", "position"=>"0", "response_type"=>"text/html", "cache_strategy"=>"none", "redirect"=>"true", "redirect_url"=>"/home", "redirect_type"=>"301", "listed"=>"true", "published"=>"true", "templatized"=>"false", "depth"=>"0", "raw_template"=>"<!DOCTYPE html>\r\n<html lang=\"en\">\r\n{% block 'head' %}\r\n<head>\r\n    <meta charset=\"utf-8\">\r\n    <title>{% if page.seo_title %}{{ page.seo_title }}{% else %}{% if site.seo_title %}{{ site.seo_title }}{% else %}{{ site.name }}{% endif %}{% endif %}</title>\r\n    <link rel=\"shortcut icon\" href=\"/assets/favicon.png\" />\r\n    <link href=\"/assets/application.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\r\n    <script src=\"/assets/jquery-1.7.2.min.js\"></script>\r\n    <script src=\"/assets/jquery.throttle.js\"></script>\r\n    <script src=\"/assets/jquery.reject.js\"></script>\r\n  \r\n    {% block 'resources' %}\r\n  \r\n    {% endblock %}\r\n  \r\n    <!-- {% inline_editor %} -->\r\n  \r\n    <script type=\"text/javascript\" language=\"javascript\">\r\n        document.domain = 'steveresch.com';\r\n        $(document).ready(function () {\r\n          {% unless current_user.logged_in? %}\r\n          $(this).bind('contextmenu', function (e) {\r\n            e.preventDefault();\r\n            return false;\r\n          });\r\n          {% endunless %}\r\n          \r\n          $.reject();\r\n        });       \r\n    </script>\r\n  \r\n    {% block 'scripts' %}\r\n\r\n    {% endblock %}\r\n</head>\r\n{% endblock %}\r\n<body>\r\n\r\n<div class=\"wrapper align_center\">\r\n\r\n<div class=\"header\">\r\n    <a href=\"/home\"><img class=\"logo align_center\" src=\"/assets/logo.png\" /></a>\r\n    <div class=\"nav\">\r\n        <ul>\r\n            <li class=\"{% if page.slug == \"artwork\" or page.parent == \"artwork\" %}active{% endif %}\">\r\n                {% if contents.pieces.empty %}\r\n                  <a href=\"#\" style=\"cursor: default !important;\">artwork</a>\r\n                {% else %}\r\n                  <a href=\"#\" style=\"cursor: default !important;\">artwork</a>\r\n                  <!-- <a href=\"/artwork/all\">artwork</a> -->\r\n                {% endif %}\r\n                <ul>\r\n                    {% for s in contents.series %}\r\n                    {% unless s.pieces.empty %}\r\n                    <li><a href=\"/artwork/{{ s._slug }}\">{{ s.name | escape }}</a></li>\r\n                    {% endunless %}\r\n                    {% endfor %}  \r\n                </ul>\r\n            </li>\r\n            <li class=\"{% if page.slug ==\"biography\" %}active{% endif %}\"><a href=\"/biography\">bio</a></li>\r\n            <li class=\"{% if page.slug ==\"links\" %}active{% endif %}\"><a href=\"/links\">links</a></li>\r\n            <li class=\"{% if page.slug ==\"contact\" %}active{% endif %}\"><a href=\"/contact\">contact</a></li>\r\n        </ul>\r\n    </div>\r\n    <hr class=\"nav_divider\" />\r\n</div>\r\n\r\n{% block 'main' %}\r\n\r\n{% endblock %}\r\n  \r\n<div class=\"footer\">\r\n  <p class=\"align_center\">&copy; 2014 Steven J Resch</p>\r\n</div>\r\n\r\n</div>\r\n{% block 'foot' %}\r\n  \r\n  {% block 'scripts' %}\r\n\r\n  {% endblock %}\r\n  \r\n{% endblock %}\r\n\r\n</body>\r\n</html>\r\n"}, "id"=>"53974610e98c3747eb000004"}
[LocomotiveCMS] [fetch site] host = 0.0.0.0 / 0.0.0.0
  MOPED: 54.196.12.51:10037 QUERY        database=locomotive_production collection=locomotive_sites selector={"$query"=>{}, "$orderby"=>{:_id=>1}} flags=[:slave_ok] limit=-1 skip=0 batch_size=nil fields=nil (49.0918ms)
  MOPED: 54.196.12.51:10037 QUERY        database=locomotive_production collection=locomotive_accounts selector={"$query"=>{"_id"=>"53974604e98c3747eb000001"}, "$orderby"=>{:_id=>1}} flags=[:slave_ok] limit=-1 skip=0 batch_size=nil fields=nil (54.0521ms)
  MOPED: 54.196.12.51:10037 QUERY        database=locomotive_production collection=locomotive_accounts selector={"_id"=>{"$in"=>["53974604e98c3747eb000001"]}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (53.3438ms)
  MOPED: 54.196.12.51:10037 QUERY        database=locomotive_production collection=locomotive_pages selector={"$query"=>{"_id"=>"53974610e98c3747eb000004"}, "$orderby"=>{"position"=>1}} flags=[:slave_ok] limit=0 skip=0 batch_size=nil fields=nil (107.0957ms)
WARNING: Can't mass-assign protected attributes: id, _id
  MOPED: 54.196.12.51:10037 QUERY        database=locomotive_production collection=locomotive_sites selector={"$query"=>{"_id"=>"53974610e98c3747eb000002"}, "$orderby"=>{:_id=>1}} flags=[:slave_ok] limit=-1 skip=0 batch_size=nil fields=nil (53.3710ms)
Completed 500 Internal Server Error in 328.6ms

NoMethodError (undefined method `[]' for nil:NilClass):
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/lib/locomotive/liquid/tags/inherited_block.rb:10:in `end_tag'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/block.rb:29:in `parse'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:20:in `initialize'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/tags/inherited_block.rb:27:in `initialize'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:11:in `new_with_options'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/block.rb:35:in `parse'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:20:in `initialize'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/tags/inherited_block.rb:27:in `initialize'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/tag.rb:11:in `new_with_options'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/block.rb:35:in `parse'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/document.rb:6:in `initialize'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/template.rb:85:in `new'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/template.rb:85:in `parse'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_liquid-968cdf3e8a48/lib/liquid/template.rb:71:in `parse'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/app/models/locomotive/extensions/page/parse.rb:74:in `parse'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/app/models/locomotive/extensions/page/parse.rb:59:in `_parse_and_serialize_template'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/app/models/locomotive/extensions/page/parse.rb:47:in `serialize_template'
  activesupport (3.2.19) lib/active_support/callbacks.rb:418:in `_run__2238496490187049141__validation__4538810832053086152__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in `_run_validation_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  mongoid (3.1.6) lib/mongoid/callbacks.rb:130:in `run_callbacks'
  activemodel (3.2.19) lib/active_model/validations/callbacks.rb:53:in `run_validations!'
  activemodel (3.2.19) lib/active_model/validations.rb:195:in `valid?'
  mongoid (3.1.6) lib/mongoid/validations.rb:84:in `valid?'
  activemodel (3.2.19) lib/active_model/validations.rb:203:in `invalid?'
  mongoid (3.1.6) lib/mongoid/persistence/modification.rb:22:in `prepare'
  mongoid (3.1.6) lib/mongoid/persistence/operations/update.rb:45:in `persist'
  mongoid (3.1.6) lib/mongoid/persistence.rb:150:in `update'
  mongoid (3.1.6) lib/mongoid/persistence.rb:87:in `save'
  mongoid (3.1.6) lib/mongoid/persistence.rb:186:in `update_attributes'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/app/controllers/locomotive/pages_controller.rb:39:in `update'
  actionpack (3.2.19) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (3.2.19) lib/abstract_controller/base.rb:167:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (3.2.19) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
  activesupport (3.2.19) lib/active_support/callbacks.rb:547:in `block in _run__2943664459150525146__process_action__2448539345282610936__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_481'
  activesupport (3.2.19) lib/active_support/core_ext/time/zones.rb:45:in `use_zone'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/lib/locomotive/action_controller/timezone.rb:8:in `set_timezone'
  activesupport (3.2.19) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_481'
  activesupport (3.2.19) lib/active_support/callbacks.rb:513:in `_run__2943664459150525146__process_action__2448539345282610936__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.19) lib/abstract_controller/callbacks.rb:17:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
  activesupport (3.2.19) lib/active_support/notifications.rb:123:in `block in instrument'
  activesupport (3.2.19) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (3.2.19) lib/active_support/notifications.rb:123:in `instrument'
  actionpack (3.2.19) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (3.2.19) lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
  actionpack (3.2.19) lib/abstract_controller/base.rb:121:in `process'
  actionpack (3.2.19) lib/abstract_controller/rendering.rb:45:in `process'
  actionpack (3.2.19) lib/action_controller/metal.rb:203:in `dispatch'
  actionpack (3.2.19) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
  actionpack (3.2.19) lib/action_controller/metal.rb:246:in `block in action'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:73:in `call'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:36:in `call'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:608:in `call'
  railties (3.2.19) lib/rails/engine.rb:484:in `call'
  railties (3.2.19) lib/rails/railtie/configurable.rb:30:in `method_missing'
  journey (1.0.4) lib/journey/router.rb:68:in `block in call'
  journey (1.0.4) lib/journey/router.rb:56:in `each'
  journey (1.0.4) lib/journey/router.rb:56:in `call'
  actionpack (3.2.19) lib/action_dispatch/routing/route_set.rb:608:in `call'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/lib/locomotive/middlewares/inline_editor.rb:10:in `call'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/lib/locomotive/middlewares/seo_trailing_slash.rb:16:in `call'
  mongoid (3.1.6) lib/rack/mongoid/middleware/identity_map.rb:34:in `block in call'
  mongoid (3.1.6) lib/mongoid/unit_of_work.rb:39:in `unit_of_work'
  mongoid (3.1.6) lib/rack/mongoid/middleware/identity_map.rb:34:in `call'
  warden (1.2.3) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.3) lib/warden/manager.rb:34:in `catch'
  warden (1.2.3) lib/warden/manager.rb:34:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
  rack (1.4.5) lib/rack/etag.rb:23:in `call'
  rack (1.4.5) lib/rack/conditionalget.rb:35:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/head.rb:14:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/params_parser.rb:21:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/flash.rb:242:in `call'
  rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context'
  rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/cookies.rb:341:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `_run__24105822215500280__call__4538810832053086152__callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:405:in `__run_callback'
  activesupport (3.2.19) lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
  activesupport (3.2.19) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (3.2.19) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/reloader.rb:65:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.19) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.19) lib/active_support/tagged_logging.rb:22:in `tagged'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/request_id.rb:22:in `call'
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  dragonfly (1.0.5) lib/dragonfly/cookie_monster.rb:9:in `call'
  activesupport (3.2.19) lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/static.rb:63:in `call'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bundler/gems/locomotivecms_engine-4f1ceea48d46/lib/locomotive/middlewares/permalink.rb:17:in `call'
  railties (3.2.19) lib/rails/engine.rb:484:in `call'
  railties (3.2.19) lib/rails/application.rb:231:in `call'
  railties (3.2.19) lib/rails/railtie/configurable.rb:30:in `method_missing'
  unicorn (4.8.3) lib/unicorn/http_server.rb:576:in `process_client'
  unicorn (4.8.3) lib/unicorn/http_server.rb:670:in `worker_loop'
  unicorn (4.8.3) lib/unicorn/http_server.rb:525:in `spawn_missing_workers'
  unicorn (4.8.3) lib/unicorn/http_server.rb:140:in `start'
  unicorn (4.8.3) bin/unicorn_rails:209:in `<top (required)>'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bin/unicorn_rails:23:in `load'
  /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/bin/unicorn_rails:23:in `<top (required)>'
  -e:1:in `load'
  -e:1:in `<main>'

  Rendered /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/gems/actionpack-3.2.19/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.3ms)
  Rendered /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/gems/actionpack-3.2.19/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.6ms)
  Rendered /Users/dev/.rvm/gems/ruby-2.1.2@locomotive/gems/actionpack-3.2.19/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (9.1ms)

_ Note, I am using [very slightly] customized versions of engine and liquid, but the changes I've made shouldn't be affecting things this way. You can compare against them in my github forks.

aeberlin commented 10 years ago

The issue seems to be fixed when I remove my custom branch of liquid, which I thought I had checked.

The only difference between my branch and the official is this commit:

https://github.com/aeberlin/locomotivecms_liquid/commit/968cdf3e8a48a011d320036e8243cc440a9f04af

lib/liquid/standardfilters.rb:

     def remove(input, string)
       input.to_s.gsub(string, '')
     end
+    
+    # remove a substring via regex
+    def regexremove(input, regex_str)
+      input.to_s.gsub(/#{regex_str}/, '')
+    end

     # remove the first occurrences of a substring
     def remove_first(input, string)
did commented 8 years ago

Works fine in V3.