0

I'm having a problem with my LocomotiveCMS site crashing whenever I deploy to Heroku. The site is quite old and had been working fine for several years, until I was forced to upgrade to a newer Heroku stack. This required upgrading Ruby and LCMS versions. My site runs fine locally but crashes on start up when deployed to Heroku with the following log messages:

2022-11-01T15:48:54.268743+00:00 heroku[web.1]: Starting process with command bundle exec rackup config.ru -p ${PORT:-5000} 2022-11-01T15:48:55.623656+00:00 app[web.1]: bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.7.0/bin/rackup) 2022-11-01T15:48:55.623933+00:00 app[web.1]: /app/config.ru:1:in require': cannot load such file -- locomotive/wagon/standalone_server (LoadError) 2022-11-01T15:48:55.623962+00:00 app[web.1]: from /app/config.ru:1:in block in ' 2022-11-01T15:48:55.623964+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in eval' 2022-11-01T15:48:55.623973+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:116:in new_from_string' 2022-11-01T15:48:55.623976+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:105:in load_file' 2022-11-01T15:48:55.623985+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/builder.rb:66:in parse_file' 2022-11-01T15:48:55.623987+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:349:in build_app_and_options_from_config' 2022-11-01T15:48:55.624007+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:249:in app' 2022-11-01T15:48:55.624009+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:422:in wrapped_app' 2022-11-01T15:48:55.624019+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:312:in block in start' 2022-11-01T15:48:55.624021+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:379:in handle_profiling' 2022-11-01T15:48:55.624031+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:311:in start' 2022-11-01T15:48:55.624033+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/lib/rack/server.rb:168:in start' 2022-11-01T15:48:55.624042+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/rack-2.2.4/bin/rackup:5:in <top (required)>' 2022-11-01T15:48:55.624044+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/bin/rackup:23:in load' 2022-11-01T15:48:55.624054+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/bin/rackup:23:in <top (required)>' 2022-11-01T15:48:55.624056+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in load' 2022-11-01T15:48:55.624065+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:58:in kernel_load' 2022-11-01T15:48:55.624067+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli/exec.rb:23:in run' 2022-11-01T15:48:55.624077+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli.rb:483:in exec' 2022-11-01T15:48:55.624079+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 2022-11-01T15:48:55.624088+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command' 2022-11-01T15:48:55.624090+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 2022-11-01T15:48:55.624099+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli.rb:31:in dispatch' 2022-11-01T15:48:55.624121+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 2022-11-01T15:48:55.624123+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/cli.rb:25:in start' 2022-11-01T15:48:55.624132+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/exe/bundle:48:in block in <top (required)>' 2022-11-01T15:48:55.624134+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/lib/bundler/friendly_errors.rb:103:in with_friendly_errors' 2022-11-01T15:48:55.624143+00:00 app[web.1]: from /app/vendor/bundle/ruby/2.7.0/gems/bundler-2.3.10/exe/bundle:36:in <top (required)>' 2022-11-01T15:48:55.624145+00:00 app[web.1]: from /app/vendor/bundle/bin/bundle:113:in load' 2022-11-01T15:48:55.624155+00:00 app[web.1]: from /app/vendor/bundle/bin/bundle:113:in `' 2022-11-01T15:48:55.774101+00:00 heroku[web.1]: Process exited with status 1 2022-11-01T15:48:55.849654+00:00 heroku[web.1]: State changed from starting to crashed

I'm using Heroku-20 stack, Ruby 2.7.6 and gem locomotivecms_wagon 3.1.1 The site runs fine locally (using bundle exec wagon serve)

I've tried the Heroku-18 stack with the same result. I haven't been able to get the latest Heroku stack (22) to work as there is a Ruby version clash with LocomotiveCMS.

I tried using a Procfile (which I never needed before) - I used the standard puma Procfile as shown in the Heroku doc but couldn't get that to work either.

I've also tried deleting Gemfile.lock, running bundle install and bundle update, but no change.

nickhj28
  • 1
  • 2
  • When you say it works locally, are starting it in the production ENV locally to test? Just looking at it it looks like the real issue is this `require': cannot load such file -- locomotive/wagon/standalone_server` Did the GEM update and change at all? – Rockwell Rice Nov 01 '22 at 16:45
  • Thanks for responding - I agree it's the standalone_server error that is the real issue, as I just tried using thin server (via Procfile) and got the same error. As for running locally, I just run 'bundle exec wagon serve', sorry not sure if that starts the production ENV (I would guess not but I'm stretching my technical knowledge here!) Also when you say did the GEM update, how do you mean? – nickhj28 Nov 01 '22 at 16:54
  • I thought locomotiveCMS was a gem, if I am wrong just ignore that – Rockwell Rice Nov 02 '22 at 02:16
  • I'm using the latest locomotivecms_wagon gem (3.1.1), previously was on 1.5.something – nickhj28 Nov 02 '22 at 13:35

0 Answers0