Deploying a rails 6 app which has tested green.
Expected same behaviour in production after deployment as in production, of course.
However, in production, when starting, fails with the following result:
LoadError: cannot load such file -- rb-readline
[path]/shared/vendor/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33:in `require'
[path]/shared/vendor/bundle/ruby/2.6.0/gems/zeitwerk-2.2.1/lib/zeitwerk/kernel.rb:23:in `require' [$PATH]/ta.rb:19:in `<top (required)>'
rb-readline exists in the Gemfile:
$ grep rb-readline Gemfile.lock
rb-readline (0.5.5)
rb-readline
The require sequence is:
require 'pp'
require 'thor'
require 'ostruct'
require 'colorize'
require './config/environment'
require 'ta_thor'
require 'rb-readline'
require 'history_cache'
require 'grumples_module'
There are no issues in development mode. Only fails in production mode.
Production enviroment summary:
rake about
Rake: Load benchmark (in seconds)
user system total real
0.396619 0.084458 0.483907 ( 0.487172).
About your application's environment
Rails version 6.0.1
Ruby version ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
RubyGems version 3.0.3
Rack version 2.0.7
JavaScript Runtime mini_racer (V8)
Middleware ActionDispatch::HostAuthorization, Rack::Sendfile, ActionDispatch::Executor, ActiveSupport::Cache::Strategy::LocalCache::Middleware, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, ActionDispatch::RemoteIp, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::ActionableExceptions, ActionDispatch::Callbacks, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ContentSecurityPolicy::Middleware, Rack::Head, Rack::ConditionalGet, Rack::ETag, Rack::TempfileReaper, Warden::Manager, ExceptionNotification::Rack
Application root [path]
Environment production
Database adapter mysql2
Database schema version 20190213065900
I'm stumped.
The production gem env output is:
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.6
- RUBY VERSION: 2.6.5 (2019-10-01 patchlevel 114) [x86_64-linux]
- INSTALLATION DIRECTORY: [*** home dir ***]/.gem/ruby/2.6.5
- USER INSTALLATION DIRECTORY: [*** home dir ***]/.gem/ruby/2.6.0
- RUBY EXECUTABLE: [*** home dir ***]/.rubies/ruby-2.6.5/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: [*** home dir ***]/.gem/ruby/2.6.5/bin
- SPEC CACHE DIRECTORY: [*** home dir ***]/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: [*** home dir ***]/.rubies/ruby-2.6.5/etc
...
ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
and I'm still stumped.