Giter Club home page Giter Club logo

Comments (11)

sstephenson avatar sstephenson commented on May 12, 2024

Went with the $PATH option since it's far simpler. 2a495dc

from rbenv.

gnufied avatar gnufied commented on May 12, 2024

I think this problem is back with bundler pre. I am getting:

/models/user_spec.rb
/Users/gnufied/.rbenv/versions/1930/bin/ruby: no Ruby script found in input (LoadError)
rake aborted!

I am running latest version of rbenv with ruby 1.9.3.

from rbenv.

alsemyonov avatar alsemyonov commented on May 12, 2024

Same error occurs with Ruby 1.9.3 and bundler --pre

from rbenv.

secretfader avatar secretfader commented on May 12, 2024

Not to pile on, but I'm having this issue too. Any insight?

from rbenv.

artemave avatar artemave commented on May 12, 2024

+1

% rake spec
...
/Users/artem/.rbenv/versions/1.9.3-p392/bin/ruby: no Ruby script found in input (LoadError)
rake aborted!
/Users/artem/.rbenv/versions/1.9.3-p392/bin/ruby -S rspec ./spec/browser/pagination_spec.rb ...

Which is no wonder (as I understand it) since rspec is a shim, and not a ruby script.

% which rspec                                                                                                                                                                     
/Users/artem/.rbenv/shims/rspec

from rbenv.

zenspider avatar zenspider commented on May 12, 2024

Looks like this should be reopened since #372 seems to have been reverted?

from rbenv.

mislav avatar mislav commented on May 12, 2024

No, this is not an issue presently even though that PR got reverted. The current Ruby version's bin directory gets pushed onto PATH as soon as you invoke ruby, so in fact the -S flag always has the desired effect.

The difficult problem seems to be allowing shelling out to a different version of Ruby while preserving ruby -S compatibility.

from rbenv.

zenspider avatar zenspider commented on May 12, 2024

Well, I hate to break it to you, but this problem seems to have regressed:

[...]
cd pkg/graphics-1.0.0b4
  Successfully built RubyGem
  Name: graphics
  Version: 1.0.0b4
  File: graphics-1.0.0b4.gem
mv graphics-1.0.0b4.gem ..
cd -
/Users/ryan/.rbenv/versions/2.0.0-p645/bin/ruby -S gem push pkg/graphics-1.0.0b4.gem
/Users/ryan/.rbenv/versions/2.0.0-p645/bin/ruby: no Ruby script found in input (LoadError)
rake aborted!

That's using (tried and true) Hoe to release one of my gems. It releases fine via system ruby and fails as above when using rbenv. This from rbenv to rbenv, same version. It uses Gem.ruby to specify the full path to the ruby binary. which gem points to the shims directory, but that might be different by the time this comes around via ruby.

from rbenv.

mislav avatar mislav commented on May 12, 2024

Is the above a shell script? What executes it/what generated it?

from rbenv.

zenspider avatar zenspider commented on May 12, 2024

The ruby in question is literally: sh Gem.ruby, "-S", "gem", "push", g (where g is the path of the gem to push).

from rbenv.

mislav avatar mislav commented on May 12, 2024

I just tried to reproduce it with this Rakefile but can't:

task :hey do
  sh Gem.ruby, '-S', 'gem', 'env'
end

What runs the rake task exactly?

from rbenv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.