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

Issue with travis caching and ruby 2.2.1-3 #28

Closed
jcoyne opened this issue Sep 18, 2015 · 2 comments
Closed

Issue with travis caching and ruby 2.2.1-3 #28

jcoyne opened this issue Sep 18, 2015 · 2 comments

Comments

@jcoyne
Copy link
Collaborator

jcoyne commented Sep 18, 2015

Seems to work okay if I turn off caching or use ruby 2.2.0

Errno::ENOENT: No such file or directory @ sys_fail2 - (/tmp/d20150918-4121-3d593j/internal, ./spec/internal)

/home/travis/build/projecthydra/hydra-editor/vendor/bundle/ruby/2.2.0/gems/engine_cart-0.7.1/lib/engine_cart/tasks/engine_cart.rake:45:in `block (3 levels) in <top (required)>'

/home/travis/build/projecthydra/hydra-editor/vendor/bundle/ruby/2.2.0/gems/engine_cart-0.7.1/lib/engine_cart/tasks/engine_cart.rake:29:in `block (2 levels) in <top (required)>'

/home/travis/build/projecthydra/hydra-editor/vendor/bundle/ruby/2.2.0/gems/engine_cart-0.7.1/lib/engine_cart/tasks/engine_cart.rake:85:in `block (2 levels) in <top (required)>'

/home/travis/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'

/home/travis/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

Tasks: TOP => engine_cart:create_test_rails_app
@jcoyne
Copy link
Collaborator Author

jcoyne commented Sep 18, 2015

Related to travis-ci/travis-ci#4822

jcoyne added a commit to samvera/hydra-head that referenced this issue May 5, 2016
jcoyne added a commit to samvera/hydra-head that referenced this issue May 5, 2016
@atz
Copy link

atz commented Jun 16, 2016

FileUtils.move should be consistently reliable on all modern rubies including the line in question:

FileUtils.move "#{dir}/internal", "#{EngineCart.destination}"

It has seemingly nothing to do with ruby version or bundler caching. Either we have a generated rails app dir to move or we don't. The error says we don't. I thereby conclude that the preceeding rails new call is failing in some unanticipated way, where bundler caching seems plausibly in play.

We should check for the internal dir having been created and abort if missing. Instead, we check $?, which is meaningless in this context. Example via irb:

2.2.0 :001 > `bullshit`
Errno::ENOENT: No such file or directory - bullshit
    from (irb):1:in ``'
    from (irb):1
    from /Users/atz/.rvm/rubies/ruby-2.2.0/bin/irb:11:in `<main>'
2.2.0 :002 > $?
 => #<Process::Status: pid 17660 exit 127> 
2.2.0 :003 > puts "abort?" unless $?
 => nil 
2.2.0 :004 > puts "abort!" unless $?.success?
abort!

We probably want $?.success?, though I would also explicitly check for the newly created directory.

This only defers the more material question: rails new, Y U NO WORK? Would really help to have the output/stderr in our build log and not swallowed by backticks, ideally bracketed by:

puts "travis_fold:start:enginecart-rails-new\r" if ENV['TRAVIS'] == 'true'
...
puts "travis_fold:end:enginecart-rails-new\r" if ENV['TRAVIS'] == 'true'

Then it auto-collapses in Travis.

@jcoyne jcoyne closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2023
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

2 participants