Ask Your Question
0

Gem installs always binaries to ~/bin instead of ~/.gem/ruby/RUBYVERS/bin

asked 2016-05-04 03:23:56 -0500

flexo3001 gravatar image

Hi, i'm trying to install some ruby gems but the binaries always lands in ~/bin. I read the documentation and used the command gem install --user-install GEMNAME which doesn't work. Afterwards i tried to create an config file in /etc/gemrc & ~/.gemrc with gem: --user-install which doesn't work either. How can i achieve that the binaries will be installed to ~/.gem/ruby/RUBYVERSION/bin in Fedora?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-05-04 08:21:54 -0500

aeperezt gravatar image

If you use gem install as root or with sudo it will install it on root folders like /usr/lib and /usr/share so you need to use gem install as your user then it will place it on ~/.gem/ another way is to use bundle and Gemfile on you project when you run bundle as a user you can define where you can install your gems like the vender folder in your project folder.

Hope this help.

edit flag offensive delete link more

Comments

Unfortunately no because i don't wanted to use bundle. I think i found the problem: http://pkgs.fedoraproject.org/cgit/rp... I don't know why this is set up like this. Now i need to find a way to override the overrride.

flexo3001 gravatar imageflexo3001 ( 2016-05-04 15:00:27 -0500 )edit

I cannot reproduce you issue used gem install sequel and it installed sequel-4.34.0 that is the recent one and install on home. Only diff I'm using Fedora 24

aeperezt gravatar imageaeperezt ( 2016-05-04 15:13:28 -0500 )edit

Hmm, my environment looks strange. gem env. Anyway i can set the path with gem: --bin-dir ~/PATH-TO-BINDIR inside a ~/.gemrc.

flexo3001 gravatar imageflexo3001 ( 2016-05-04 15:38:50 -0500 )edit

Only difference I see is the ruby and rubygem version all look the same

aeperezt gravatar imageaeperezt ( 2016-05-04 18:07:41 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-04 03:23:56 -0500

Seen: 240 times

Last updated: May 04 '16