ruby-packer
ruby-packer copied to clipboard
cannot load such file -- tty-prompt
Hello, after I run the compiler I try to execute the file ./a.out
but I receive the below error for gem tty-prompt
. I've also received the same for pry
in my .rb
file I have
require 'tty-prompt'
and I receive error
/enclose_io_memfs/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- tty-prompt (LoadError) from /__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /enclose_io_memfs/local/prerequisite_runner.rb:4:in `'
I'm using rubyc 0.4.0
and ruby 2.4.1p111
hi, do you know how to force working ./a.out console
when compiling Rails application?
Also experiencing this issue, but for a different dependency:
/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mail (LoadError) from /__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /__enclose_io_memfs__/local/test-scriptl.rb:4:in `<main>'
I tried another application and still receive dependency errors
/__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- aws-sdk (LoadError)
from /__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /__enclose_io_memfs__/local/organize_logs.rb:1:in `<top (required)>'
from /__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /__enclose_io_memfs__/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /__enclose_io_memfs__/local/manual_start.rb:2:in `<main>'
@iamsimakov I do not, I do not understand what is wrong... This is my directory tree:
app
├── Gemfile
├── Gemfile.lock
├── auto_pilot.rb
├── config
│ └── auto_pilot_config.yml.example
├── manual_start.rb
├── organize_logs.rb
└── readme.md
in which I stalled rubyc
one directory up so I run with command
./rubyc -o app/a.out app/manual_start.rb
but I get the require error anyway...
hi @Awatatah in my case I use rails runner '<some ruby code>'
for one line script.
and about your question. Maybe create Gemfile with one dependency aws-sdk
, one Gemfile.lock from it and simple one line ruby script with text: require
aws-sdk``. Run bundle
, start script. And after trying to build it with rubyc.
I think it's one problem with #39