Comments (6)
I've taken a look at this and here are my findings:
- the error is easy to replicate with the following:
ruby -S irb #=> no Ruby script found in input (LoadError)
- from
ruby --help
the-S
switch "look(s) for the script using PATH environment variable" - the PATH environment variable will start with
$HOME/.asdf/bin:/$HOME/.asdf/shims
- therefore the "script"
irb
it tries to invoke is the shim located in/Users/your_username/.asdf/shims
- the script located at
$HOME/.asdf/shims/irb
is not a ruby script, it's a batch script -- as a shim it will callasdf-exec
to execute the script against the version of ruby specified in.tool-versions
- because it's not a ruby script (i.e. does not start with
#!/usr/bin/env ruby
), it results in the errorno Ruby script found in input (LoadError)
- what we really want is to execute the script, in the case
irb
, from the installed ruby e.g.$HOME/.asdf/installs/ruby/2.3.2/bin
I've come up with a solution that resolves the error, but unsure if this is the direction you would like to take. I've simply prepended the install_path of the desired ruby version to PATH
at the end of $HOME/.asdf/plugins/ruby/bin/exec-env
. This is the line I appended:
export PATH=$install_path/bin:$PATH
The path could be prepended conditionally based on the -S
switch being present. If this is acceptable solution I'm happy to create a PR for https://github.com/asdf-vm/asdf-ruby. Please let me know.
from asdf.
Just found this issue when trying to run rake cucumber
on a Rails project. Got around it meanwhile running cucumber
directly without rake.
from asdf.
Hi,
Please can someone kindly provide an update with regards to this issue?
The workaround suggested by @nicholasjhenry works perfectly well for me but I really don't like have to hack installed files in this way.
Given this was raised around 3 months ago can I be so bold as to suggest you either accept a pull request or you close this issue.
Keep up the fantastic work though - asdf is a fantastic tool!
Thanks.
from asdf.
@cmckni3 Thanks for reporting. I'll look into it today.
from asdf.
Same problem here. Any progress?
from asdf.
@nicholasjhenry this work for me. Thanks a lot.
from asdf.
Related Issues (20)
- bug: nushell `def-env` is deprecated HOT 1
- bug: Can't add plugin R HOT 2
- bug: `asdf latest <plugin>` and `asdf latest --all` are sometimes inconsistent
- bug: asdf says "no preset version installed" but it is HOT 3
- Document supported operating systems. HOT 2
- Repo README lint test status badges affect anchor URL HOT 2
- bug: Unable to install erlang without IPv4 HOT 1
- What is `.asdfrc`? HOT 2
- bug: asdf current <tool> is not report correctly HOT 2
- bug: Do not hardcode `master` branch
- A support for command aliases HOT 1
- bug: Bad error message
- Support things like Brewfile HOT 1
- bug: "which" parameter cannot find
- recursive upward search HOT 2
- bug: getting "You have configured asdf to preserve downloaded files" when I don't HOT 5
- Allow running tools from one another without passing `ASDF_DATA_DIR` around
- Add the ability to track which versions are in use HOT 1
- bug: The terminal in VS Code cannot find the ruby version installed by asdf (again)
- bug: tool installed in global nodejs are not available in project with a different nodejs version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asdf.