ruby-packer icon indicating copy to clipboard operation
ruby-packer copied to clipboard

cannot load such file -- tty-prompt

Open Awatatah opened this issue 6 years ago • 6 comments

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

Awatatah avatar Jun 22 '18 14:06 Awatatah

hi, do you know how to force working ./a.out console when compiling Rails application?

iamsimakov avatar Jul 07 '18 10:07 iamsimakov

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>'

tresacton avatar Aug 21 '18 05:08 tresacton

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>'

Awatatah avatar Aug 29 '18 22:08 Awatatah

@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...

Awatatah avatar Aug 29 '18 23:08 Awatatah

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.

iamsimakov avatar Aug 31 '18 16:08 iamsimakov

I think it's one problem with #39

iamsimakov avatar Sep 01 '18 23:09 iamsimakov