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

After install all I get is twurl: command not found #156

Open
RogerParkinson opened this issue Nov 15, 2020 · 5 comments
Open

After install all I get is twurl: command not found #156

RogerParkinson opened this issue Nov 15, 2020 · 5 comments

Comments

@RogerParkinson
Copy link

Describe the bug
I followed the instructions in install.md ie gem install twurl
and I see:

Successfully installed twurl-0.9.6
Parsing documentation for twurl-0.9.6
Done installing documentation for twurl after 0 seconds
1 gem installed

Then twurl -v to verify it is working:

twurl: command not found

To Reproduce
I'm using Xubuntu 20.04, fairly new install so a fresh install of ruby was required. This is the output of my sudo gem env command:

RubyGems Environment:
  - RUBYGEMS VERSION: 3.1.4
  - RUBY VERSION: 2.7.2 (2020-10-01 patchlevel 137) [x86_64-linux]
  - INSTALLATION DIRECTORY: /root/.gem
  - USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.7.0
  - RUBY EXECUTABLE: /snap/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /root/.gem/bin
  - SPEC CACHE DIRECTORY: /root/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: //etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /root/.gem
     - /snap/ruby/189/lib/ruby/gems/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /snap/bin

Expected behavior
I expected my twurl -v command to print a twurl version

Desktop (please complete the following information):

  • OS: Xubuntu 20.04 (essentially same as Ubuntu 20.04, different UI is all)
  • Browser N/A
  • Version Ruby gems 3.1.4, and twurl 0.9.6

Additional context
I also tried installing from source:

$ git clone https://github.com/twitter/twurl
$ cd twurl
$ bundle install

and got the same result.

@andypiper
Copy link
Contributor

Have you installed the gem as root, or as your regular user? I'd expect the install to have put a link to twurl into your Rubygems PATH, which I'd expect to be on your logged-in user's PATH. Try echo $PATH to check the current value.

@RogerParkinson
Copy link
Author

echo $PATH
/usr/local/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/git-bug:/opt/terraform

(I can't see any reference to ruby on there)

To install ruby I used sudo snap install ruby --classic
Then (as per the install.md file and as I said in the op) I installed twurl using gem install twurl
what should I have done different?

@andypiper
Copy link
Contributor

andypiper commented Nov 17, 2020

Looking at this Ask Ubuntu thread, it looks like you need to have .gem/bin on your PATH. I haven't tested on Ubuntu for a while. There's more information here about how you could configure this for a snap.

@MaxHorstmann
Copy link

MaxHorstmann commented Feb 27, 2021

+1 same issue, tried MacOS and Ubuntu

UPDATE: actually works in an Ubuntu container now

@mcintyre94
Copy link

mcintyre94 commented Apr 18, 2021

I installed Ruby in MacOS using Brew, needed to do echo 'export PATH="/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.zshrc to get gems on my path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants