Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot load timetrap #159

Closed
ToadJamb opened this issue Apr 3, 2017 · 6 comments
Closed

cannot load timetrap #159

ToadJamb opened this issue Apr 3, 2017 · 6 comments

Comments

@ToadJamb
Copy link

ToadJamb commented Apr 3, 2017

I get the following error after installing timetrap and attempting to run it from the command line:

cannot load such file -- timetrap: ["/home/toadjamb/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'", "/home/toadjamb/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'", "/home/toadjamb/.rvm/gems/ruby-2.3.3@global/gems/timetrap-1.14.1/bin/timetrap:3:in `<top (required)>'", "/home/toadjamb/.rvm/gems/ruby-2.3.3@global/bin/timetrap:22:in `load'", "/home/toadjamb/.rvm/gems/ruby-2.3.3@global/bin/timetrap:22:in `<main>'"]

I have other systems that I have used to run timetrap for quite some time with no issues. It's entirely possible that it's a problem with my environment, but I'm not sure what it would be as other executable gems (bundler, rake, plus some I created myself, etc) seem to run just fine.

One curious point is that the error raised is a SystemExit and not a LoadError, so the rescue block in the binary never gets hit. If I remove require 'timetrap' and just use the code in the rescue block, timetrap runs just fine. I'm not 100% sure this is a timetrap issue, but other executable gems in my global gemset appear to work fine, so that leads me to think that maybe it is.

@jostber
Copy link

jostber commented Apr 25, 2017

I had a similar experience on a machine with cygwin yesterday after a Ruby upgrade. Had then to install ruby-dev and then "gem install bigdecimal" to make it work again.

@michaelb87
Copy link

Same problem on Ubuntu 17.04
ruby-dev is installed

@ToadJamb
Copy link
Author

ToadJamb commented Jul 1, 2017

I would be extremely hesitant to look toward installation of ruby-dev as a 'fix'. It is a project that has not been updated in 5 years (at the time that I write this), has a readme that references only 1.9.3-p194 as a supported ruby (which itself has been unsupported for over 2 years), AND is a project specifically for deploying ruby on rails apps, which means that if it DOES somehow affect other gem binaries, that's probably not a good thing.

@samg
Copy link
Owner

samg commented Jul 7, 2017

I was able to replicate this issue. As far as I can tell it's related to some subtle difference in how load_paths are set up in new ruby installs. I believe I've fixed the issue in https://rubygems.org/gems/timetrap/versions/1.14.2 by updating the syntax for requiring the timetrap lib files relative to the bin.

Could you let me know if this resolves the error on your install and close out the issue if so.

Thanks!

@michaelb87
Copy link

Confirming, it works again.

Thx

@jostber
Copy link

jostber commented Sep 19, 2017

Seems this can be closed.

@samg samg closed this as completed Sep 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants