Questions tagged [rvmsudo]

rvmsudo is part of the Ruby Version Manager (rvm). It runs sudo, by default as the superuser, while preserving Ruby-relevant environment variables.

rvmsudo is installed as part of RVM. Sudo normally only preserves a small number of environment variables unless run with the -E option. rvmsudo preserves Ruby-relevant variables like GEM_PATH, RUBYLIB and rvm_path which affect the operation of Ruby, RubyGems and/or RVM itself.

That allows running Ruby scripts with superuser privileges under rvm without finding a way to pass all those environment variables manually.

Like sudo itself, rvmsudo should be used with great care to avoid security problems.

9 questions
3
votes
3 answers

rvm .rvmrc file generation impossible

I have created a rails3 app using rvm a few month ago. Everything works fine. Now, I want to create another rails3 app. So I done : $> rails new my_app Everything works fine. Next, I wanted to link my app with rvm, so I tryed this: $> ruby -v …
Jérémy Pouyet
  • 1,989
  • 6
  • 28
  • 55
1
vote
0 answers

Best practices for using RVM to run Ruby on Rails 5 on a web server

I realize that this question has already been asked a million times, but after days of searching I am still yet to find a suitable answer. I would like to run Ruby on Rails 5 on Centos 7. The default Ruby currently packaged with Centos 7 is 2.0.0.…
Vadim
  • 1,916
  • 2
  • 19
  • 39
1
vote
1 answer

Installing a gem (rvm_gem) from a private gem repository with Chef?

I am actually having an issue while trying to write a configuration in Chef. I have wrote a gem on my own, and pushed it to a private repository using Gem In A Box. My recipe installs RVM and ruby successfully, but fails when tries to install the…
0
votes
0 answers

How to load rvm installed on /usr/local

I have a issue installing rvm in a server. I've installed rvm with a sudo user on /usr/local but when I enter with another user I get this rvm No command 'rvm' found, but there are 26 similar ones rvm: command not found By the way that user is on…
Horacio
  • 2,865
  • 1
  • 14
  • 24
0
votes
1 answer

Why rvmsudo is needed to install passenger

I have browsed around but unable to find why rvmsudo is needed for passenger installation. I am installing passenger with nginx in my server and I'm using RVM. According to the passenger user manual I need to use rvmsudo to install passenger if I…
ConfusedUser
  • 351
  • 1
  • 4
  • 14
0
votes
1 answer

Understanding rubygems 'require' in sudo vs rvmsudo

I'm using Ubuntu 12.04.4 TLS I wrote a simple shell script in /home/abdo/sample_serv.sh that executes a Ruby file: #!/bin/bash /home/abdo/.rvm/rubies/ruby-2.1.0/bin/ruby /home/abdo/sample_serv.rb and /home/abdo/sample_serv.rb containing the code…
Abdo
  • 13,549
  • 10
  • 79
  • 98
0
votes
1 answer

codekit external compass compiler path

I'm working on someone else's project that was built in wordpress and foundation with compass. I only need to change one line of css, but Codekit keeps throwing up "unable to compile files" messages whenever I save the .scss file. I know that…
user3173756
  • 53
  • 2
  • 6
0
votes
2 answers

rvmsudo unicorn_rails -c config/unicorn/production.rb -D --env production is not working

I have installed new ec2-instance for production server when i tried the following command in the current folder [ec2-user@ip-xx-xxx-xxx-xxx current]$ rvmsudo unicorn_rails -c config/unicorn/production.rb -D --env production sudo:…
krs
  • 1,467
  • 5
  • 17
  • 30
0
votes
1 answer

rvmsudo gem install capistrano

When running rvmsudo gem install capistrano I get this warning: Warning: can not check `/etc/sudoers` for `secure_path`, falling back to call via `/usr/bin/env`, this breaks rules from `/etc/sudoers`. Run: export rvmsudo_secure_path=1 to…
Snowcrash
  • 80,579
  • 89
  • 266
  • 376