larsch/ocra

ocra isn't working at all

Closed this issue · 2 comments

I've tried pack my ruby file with ocra but it stops every time. Terminal outputs this:

/usr/local/rvm/gems/ruby-2.6.3/gems/ocra-1.3.10/bin/ocra:20: warning: already initialized constant File::ALT_SEPARATOR
=== Loading script to check dependencies
=== Attempting to trigger autoload of Gem::DependencyList
=== Attempting to trigger autoload of Gem::Installer
=== Attempting to trigger autoload of Gem::Licenses
=== Attempting to trigger autoload of Gem::SpecFetcher
=== Attempting to trigger autoload of Gem::SourceList
=== Attempting to trigger autoload of Bundler::Deprecate
=== Attempting to trigger autoload of Bundler::Resolver
=== Attempting to trigger autoload of Bundler::Definition
=== Attempting to trigger autoload of Bundler::DepProxy
=== Attempting to trigger autoload of Bundler::Dsl
=== Attempting to trigger autoload of Bundler::EndpointSpecification
=== Attempting to trigger autoload of Bundler::Env
=== Attempting to trigger autoload of Bundler::Fetcher
=== Attempting to trigger autoload of Bundler::FeatureFlag
=== Attempting to trigger autoload of Bundler::GemHelper
=== Attempting to trigger autoload of Bundler::GemVersionPromoter
=== Attempting to trigger autoload of Bundler::GemRemoteFetcher
=== Attempting to trigger autoload of Bundler::Index
=== Attempting to trigger autoload of Bundler::Graph
=== Attempting to trigger autoload of Bundler::LazySpecification
=== Attempting to trigger autoload of Bundler::Installer
=== Attempting to trigger autoload of Bundler::Injector
=== Attempting to trigger autoload of Bundler::RemoteSpecification
=== Attempting to trigger autoload of Bundler::Retry
=== Attempting to trigger autoload of Bundler::RubyGemsGemInstaller
=== Attempting to trigger autoload of Bundler::ProcessLock
=== Attempting to trigger autoload of Bundler::Runtime
=== Attempting to trigger autoload of Bundler::RubyVersion
=== Attempting to trigger autoload of Bundler::SpecSet
=== Attempting to trigger autoload of Bundler::StubSpecification
=== Attempting to trigger autoload of Bundler::VersionRanges
=== Attempting to trigger autoload of Bundler::SourceList
=== Attempting to trigger autoload of Bundler::URICredentialsFilter
=== Attempting to trigger autoload of Bundler::UI
=== Attempting to trigger autoload of Bundler::Plugin::API::Source
=== Attempting to trigger autoload of Bundler::Plugin::DSL
=== Attempting to trigger autoload of Bundler::Plugin::Events
=== Attempting to trigger autoload of Bundler::Plugin::Index
=== Attempting to trigger autoload of Bundler::Plugin::Installer
=== Attempting to trigger autoload of Bundler::Plugin::SourceList
=== Attempting to trigger autoload of Matrix::EigenvalueDecomposition
=== Attempting to trigger autoload of Matrix::LUPDecomposition
=== Attempting to trigger autoload of Bundler::Thor::Group
=== Attempting to trigger autoload of Bundler::Thor::Actions
=== Attempting to trigger autoload of Bundler::Thor::RakeCompat
=== Attempting to trigger autoload of Bundler::Thor::Basic
=== Attempting to trigger autoload of Bundler::Thor::Color
=== Attempting to trigger autoload of Bundler::Thor::HTML
=== Attempting to trigger autoload of CGI::HtmlExtension
=== Attempting to trigger autoload of Bundler::Source::Gemspec
=== Attempting to trigger autoload of Bundler::Source::Metadata
=== Attempting to trigger autoload of Bundler::Source::Git::Installer
=== Attempting to trigger autoload of Bundler::Source::Rubygems::Remote
=== Attempting to trigger autoload of Bundler::Plugin::Installer::Git
=== Attempting to trigger autoload of Bundler::Plugin::Installer::Rubygems
=== Attempting to trigger autoload of Bundler::Fetcher::Downloader
=== Attempting to trigger autoload of Bundler::UI::RGProxy
=== Attempting to trigger autoload of Bundler::UI::Silent
=== Attempting to trigger autoload of Bundler::UI::Shell
=== Attempting to trigger autoload of Bundler::Settings::Mirror
=== Attempting to trigger autoload of Bundler::Settings::Validator
=== Detected gem did_you_mean-1.3.0 (loaded, files)
=== 	19 files, 20261 bytes
=== Detected gem executable-hooks-1.6.0 (loaded, files)
=== 	11 files, 6376 bytes
=== Detected gem bundler-unload-1.0.2 (loaded, files)
=== 	4 files, 1683 bytes
=== Detected gem rubygems-bundler-1.4.5 (loaded, files)
=== 	7 files, 6035 bytes
=== Detected gem bundler-1.17.3 (loaded, files)
=== 	1 files, 949 bytes
=== Detected gem etc-1.0.1 (loaded, files)
=== WARNING: Gem etc-1.0.1 root folder was not found, skipping
=== Detected gem ocra-1.3.10 (loaded, files)
=== 	5 files, 210830 bytes
=== Detected gem mathn-0.1.0 (loaded, files)
=== 	12 files, 87873 bytes
=== Detected gem cmath-1.0.0 (loaded, files)
=== WARNING: Gem cmath-1.0.0 root folder was not found, skipping
=== Detected gem matrix-0.1.0 (loaded, files)
=== WARNING: Gem matrix-0.1.0 root folder was not found, skipping
=== Detected gem e2mmap-0.1.0 (loaded, files)
=== WARNING: Gem e2mmap-0.1.0 root folder was not found, skipping
=== Detected gem prime-0.1.0 (loaded, files)
=== WARNING: Gem prime-0.1.0 root folder was not found, skipping
=== Detected gem forwardable-1.2.0 (loaded, files)
=== WARNING: Gem forwardable-1.2.0 root folder was not found, skipping
=== Detected gem ruby2d-0.9.2 (loaded, files)
=== 	267 files, 39691074 bytes
=== Detected gem fileutils-1.1.0 (loaded, files)
=== WARNING: Gem fileutils-1.1.0 root folder was not found, skipping
=== Detected gem ipaddr-1.2.2 (loaded, files)
=== WARNING: Gem ipaddr-1.2.2 root folder was not found, skipping
=== Detected gem openssl-2.1.2 (loaded, files)
=== WARNING: Gem openssl-2.1.2 root folder was not found, skipping
=== Detected gem stringio-0.0.2 (loaded, files)
=== WARNING: Gem stringio-0.0.2 root folder was not found, skipping
=== Detected gem zlib-1.0.0 (loaded, files)
=== WARNING: Gem zlib-1.0.0 root folder was not found, skipping
=== Detected gem date-2.0.0 (loaded, files)
=== WARNING: Gem date-2.0.0 root folder was not found, skipping
=== Detected gem strscan-1.0.0 (loaded, files)
=== WARNING: Gem strscan-1.0.0 root folder was not found, skipping
=== Detected gem rake-12.3.2 (loaded, files)
=== 	48 files, 125476 bytes
=== Detected gem ostruct-0.1.0 (loaded, files)
=== WARNING: Gem ostruct-0.1.0 root folder was not found, skipping
=== Including 59 encoding support files (7516536 bytes, use --no-enc to exclude)
Traceback (most recent call last):
	4: from /usr/local/rvm/gems/ruby-2.6.3/gems/ocra-1.3.10/bin/ocra:1203:in `block in <top (required)>'
	3: from /usr/local/rvm/gems/ruby-2.6.3/gems/ocra-1.3.10/bin/ocra:770:in `build_exe'
	2: from /usr/local/rvm/gems/ruby-2.6.3/gems/ocra-1.3.10/bin/ocra:770:in `each'
	1: from /usr/local/rvm/gems/ruby-2.6.3/gems/ocra-1.3.10/bin/ocra:787:in `block in build_exe'
/usr/local/rvm/gems/ruby-2.6.3/gems/ocra-1.3.10/bin/ocra:42:in `relative_path_from': undefined method `path' for "/usr/local/rvm/gems/ruby-2.6.3":String (NoMethodError)
Did you mean?  pathmap

What? Ruby found error inside itself?``

I also have this issue.

   # Compute the relative path from the 'src' path (directory) to 'tgt'
    # (directory or file). Return the absolute path to 'tgt' if it can't
    # be reached from 'src'.
    def relative_path_from(other)
      a = @path.split(SEPARATOR_PAT)
      b = other.path.split(SEPARATOR_PAT)
      while a.first && b.first && Pathname.pathequal(a.first, b.first)
        a.shift
        b.shift
      end
      return other if Pathname.new(b.first).absolute?
      b.size.times { a.unshift '..' }
      return Pathname.new(a.join('/'))
    end

The relative_path_from is getting a string and failing

Hyperbole subject. It works fine in it's intended environment.

Pathname issue fixed in fbd53dc.